Web Inspector: TimelineOverview clicks do not always behave as expected
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Web Inspector: TimelineOverview clicks do not always behave as expected
4         https://bugs.webkit.org/show_bug.cgi?id=195319
5
6         Reviewed by Devin Rousso.
7
8         * UserInterface/Views/TimelineRuler.js:
9         (WI.TimelineRuler.prototype._shouldIgnoreMicroMovement):
10         (WI.TimelineRuler.prototype._handleMouseDown):
11         (WI.TimelineRuler.prototype._handleMouseMove):
12         Ignore moves that haven't gone more than 4px. Once the threshold is
13         passed allow all moves. This improves the click behavior since
14         previously click would never re-dispatch if there was any movement.
15
16 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
17
18         Web Inspector: CPU Usage Timeline - Statistics and Sources sections
19         https://bugs.webkit.org/show_bug.cgi?id=195202
20
21         Reviewed by Devin Rousso.
22
23         * Localizations/en.lproj/localizedStrings.js:
24         New strings.
25
26         * UserInterface/Base/Utilities.js:
27         (Map.prototype.getOrInitialize):
28         Helper to get and if not found initialize with a value.
29
30         * UserInterface/Views/CPUTimelineView.css:
31         (.timeline-view.cpu > .content > .overview > .chart > .container.stats):
32         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table):
33         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > th):
34         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.number):
35         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.label):
36         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .show-more):
37         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter):
38         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter:hover):
39         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active):
40         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active + .active):
41         (@media (prefers-color-scheme: dark)):
42         Colors for the statistics sections.
43
44         * UserInterface/Views/CPUTimelineView.js:
45         (WI.CPUTimelineView):
46         (WI.CPUTimelineView.prototype.reset):
47         (WI.CPUTimelineView.prototype.clear):
48         (WI.CPUTimelineView.prototype._clearStatistics):
49         (WI.CPUTimelineView.prototype._clearSources):
50         Updates for additional sections.
51         Include a cache of the statisiticsData so we can relayout parts of the UI and
52         avoid an entire UI update.
53
54         (WI.CPUTimelineView.prototype.initialLayout):
55         (WI.CPUTimelineView.prototype._layoutBreakdownChart):
56         (WI.CPUTimelineView.prototype._layoutStatisticsAndSources):
57         (WI.CPUTimelineView.prototype._layoutStatisticsSection.createEllipsisElement):
58         (WI.CPUTimelineView.prototype._layoutStatisticsSection):
59         (WI.CPUTimelineView.prototype._layoutSourcesSection.firstNonNativeCallFrame):
60         (WI.CPUTimelineView.prototype._layoutSourcesSection.keyForSourceCodeLocation):
61         (WI.CPUTimelineView.prototype._layoutSourcesSection.labelForLocation):
62         (WI.CPUTimelineView.prototype._layoutSourcesSection.createEllipsisElement):
63         (WI.CPUTimelineView.prototype._layoutSourcesSection):
64         Extract layouts into helper methods to avoid an enormous layout method.
65
66         (WI.CPUTimelineView.prototype._computeSamplingData.incrementTypeCount):
67         (WI.CPUTimelineView.prototype._computeSamplingData):
68         Compute additional data when going through script events.
69
70         (WI.CPUTimelineView.prototype._resetSourcesFilters):
71         (WI.CPUTimelineView.prototype._addSourcesFilter):
72         (WI.CPUTimelineView.prototype._removeSourcesFilter):
73         (WI.CPUTimelineView.prototype._updateSourcesFilters):
74         Helpers for updating the source filters.
75
76         (WI.CPUTimelineView.prototype._createTableRow):
77         (WI.CPUTimelineView.prototype._insertTableRow):
78         Helpers for creating rows in the statistics / sources tables.
79
80 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
81
82         Web Inspector: Simplify chart <rect>s with x/y attributes instead of transform(x, y)
83         https://bugs.webkit.org/show_bug.cgi?id=195352
84
85         Reviewed by Matt Baker.
86
87         * UserInterface/Views/ColumnChart.js:
88         (WI.ColumnChart.prototype.layout):
89         (WI.ColumnChart):
90         * UserInterface/Views/RangeChart.js:
91         (WI.RangeChart.prototype.layout):
92         (WI.RangeChart):
93         * UserInterface/Views/StackedColumnChart.js:
94         (WI.StackedColumnChart.prototype.layout):
95         (WI.StackedColumnChart):
96
97 2019-03-06  Devin Rousso  <drousso@apple.com>
98
99         Web Inspector: CSS Changes: only show changes for the given node
100         https://bugs.webkit.org/show_bug.cgi?id=194608
101         <rdar://problem/48050206>
102
103         Reviewed by Timothy Hatcher.
104
105         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
106         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
107         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
108         (WI.ChangesDetailsSidebarPanel.prototype.layout):
109         Make this panel a subclass of `WI.DOMDetailsSidebarPanel` so it has access to the selected
110         DOM node in the Elements tab.
111
112         * UserInterface/Base/Setting.js:
113         * UserInterface/Views/SettingsTabContentView.js:
114         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
115         Create new general setting for controlling this change.
116
117         * Localizations/en.lproj/localizedStrings.js:
118
119 2019-03-06  Devin Rousso  <drousso@apple.com>
120
121         Web Inspector: Canvas: color swatches aren't shown for valid inputs with leading/trailing whitespace
122         https://bugs.webkit.org/show_bug.cgi?id=195298
123
124         Reviewed by Timothy Hatcher.
125
126         * UserInterface/Views/RecordingActionTreeElement.js:
127         (WI.RecordingActionTreeElement._generateDOM):
128         (WI.RecordingActionTreeElement._createSwatchForColorParameters):
129         Trim the color string since it can be an arbitrary string, seeing as it is captured before
130         the <canvas> has a chance to parse/fix it.
131
132 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
133
134         Web Inspector: recordsInTimeRange sometimes does not get the expected record when includeRecordBeforeStart
135         https://bugs.webkit.org/show_bug.cgi?id=195317
136
137         Reviewed by Devin Rousso.
138
139         * UserInterface/Models/Timeline.js:
140         (WI.Timeline.prototype.recordsOverlappingTimeRange):
141
142 2019-03-05  Devin Rousso  <drousso@apple.com>
143
144         Web Inspector: Canvas: remove event listeners once a recording is ready
145         https://bugs.webkit.org/show_bug.cgi?id=195324
146
147         Reviewed by Matt Baker.
148
149         * UserInterface/Models/Recording.js:
150         (WI.Recording):
151         (WI.Recording.prototype.async swizzle):
152         (WI.Recording.prototype.async _process):
153
154         * UserInterface/Views/RecordingActionTreeElement.js:
155         (WI.RecordingActionTreeElement):
156         (WI.RecordingActionTreeElement.prototype._handleValidityChanged):
157
158         * UserInterface/Views/CanvasSidebarPanel.js:
159         (WI.CanvasSidebarPanel.prototype.set recording):
160         (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
161
162         * UserInterface/Views/RecordingContentView.js:
163         (WI.RecordingContentView.prototype.initialLayout):
164         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
165
166 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
167
168         Web Inspector: Attempting to select records in the bottom 16px of the timeline overview graph fails
169         https://bugs.webkit.org/show_bug.cgi?id=195318
170
171         Reviewed by Devin Rousso.
172
173         The bottom few pixels of the overview are reserved for the scroll-container
174         which may show a scrollbar if the overview needs to scroll. When the scrollbars
175         are not visible we can allow pointer events to click through the invisible
176         scroll-container and allow record selection.
177
178         * UserInterface/Views/TimelineOverview.css:
179         (.timeline-overview:not(.has-scrollbar) > .scroll-container):
180         * UserInterface/Views/TimelineOverview.js:
181         (WI.TimelineOverview.prototype._handleScrollEvent):
182         (WI.TimelineOverview.prototype._handleWheelEvent):
183         (WI.TimelineOverview._handleGestureStart):
184
185 2019-03-05  Devin Rousso  <drousso@apple.com>
186
187         Web Inspector: iPod user agent UIString should have a lowercase "T"
188         https://bugs.webkit.org/show_bug.cgi?id=195312
189         <rdar://problem/48586853>
190
191         Reviewed by Matt Baker.
192
193         * UserInterface/Base/Main.js:
194         (WI._handleDeviceSettingsToolbarButtonClicked):
195
196 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
197
198         Web Inspector: CPU Usage Timeline - Adjust sizes in timeline overview
199         https://bugs.webkit.org/show_bug.cgi?id=195313
200
201         Reviewed by Devin Rousso.
202
203         Reduce the height slightly to save some precious vertical space.
204         Also increase the size of the minimum bar height so that it doesn't
205         look like there are no events when there is low CPU.
206
207         * UserInterface/Views/CPUTimelineOverviewGraph.css:
208         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
209         * UserInterface/Views/CPUTimelineOverviewGraph.js:
210         (WI.CPUTimelineOverviewGraph.prototype.get height):
211         Reduce the CPU overview graph height to 60px.
212
213         (WI.CPUTimelineOverviewGraph.prototype.layout):
214         Increase the minimum size of a column bar to 4px.
215
216 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
217
218         Web Inspector: Reload actions from second level inspector should properly reload the inspected inspector
219         https://bugs.webkit.org/show_bug.cgi?id=195306
220
221         Reviewed by Matt Baker.
222
223         * UserInterface/Base/Main.js:
224         Provide a better reload for a Nth level inspector.
225
226         * UserInterface/Debug/Bootstrap.js:
227         (WI.runBootstrapOperations):
228         Simplify, should not need to check for InspectorFrontendHost.
229
230 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
231
232         Web Inspector: MediaSource logging not initialized properly
233         https://bugs.webkit.org/show_bug.cgi?id=195307
234
235         Reviewed by Matt Baker.
236
237         * UserInterface/Controllers/ConsoleManager.js:
238         (WI.ConsoleManager.prototype.initializeLogChannels):
239         Typo caused undefined to be included and trigger assertions.
240
241 2019-03-04  Devin Rousso  <drousso@apple.com>
242
243         Web Inspector: CSS: class input isn't fully centered
244         https://bugs.webkit.org/show_bug.cgi?id=195297
245
246         Reviewed by Matt Baker.
247
248         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
249         (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input):
250         (body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): Deleted.
251         (body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): Deleted.
252
253 2019-03-04  Devin Rousso  <drousso@apple.com>
254
255         Web Inspector: Audit: show the version number in the UI
256         https://bugs.webkit.org/show_bug.cgi?id=195292
257
258         Reviewed by Matt Baker.
259
260         * UserInterface/Views/AuditNavigationSidebarPanel.js:
261         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
262         (WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
263         Fix the logic for showing a placeholder when editing or with only disabled tests.
264
265         * UserInterface/Views/AuditNavigationSidebarPanel.css:
266         (.sidebar > .panel.navigation.audit > .content > .message-text-view): Added.
267         (.audit-version): Added.
268         Don't obstruct the "Edit" button when showing a placeholder.
269
270         * Localizations/en.lproj/localizedStrings.js:
271
272 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
273
274         ITMLKit Inspector: Data Bindings / Associated Data for nodes
275         https://bugs.webkit.org/show_bug.cgi?id=195290
276         <rdar://problem/48304019>
277
278         Reviewed by Devin Rousso.
279
280         * Localizations/en.lproj/localizedStrings.js:
281         New title and empty message strings.
282
283         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
284         (.sidebar > .panel.dom-node-details .details-section.dom-node-associated-data > .content .row):
285         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
286         (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
287         (WI.DOMNodeDetailsSidebarPanel.prototype.layout):
288         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshDataBindings):
289         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData):
290         (WI.DOMNodeDetailsSidebarPanel.prototype._attributesChanged):
291         New Node sections only enabled for ITMLKit `WI.sharedApp.hasExtraDomains`.
292
293         * UserInterface/Views/ObjectTreeView.js:
294         (WI.ObjectTreeView):
295         Provide a way, like TreeElement/View to access the ObjectTreeView from an element.
296
297 2019-03-04  Devin Rousso  <drousso@apple.com>
298
299         Web Inspector: Canvas: protocol error on first open
300         https://bugs.webkit.org/show_bug.cgi?id=195059
301         <rdar://problem/48407871>
302
303         Reviewed by Joseph Pecoraro.
304
305         * UserInterface/Controllers/CanvasManager.js:
306         (WI.CanvasManager.prototype.initializeTarget):
307         (WI.CanvasManager.prototype.static supportsRecordingAutoCapture):
308         (WI.CanvasManager.prototype.setRecordingAutoCaptureFrameCount):
309         If targets aren't available, wait until they are and then set the auto-capture frame count.
310
311 2019-03-04  Devin Rousso  <drousso@apple.com>
312
313         Web Inspector: Toggling Timeline "Stop when page loads" to on should stop (immediately or soon) any active recording if already past the load event
314         https://bugs.webkit.org/show_bug.cgi?id=195239
315
316         Reviewed by Joseph Pecoraro.
317
318         * UserInterface/Controllers/TimelineManager.js:
319         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
320
321 2019-03-02  Devin Rousso  <drousso@apple.com>
322
323         Web Inspector: Unexpectedly frequent flashing of DOM node attributes
324         https://bugs.webkit.org/show_bug.cgi?id=148049
325         <rdar://problem/22296830>
326
327         Reviewed by Joseph Pecoraro.
328
329         Save a timestamp of when the CSS animation began, so that if the attribute's node is replaced,
330         we can "resume" the CSS animation at the same point with the attribute's new node.
331
332         * UserInterface/Views/DOMTreeElement.js:
333         (WI.DOMTreeElement):
334         (WI.DOMTreeElement.prototype.attributeDidChange):
335         (WI.DOMTreeElement.prototype._buildAttributeDOM):
336         (WI.DOMTreeElement.prototype._createModifiedAnimation):
337         (WI.DOMTreeElement.prototype._markNodeChanged): Deleted.
338         (WI.DOMTreeElement.prototype._nodeChangedAnimationEnd): Deleted.
339         (WI.DOMTreeElement.prototype._fireDidChange): Deleted.
340
341 2019-03-02  Devin Rousso  <drousso@apple.com>
342
343         Web Inspector: Debugger: DOM, URL, and Event breakpoints don't grey out when all breakpoints are disabled
344         https://bugs.webkit.org/show_bug.cgi?id=195170
345         <rdar://problem/48478193>
346
347         Reviewed by Joseph Pecoraro.
348
349         * UserInterface/Views/DOMBreakpointTreeElement.js:
350         (WI.DOMBreakpointTreeElement):
351         (WI.DOMBreakpointTreeElement.prototype.onattach):
352         (WI.DOMBreakpointTreeElement.prototype.ondetach):
353         (WI.DOMBreakpointTreeElement.prototype._updateStatus):
354         * UserInterface/Views/EventBreakpointTreeElement.js:
355         (WI.EventBreakpointTreeElement):
356         (WI.EventBreakpointTreeElement.prototype.onattach):
357         (WI.EventBreakpointTreeElement.prototype.ondetach):
358         (WI.EventBreakpointTreeElement.prototype._updateStatus):
359         * UserInterface/Views/URLBreakpointTreeElement.js:
360         (WI.URLBreakpointTreeElement):
361         (WI.URLBreakpointTreeElement.prototype.onattach):
362         (WI.URLBreakpointTreeElement.prototype.ondetach):
363         (WI.URLBreakpointTreeElement.prototype._updateStatus):
364         Remove the `"resolved"` class when the global "breakpoints enabled" state is changed.
365
366         * UserInterface/Controllers/DOMDebuggerManager.js:
367         (WI.DOMDebuggerManager):
368         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged): Added.
369         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged): Added.
370         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged): Added.
371         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
372         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
373         (WI.DOMDebuggerManager.prototype._resolveEventBreakpoint):
374         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint):
375         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint.breakpointUpdated): Deleted.
376         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint.breakpointUpdated): Deleted.
377         * UserInterface/Models/DOMBreakpoint.js:
378         (WI.DOMBreakpoint):
379         (WI.DOMBreakpoint.deserialize): Added.
380         (WI.DOMBreakpoint.prototype.set disabled):
381         (WI.DOMBreakpoint.prototype.set domNodeIdentifier):
382         * UserInterface/Models/EventBreakpoint.js:
383         (WI.EventBreakpoint.deserialize): Added.
384         (WI.EventBreakpoint.prototype.set disabled):
385         (WI.EventBreakpoint.fromPayload): Deleted.
386         * UserInterface/Models/URLBreakpoint.js:
387         (WI.URLBreakpoint.deserialize): Added.
388         (WI.URLBreakpoint.prototype.set disabled):
389         * UserInterface/Views/DOMTreeContentView.js:
390         (WI.DOMTreeContentView):
391         (WI.DOMTreeContentView.prototype._handleDOMBreakpointDisabledStateChanged): Added.
392         (WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeChanged): Added.
393         * UserInterface/Views/DebuggerSidebarPanel.js:
394         (WI.DebuggerSidebarPanel.prototype._handleDOMBreakpointResolvedStateChanged): Added.
395         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
396         (WI.SourcesNavigationSidebarPanel):
397         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateChanged): Added.
398         Drive-by: rename all events with the name `*DidChange` to `*Changed`.
399         Drive-by: create static `deserialize` helper functions.
400
401 2019-03-02  Devin Rousso  <drousso@apple.com>
402
403         Web Inspector: Sources: breakpoints should be disabled when an audit is running
404         https://bugs.webkit.org/show_bug.cgi?id=195105
405         <rdar://problem/48441373>
406
407         Reviewed by Joseph Pecoraro.
408
409         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
410         (WI.SourcesNavigationSidebarPanel):
411         (WI.SourcesNavigationSidebarPanel.prototype.closed):
412         (WI.SourcesNavigationSidebarPanel.prototype._updateTemporarilyDisabledBreakpointsButtons): Added.
413         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
414         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
415         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
416         (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
417         (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
418         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
419         (.sidebar > .panel.navigation.sources > .content > .warning-banner + .warning-banner): Added.
420
421         * UserInterface/Views/DebuggerSidebarPanel.js:
422         (WI.DebuggerSidebarPanel):
423
424 2019-03-02  Devin Rousso  <drousso@apple.com>
425
426         Web Inspector: Debugger: don't enable breakpoints when source location changes
427         https://bugs.webkit.org/show_bug.cgi?id=195081
428         <rdar://problem/48422701>
429
430         Reviewed by Joseph Pecoraro.
431
432         * UserInterface/Controllers/DebuggerManager.js:
433         (WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
434         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
435
436 2019-03-01  Joseph Pecoraro  <pecoraro@apple.com>
437
438         Web Inspector: CPU Usage - Energy Impact Section
439         https://bugs.webkit.org/show_bug.cgi?id=195151
440
441         Reviewed by Devin Rousso.
442
443         * Localizations/en.lproj/localizedStrings.js:
444         * UserInterface/Main.html:
445         New strings and resources.
446
447         * UserInterface/Views/CPUTimelineView.css:
448         (.timeline-view.cpu > .content .subtitle > .info):
449         (@media (prefers-color-scheme: dark)):
450         (.energy-info-popover-content):
451         (.timeline-view.cpu > .content > .overview > .divider):
452         (body[dir=ltr] .timeline-view.cpu > .content > .overview > .divider):
453         (body[dir=rtl] .timeline-view.cpu > .content > .overview > .divider):
454         (.timeline-view.cpu :matches(.area-chart, .stacked-area-chart) svg > path):
455         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.low):
456         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.medium):
457         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.high):
458         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > polygon.needle):
459         (.timeline-view.cpu .energy):
460         (.timeline-view.cpu .energy .energy-impact):
461         (.timeline-view.cpu .energy .energy-impact.low):
462         (.timeline-view.cpu .energy .energy-impact.medium):
463         (.timeline-view.cpu .energy .energy-impact.high):
464         (.timeline-view.cpu .energy .energy-impact-number):
465         Styling the chart and text for the different energy impact levels.
466
467         * UserInterface/Views/CPUTimelineView.js:
468         (WI.CPUTimelineView.prototype.get lowEnergyValue):
469         (WI.CPUTimelineView.prototype.get highEnergyValue):
470         (WI.CPUTimelineView.prototype.initialLayout):
471         (WI.CPUTimelineView.prototype.layout):
472         (WI.CPUTimelineView.prototype._layoutEnergyChart.mapWithBias):
473         (WI.CPUTimelineView.prototype._layoutEnergyChart.valuesForGauge):
474         (WI.CPUTimelineView.prototype._layoutEnergyChart):
475         (WI.CPUTimelineView.prototype._clearEnergyImpactText):
476         New gauge chart and associated popover.
477         We do a bit of biasing of the data for each of the sections
478         in the gauge chart. Each section biases toward the cap of the
479         section so that:
480           - we encourage lower power usage (sub 3%)
481           - the gauge needle quickly moves past the low value of a range
482
483         * UserInterface/Views/GaugeChart.css: Added.
484         (.gauge-chart):
485         (body[dir=rtl] .gauge-chart):
486         (.gauge-chart > svg > path,):
487         (.gauge-chart > svg > polygon.needle):
488         (.gauge-chart.empty > svg > polygon.needle):
489         (@media (prefers-color-scheme: dark)):
490         * UserInterface/Views/GaugeChart.js: Added.
491         (WI.GaugeChart.prototype.get size):
492         (WI.GaugeChart.prototype.get segments):
493         (WI.GaugeChart.prototype.get value):
494         (WI.GaugeChart.prototype.set value):
495         (WI.GaugeChart.prototype.clear):
496         (WI.GaugeChart.prototype.initialLayout):
497         (WI.GaugeChart.prototype.layout):
498         (WI.GaugeChart.prototype._validateSegments):
499         (WI.GaugeChart.prototype._createSegmentPathData):
500         GaugeChart with variable number of sections and a
501         current value needle. It has a bit of customization
502         when drawing the arc at the start of each segment.
503
504         * UserInterface/Views/Variables.css:
505         (:root):
506         (@media (prefers-color-scheme: dark)):
507         New CPU colors for the different energy impact levels.
508
509 2019-03-01  Nikita Vasilyev  <nvasilyev@apple.com>
510
511         Web Inspector: Data grid border colors don't match accent colors
512         https://bugs.webkit.org/show_bug.cgi?id=195232
513
514         Reviewed by Matt Baker.
515
516         * UserInterface/Views/DataGrid.css:
517         (.data-grid:focus tr.selected td:not(:last-child)):
518         (body[dir=ltr] .data-grid:focus tr.selected td:not(:last-child)):
519         (body[dir=rtl] .data-grid:focus tr.selected td:not(:last-child)):
520
521 2019-02-28  Devin Rousso  <drousso@apple.com>
522
523         Web Inspector: Timelines: don't show the auto-stop UI when not inspecting a page
524         https://bugs.webkit.org/show_bug.cgi?id=195192
525
526         Reviewed by Joseph Pecoraro.
527
528         * UserInterface/Views/TimelineRecordingContentView.js:
529         (WI.TimelineRecordingContentView):
530         (WI.TimelineRecordingContentView.prototype.get navigationItems):
531
532 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
533
534         Web Inspector: CPU Usage: Worker thread that dies might stay at a high value forever
535         https://bugs.webkit.org/show_bug.cgi?id=195148
536
537         Reviewed by Matt Baker.
538
539         * UserInterface/Views/CPUTimelineView.js:
540         (CPUTimelineView.prototype.layout):
541         Handle workers dieing or at least zeroing out between records.
542
543 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
544
545         Web Inspector: CPU Usage Timeline - Make Threads section expandable / collapsable
546         https://bugs.webkit.org/show_bug.cgi?id=195085
547
548         Reviewed by Matt Baker.
549
550         * UserInterface/Base/Setting.js:
551         New setting to save the Threads expanded/collapsed state.
552
553         * UserInterface/Views/CPUTimelineView.css:
554         (.timeline-view.cpu > .content > .details > .subtitle):
555         (.timeline-view.cpu > .content > .details > details > .subtitle.threads):
556         (.timeline-view.cpu > .content > .details > .subtitle): Deleted.
557         (.timeline-view.cpu > .content > .details > .subtitle.threads): Deleted.
558         Ensure subtitle styles apply now that one of the subtitles is inside
559         of a <details> / <summary> element.
560
561         * UserInterface/Views/CPUTimelineView.js:
562         (WI.CPUTimelineView.prototype.initialLayout):
563         Make the Threads group a <details> / <summary> expandable / collapsed element.
564
565         * UserInterface/Views/Main.css:
566         (summary):
567         (summary::-webkit-details-marker):
568         Default styles for <summary>.
569
570 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
571
572         Web Inspector: View.removeSubview not removing the element properly when not parented
573         https://bugs.webkit.org/show_bug.cgi?id=195146
574
575         Reviewed by Matt Baker.
576
577         * UserInterface/Views/View.js:
578         (WI.View.prototype.removeSubview):
579         Since the element may not be a direct child, just use Element.prototype.remove.
580
581 2019-02-28  Matt Baker  <mattbaker@apple.com>
582
583         Web Inspector: Debugger: disabled breakpoint color is too dark
584         https://bugs.webkit.org/show_bug.cgi?id=195103
585         <rdar://problem/48440678>
586
587         Reviewed by Devin Rousso.
588
589         Increase the disabled breakpoint contrast, as well as the contrast between
590         disabled and auto-continue breakpoints. Disabled breakpoints stand out by
591         being somewhat brighter and less saturated. Using the same strategy for
592         auto-continue breakpoints is too subtle to provide sufficient contrast.
593
594         We can adopt the technique used by Xcode, and overlay a white triangle
595         marker on the breakpoint arrow to indicate an auto-continue breakpoint.
596
597         * UserInterface/Views/BreakpointTreeElement.css:
598         (.item.breakpoint .status > .status-image):
599         (.item.breakpoint.selected .status > .status-image.resolved):
600         Add white outline to make selected breakpoint button stand out.
601         (.item.breakpoint .status > .status-image.auto-continue::after):
602         (.item.breakpoint .status > .status-image.disabled):
603         (.item.breakpoint .status > .status-image.auto-continue): Deleted.
604
605
606         * UserInterface/Views/DOMTreeContentView.css:
607         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
608         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled):
609         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
610         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,): Deleted.
611
612         * UserInterface/Views/TextEditor.css:
613         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
614         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.execution-line.primary) .CodeMirror-linenumber::after):
615         (.text-editor > .CodeMirror .breakpoint-disabled .CodeMirror-linenumber::before):
616         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.breakpoint-disabled) .CodeMirror-linenumber::before): Deleted.
617
618         * UserInterface/Views/Variables.css:
619         (:root):
620         Add breakpoint color variables to use across all breakpoint controls.
621         Use system colors if available, otherwise fall back to hard-coded values
622         based on sampling the default (blue) accent color on Mojave.
623
624 2019-02-28  Nikita Vasilyev  <nvasilyev@apple.com>
625
626         Web Inspector: Styles: Control-Space should force completion
627         https://bugs.webkit.org/show_bug.cgi?id=194796
628         <rdar://problem/48180822>
629
630         Reviewed by Matt Baker.
631
632         Pressing Control-Space when editing CSS property should show completion popover,
633         even if the value is empty.
634
635         * UserInterface/Models/CSSCompletions.js:
636         (WI.CSSCompletions.prototype.startsWith):
637         Performance optimization: exit early when `prefix` is empty.
638
639         * UserInterface/Views/SpreadsheetStyleProperty.js:
640         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
641         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
642         * UserInterface/Views/SpreadsheetTextField.js:
643         (WI.SpreadsheetTextField):
644         (WI.SpreadsheetTextField.prototype._handleKeyDown):
645         (WI.SpreadsheetTextField.prototype._updateCompletions):
646
647 2019-02-28  Devin Rousso  <drousso@apple.com>
648
649         Web Inspector: Canvas: enabling auto-capture if the frame count is empty triggers an assertion
650         https://bugs.webkit.org/show_bug.cgi?id=195060
651
652         Reviewed by Matt Baker.
653
654         * UserInterface/Views/CanvasOverviewContentView.js:
655         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
656         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
657         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureCheckedDidChange):
658
659 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
660
661         Web Inspector: Revert -webkit-border-end changes that are unreliable
662         https://bugs.webkit.org/show_bug.cgi?id=195149
663
664         Reviewed by Matt Baker.
665
666         * UserInterface/Views/CPUUsageIndicatorView.css:
667         (.cpu-usage-indicator-view > .details):
668         (body[dir=ltr] .cpu-usage-indicator-view > .details):
669         (body[dir=rtl] .cpu-usage-indicator-view > .details):
670         * UserInterface/Views/CPUUsageStackedView.css:
671         (.cpu-usage-stacked-view > .details):
672         (body[dir=ltr] .cpu-usage-stacked-view > .details):
673         (body[dir=rtl] .cpu-usage-stacked-view > .details):
674         * UserInterface/Views/CPUUsageView.css:
675         (.cpu-usage-view > .details):
676         (body[dir=ltr] .cpu-usage-view > .details):
677         (body[dir=rtl] .cpu-usage-view > .details):
678         * UserInterface/Views/MemoryCategoryView.css:
679         (.memory-category-view > .details):
680         (body[dir=ltr] .memory-category-view > .details):
681         (body[dir=rtl] .memory-category-view > .details):
682
683 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
684
685         Web Inspector: Cleanup some Chart code
686         https://bugs.webkit.org/show_bug.cgi?id=195147
687
688         Reviewed by Matt Baker.
689
690         * UserInterface/Views/RangeChart.js:
691         (WI.RangeChart.prototype.layout):
692         (WI.RangeChart):
693         * UserInterface/Views/StackedColumnChart.js:
694         (WI.StackedColumnChart.prototype.layout):
695         (WI.StackedColumnChart):
696
697 2019-02-27  Joseph Pecoraro  <pecoraro@apple.com>
698
699         Web Inspector: Add a new Scanner TimelineMarker to show up when mousing over TimelineView graphs
700         https://bugs.webkit.org/show_bug.cgi?id=195079
701
702         Reviewed by Devin Rousso.
703
704         * UserInterface/Base/Utilities.js:
705         (Note.prototype.enclosingNodeOrSelfWithClassInArray):
706         Helper for a set of classes.
707
708         * UserInterface/Models/TimelineMarker.js:
709         Add a new marker type, "Scanner".
710
711         * UserInterface/Views/CPUTimelineView.js:
712         (WI.CPUTimelineView.prototype.initialLayout):
713         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
714         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
715         * UserInterface/Views/MemoryTimelineView.js:
716         (WI.MemoryTimelineView):
717         (WI.MemoryTimelineView.prototype._graphPositionForMouseEvent):
718         (WI.MemoryTimelineView.prototype._handleGraphMouseMove):
719         Update a scanner time when mousing over various graphs that span the entire time range.
720         These use the containing graph element because there was a single pixel between
721         adjacent graphs which would cause the scanner to flicker because the mouse event target
722         was not an svg element.
723
724         * UserInterface/Views/TimelineOverview.js:
725         (WI.TimelineOverview.prototype.hidden):
726         (WI.TimelineOverview.prototype.updateScannerTime):
727         (WI.TimelineOverview.prototype.clearScanner):
728         * UserInterface/Views/TimelineRecordingContentView.js:
729         (WI.TimelineRecordingContentView):
730         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerTimeDidChange):
731         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerDidClear):
732         Update the overview's ruler with scanner changes.
733
734         * UserInterface/Views/TimelineRuler.css:
735         (.timeline-ruler > .markers > .marker.scanner):
736         * UserInterface/Views/TimelineRuler.js:
737         (WI.TimelineRuler):
738         (WI.TimelineRuler.prototype.clearMarkers):
739         (WI.TimelineRuler.prototype.updateScannerTime):
740         (WI.TimelineRuler.prototype.clearScanner):
741         (WI.TimelineRuler.prototype._updateMarkers):
742         Have a special scanner marker that updates.
743
744         * UserInterface/Views/TimelineView.js:
745         New events that a TimelineView can dispatch to update the overview.
746
747         * UserInterface/Views/Variables.css:
748         (:root):
749         (@media (prefers-color-scheme: dark)):
750         Scanner marker colors.
751
752 2019-02-27  Devin Rousso  <drousso@apple.com>
753
754         Web Inspector: Use Element.closest for internal code
755         https://bugs.webkit.org/show_bug.cgi?id=173747
756
757         Reviewed by Joseph Pecoraro.
758
759         Replace usage of added utility functions on the `Node` prototype with the built-in
760         `Element.prototype.closest` as it's more flexible and is capable of doing the same thing.
761
762         * UserInterface/Base/Utilities.js:
763         (Node.prototype.enclosingNodeOrSelfWithClass): Deleted.
764         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Deleted.
765         (Node.prototype.enclosingNodeOrSelfWithNodeName): Deleted.
766         * UserInterface/Base/Main.js:
767         (WI.handlePossibleLinkClick):
768         (WI._focusedContentBrowser):
769         * UserInterface/Views/CPUTimelineView.js:
770         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
771         * UserInterface/Views/CompletionSuggestionsView.js:
772         (WI.CompletionSuggestionsView.prototype.set selectedIndex):
773         (WI.CompletionSuggestionsView.prototype.update):
774         (WI.CompletionSuggestionsView.prototype._itemClicked):
775         * UserInterface/Views/ConsoleGroup.js:
776         (WI.ConsoleGroup.prototype._titleClicked):
777         * UserInterface/Views/DOMTreeContentView.js:
778         (WI.DOMTreeContentView.prototype._mouseWasClicked):
779         * UserInterface/Views/DOMTreeElement.js:
780         (WI.DOMTreeElement.prototype._startEditingTarget):
781         (WI.DOMTreeElement.prototype._populateTagContextMenu):
782         * UserInterface/Views/DOMTreeOutline.js:
783         (WI.DOMTreeOutline.prototype.populateContextMenu):
784         * UserInterface/Views/DataGrid.js:
785         (WI.DataGrid.prototype._startEditing):
786         (WI.DataGrid.prototype._editingCancelled):
787         (WI.DataGrid.prototype.dataGridNodeFromNode):
788         (WI.DataGrid.prototype.dataGridNodeFromPoint):
789         (WI.DataGrid.prototype._headerCellClicked):
790         (WI.DataGrid.prototype._mouseoverColumnCollapser):
791         (WI.DataGrid.prototype._mouseoutColumnCollapser):
792         (WI.DataGrid.prototype._clickInColumnCollapser):
793         (WI.DataGrid.prototype._contextMenuInHeader):
794         (WI.DataGrid.prototype._contextMenuInDataTable):
795         * UserInterface/Views/DataGridNode.js:
796         (WI.DataGridNode.prototype.isEventWithinDisclosureTriangle):
797         * UserInterface/Views/LegacyTabBar.js:
798         (WI.LegacyTabBar.prototype._handleMouseDown):
799         (WI.LegacyTabBar.prototype._handleClick):
800         * UserInterface/Views/LogContentView.js:
801         (WI.LogContentView.prototype._handleContextMenuEvent):
802         (WI.LogContentView.prototype._mousedown):
803         (WI.LogContentView.prototype._targetInMessageCanBeSelected):
804         (WI.LogContentView.prototype._mousemove):
805         (WI.LogContentView.prototype._mouseup):
806         (WI.LogContentView.prototype._ondragstart):
807         * UserInterface/Views/NavigationBar.js:
808         (WI.NavigationBar.prototype._mouseDown):
809         (WI.NavigationBar.prototype._mouseMoved):
810         * UserInterface/Views/Popover.js:
811         (WI.Popover.prototype.handleEvent):
812         * UserInterface/Views/TabBar.js:
813         (WI.TabBar.prototype._handleMouseDown):
814         (WI.TabBar.prototype._handleClick):
815         * UserInterface/Views/Table.js:
816         (WI.Table.prototype._handleMouseDown):
817         (WI.Table.prototype._handleContextMenu):
818         * UserInterface/Views/TreeOutline.js:
819         (WI.TreeOutline.prototype.treeElementFromNode):
820
821 2019-02-27  Devin Rousso  <drousso@apple.com>
822
823         Web Inspector: REGRESSION(r242118): Debugger: event breakpoints have no icon
824         https://bugs.webkit.org/show_bug.cgi?id=195119
825
826         Reviewed by Matt Baker.
827
828         * UserInterface/Views/EventBreakpointTreeElement.js:
829         (WI.EventBreakpointTreeElement):
830
831 2019-02-27  Devin Rousso  <drousso@apple.com>
832
833         Web Inspector: Dark Mode: unreadable text in bezier curve editor numeric input fields
834         https://bugs.webkit.org/show_bug.cgi?id=195018
835         <rdar://problem/48378541>
836
837         Reviewed by Matt Baker.
838
839         Simplify some styles using `-webkit-*` properties instead of `[dir=ltr]`/`[dir=rtl]` selectors.
840
841         * UserInterface/Views/BezierEditor.css:
842         (.bezier-editor):
843         (.bezier-editor > .bezier-preview):
844         (.bezier-editor > .bezier-preview-timing):
845         (.bezier-editor > .bezier-container .linear-curve):
846         (.bezier-editor > .bezier-container .bezier-curve):
847         (.bezier-editor > .bezier-container .control-line):
848         (.bezier-editor > .bezier-container .control-handle):
849         (.bezier-editor > .number-input-container):
850         (.bezier-editor > .number-input-container > input):
851         (body[dir=ltr] .bezier-editor > .bezier-preview-timing): Deleted.
852         (body[dir=rtl] .bezier-editor > .bezier-preview-timing): Deleted.
853         (body[dir=ltr] .bezier-editor > .number-input-container > input): Deleted.
854         (body[dir=rtl] .bezier-editor > .number-input-container > input): Deleted.
855         (@media (prefers-color-scheme: dark)): Deleted.
856         Remove all custom styling on any <input>s, as they look fine with their default styling.
857
858         * UserInterface/Views/SpringEditor.css:
859         (.spring-editor > .spring-preview):
860         (.spring-editor > .spring-preview > div):
861         (.spring-editor > .spring-timing > div):
862
863 2019-02-27  Devin Rousso  <drousso@apple.com>
864
865         Web Inspector: popover colors don't change when transitioning to/from dark mode
866         https://bugs.webkit.org/show_bug.cgi?id=195113
867         <rdar://problem/48444188>
868
869         Reviewed by Timothy Hatcher.
870
871         * UserInterface/Views/Popover.js:
872         (WI.Popover.prototype.dismiss):
873         (WI.Popover.prototype._addListenersIfNeeded):
874
875 2019-02-26  Matt Baker  <mattbaker@apple.com>
876
877         Web Inspector: Use system accent color throughout UI
878         https://bugs.webkit.org/show_bug.cgi?id=193507
879         <rdar://problem/47327971>
880
881         Reviewed by Timothy Hatcher.
882
883         * UserInterface/Images/Breakpoint.png: Removed.
884         * UserInterface/Images/Breakpoint.svg: Added.
885         * UserInterface/Images/Breakpoint@2x.png: Removed.
886         * UserInterface/Images/BreakpointInactive.png: Removed.
887         * UserInterface/Images/BreakpointInactive@2x.png: Removed.
888         Replace breakpoint pixel art with an SVG image that can be styled in CSS.
889
890         * UserInterface/Images/CSSVariable.svg:
891         * UserInterface/Images/CubicBezier.svg:
892         * UserInterface/Images/UserInputPrompt.svg:
893         Remove fill color since it is now styled in CSS.
894
895         * UserInterface/Views/BezierEditor.css:
896         (.bezier-editor > .bezier-preview > div):
897         (@media (prefers-color-scheme: dark)):
898         (.bezier-editor > .bezier-container .control-handle):
899         (.bezier-editor > .bezier-container .control-line):
900         Use system accent color for control handles.
901
902         * UserInterface/Views/BreakpointTreeElement.css:
903         (.item.breakpoint .status > .status-image):
904         (.item.breakpoint .status > .status-image.resolved):
905         Use system accent color for breakpoint fill, with a dark outline
906         to match Xcode and make the button stand out against the selection.
907
908         * UserInterface/Views/BreakpointTreeElement.js:
909         (WI.BreakpointTreeElement.prototype._updateStatus):
910
911         * UserInterface/Views/ButtonNavigationItem.css:
912         (.navigation-bar .item.button > .glyph):
913
914         * UserInterface/Views/ConsolePrompt.js:
915         (WI.ConsolePrompt):
916
917         * UserInterface/Views/DOMBreakpointTreeElement.js:
918         * UserInterface/Views/DOMTreeContentView.css:
919         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
920         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,):
921         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
922         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled): Deleted.
923         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint): Deleted.
924         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint.disabled): Deleted.
925
926         * UserInterface/Views/DOMTreeOutline.css:
927         (.tree-outline.dom li.selected .selection-area):
928         (.tree-outline.dom li.elements-drag-over .selection-area):
929         (.tree-outline.dom:focus li:matches(.selected, .hovered) .selection-area):
930         (.tree-outline.dom li.hovered:not(.selected) .selection-area):
931         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
932         Use the system accent color for the "pseudo-class enabled" marker.
933         (@media (prefers-color-scheme: dark)):
934         (.tree-outline.dom:focus li.selected .selection-area): Deleted.
935         Use --selected-background-color for selection and hover styles, which is
936         set to the system highlight color if available.
937
938         * UserInterface/Views/InlineSwatch.css:
939         (.inline-swatch:matches(.bezier, .spring, .variable)):
940         (.inline-swatch:matches(.bezier, .spring)): Deleted.
941         (.inline-swatch.variable): Deleted.
942
943         * UserInterface/Views/InlineSwatch.js:
944         (WI.InlineSwatch):
945
946         * UserInterface/Views/NetworkDetailView.css:
947         (.network .network-detail .navigation-bar .item.radio.button.text-only:before):
948         (.network .network-detail .navigation-bar .item.radio.button.text-only.selected):
949         (@media (prefers-color-scheme: dark)):
950         (.network-detail .item.close > .glyph):
951
952         * UserInterface/Views/QuickConsole.css:
953         (.quick-console > .console-prompt > .glyph):
954         (.quick-console > .console-prompt::before): Deleted.
955
956         * UserInterface/Views/RadioButtonNavigationItem.css:
957         (.navigation-bar .item.radio.button.text-only):
958         (.navigation-bar .item.radio.button.text-only::before):
959         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)):
960         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)::before):
961         (.navigation-bar .item.radio.button.text-only:not(.selected):hover::before):
962         (.navigation-bar .item.radio.button.text-only.selected:active::before):
963         (.navigation-bar .item.radio.button.text-only:hover): Deleted.
964         (.navigation-bar .item.radio.button.text-only.selected): Deleted.
965         (.navigation-bar .item.radio.button.text-only:active): Deleted.
966         (.navigation-bar .item.radio.button.text-only.selected:active): Deleted.
967         Use system accent color for selection and hover styles. Since it isn't
968         yet possible to derive new colors from the accent color in CSS, fake it
969         with a ::before pseudo-element that can have have `filter` or `opacity`
970         effects applied to it without altering the button text color.
971
972         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
973         (.timeline-overview-graph.rendering-frame > .frame-marker):
974         Use system accent color for selected frame marker.
975
976         * UserInterface/Views/ScopeBar.css:
977         (.scope-bar > li):
978         (.scope-bar > li::before):
979         (.scope-bar.default-item-selected > li.multiple.selected::before):
980         (.scope-bar > li:matches(.selected, :hover)):
981         (.scope-bar > li:matches(.selected, :hover)::before):
982         (.scope-bar > li:not(.selected):hover::before):
983         (.scope-bar > li.selected:active::before):
984         (.scope-bar > li:hover): Deleted.
985         (.scope-bar > li.selected): Deleted.
986         (.scope-bar > li:active): Deleted.
987         (.scope-bar > li.selected:active): Deleted.
988
989         * UserInterface/Views/SettingsTabContentView.css:
990         (.content-view.settings .navigation-bar .item.radio.button.text-only:before):
991
992         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
993         (.spreadsheet-style-declaration-editor):
994         (@media (prefers-color-scheme: dark)):
995
996         * UserInterface/Views/TextEditor.css:
997         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
998         (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
999         (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber::before):
1000         (@keyframes text-editor-highlight-fadeout):
1001         (@keyframes text-editor-hovered-expression-highlight-fadeout):
1002         Replace breakpoint pixel art with a solid color (the system accent
1003         color) clipped to the shape of a breakpoint.
1004
1005         * UserInterface/Views/TimelineRecordFrame.css:
1006         (.timeline-record-frame.selected):
1007
1008         * UserInterface/Views/URLBreakpointTreeElement.js:
1009
1010         * UserInterface/Views/Variables.css:
1011         (:root):
1012         (body.window-inactive):
1013         (@media (prefers-color-scheme: dark)):
1014         (body.mac-platform:not(.sierra, .high-sierra)):
1015         Add custom property overrides for system colors where supported.
1016
1017 2019-02-26  Devin Rousso  <drousso@apple.com>
1018
1019         Web Inspector: Search: no results when opening to Search tab
1020         https://bugs.webkit.org/show_bug.cgi?id=195058
1021         <rdar://problem/48407699>
1022
1023         Reviewed by Joseph Pecoraro.
1024
1025         * UserInterface/Views/SearchSidebarPanel.js:
1026         (WI.SearchSidebarPanel.prototype.performSearch):
1027         If targets aren't available, wait until they are and then perform the search.
1028
1029         * UserInterface/Base/Main.js:
1030         (WI.targetsAvailable): Added.
1031         Expose getter for indicating whether targets are available.
1032
1033 2019-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1034
1035         Web Inspector: CPU Usage Timeline - Main Thread Indicator
1036         https://bugs.webkit.org/show_bug.cgi?id=194972
1037
1038         Reviewed by Devin Rousso.
1039
1040         * UserInterface/Main.html:
1041         * UserInterface/Base/Utilities.js:
1042         (value):
1043         The existing enclosingNode doesn't work for SVG because its names
1044         are lowercase. Add a simplified version for the svg case.
1045
1046         * UserInterface/Views/RangeChart.js: Added.
1047         (WI.RangeChart):
1048         (WI.RangeChart.prototype.get size):
1049         (WI.RangeChart.prototype.set size):
1050         (WI.RangeChart.prototype.addRange):
1051         (WI.RangeChart.prototype.clear):
1052         (WI.RangeChart.prototype.layout):
1053         A new chart that draws rects for given ranges.
1054
1055         * UserInterface/Models/Timeline.js:
1056         (WI.Timeline.prototype.recordsOverlappingTimeRange):
1057         Helper to specifically get records touching a range. Useful
1058         for when we have a single pixel spanning (startTime -> endTime)
1059         and we want to find records in that pixel.
1060
1061         * UserInterface/Views/CPUTimelineView.css:
1062         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart rect):
1063         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-script):
1064         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-style):
1065         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-layout):
1066         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-paint):
1067         * UserInterface/Views/CPUTimelineView.js:
1068         (WI.CPUTimelineView.prototype.get indicatorViewHeight):
1069         (WI.CPUTimelineView.prototype.clear):
1070         (WI.CPUTimelineView.prototype.get scrollableElements):
1071         (WI.CPUTimelineView.prototype.initialLayout):
1072         (WI.CPUTimelineView.prototype.layout):
1073         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
1074         (WI.CPUTimelineView.prototype._handleIndicatorClick):
1075         (WI.CPUTimelineView.prototype._attemptSelectIndicatatorTimelineRecord):
1076         (WI.CPUTimelineView.prototype._selectTimelineRecord):
1077         Place the Main Thread Indicator view beneath the big graph.
1078         Clicking inside it selects records in the Timeline Overview.
1079
1080         * UserInterface/Views/CPUUsageIndicatorView.css: Added.
1081         (.cpu-usage-indicator-view):
1082         (.cpu-usage-indicator-view > .details):
1083         (body[dir=ltr] .cpu-usage-indicator-view > .details):
1084         (body[dir=rtl] .cpu-usage-indicator-view > .details):
1085         (body[dir=rtl] .cpu-usage-indicator-view > .graph):
1086         (.cpu-usage-indicator-view > .graph):
1087         (.cpu-usage-indicator-view > .graph,):
1088         * UserInterface/Views/CPUUsageIndicatorView.js: Added.
1089         (WI.CPUUsageIndicatorView):
1090         (WI.CPUUsageIndicatorView.prototype.get chart):
1091         (WI.CPUUsageIndicatorView.prototype.clear):
1092         (WI.CPUUsageIndicatorView.prototype.updateChart):
1093         Converts the CPU samples data into a RangeChart. It works to coalesce
1094         many samples of the same type into a single range to reduce total ranges.
1095
1096         * UserInterface/Views/TimelineRecordingContentView.js:
1097         (WI.TimelineRecordingContentView):
1098         (WI.TimelineRecordingContentView.prototype._recordSelected):
1099         (WI.TimelineRecordingContentView.prototype._recordWasSelected):
1100         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineOverview):
1101         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineView):
1102         * UserInterface/Views/TimelineView.js:
1103         Add a path for a TimelineView to dispatch a record selected event and cause
1104         have the TimelineRecordingContentView react to it by updating the timeline
1105         overview and relevent timeline view.
1106
1107 2019-02-26  Devin Rousso  <drousso@apple.com>
1108
1109         Web Inspector: navigation sidebar says "No Search Results" when a slow search is in progress
1110         https://bugs.webkit.org/show_bug.cgi?id=170631
1111         <rdar://problem/29473874>
1112
1113         Reviewed by Joseph Pecoraro.
1114
1115         Keep a count of all the backend commands (increment when firing, decrement when a result is
1116         sent back to the frontend). Once the count comes back to `0`, attempt to show the "No Results"
1117         placeholder, since we will have finished searching at that point. Since commands can be called
1118         as a result of other commands, using `Promise.all` isn't possible.
1119
1120         * UserInterface/Views/SearchSidebarPanel.js:
1121         (WI.SearchSidebarPanel.prototype.performSearch):
1122         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon): Deleted.
1123         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder): Deleted.
1124         Drive-by: replace `bind` calls with arrow functions, and use for-of loops.
1125
1126         * Localizations/en.lproj/localizedStrings.js:
1127
1128 2019-02-26  Devin Rousso  <drousso@apple.com>
1129
1130         Web Inspector: Canvas: if no auto-capture value is specified, don't force the input to have "0" as the value
1131         https://bugs.webkit.org/show_bug.cgi?id=194950
1132         <rdar://problem/48276798>
1133
1134         Reviewed by Joseph Pecoraro.
1135
1136         Create a getter/setter for the value of the auto-capture frame count <input> so that all
1137         code follows the same path.
1138
1139         If the <input> currently has no content and the frame count is 0, only set the placeholder.
1140
1141         * UserInterface/Views/CanvasOverviewContentView.js:
1142         (WI.CanvasOverviewContentView):
1143         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
1144         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
1145         (WI.CanvasOverviewContentView.prototype.get _recordingAutoCaptureFrameCountInputElementValue): Added.
1146         (WI.CanvasOverviewContentView.prototype.set _recordingAutoCaptureFrameCountInputElementValue): Added.
1147         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
1148         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
1149
1150 2019-02-26  Devin Rousso  <drousso@apple.com>
1151
1152         Web Inspector: Console: dragging a selection outside the selected element clears the selection
1153         https://bugs.webkit.org/show_bug.cgi?id=194660
1154         <rdar://problem/46719239>
1155
1156         Reviewed by Joseph Pecoraro.
1157
1158         * UserInterface/Views/LogContentView.js:
1159         (WI.LogContentView.prototype._mousemove):
1160         Don't clear the selection if the target of the "mousemove" is outside of the view.
1161
1162         (WI.LogContentView.prototype._updateMessagesSelection):
1163         Drive-by: clear the saved selected messages when we're just selecting a single message.
1164
1165 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
1166
1167         Web Inspector: Rename LineChart to AreaChart
1168         https://bugs.webkit.org/show_bug.cgi?id=195038
1169
1170         Rubber-stamped by Matt Baker.
1171
1172         * UserInterface/Main.html:
1173         New file names.
1174
1175         * UserInterface/Views/AreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/LineChart.js.
1176         * UserInterface/Views/StackedAreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/StackedLineChart.js.
1177         Renamed.
1178
1179         * UserInterface/Views/CPUTimelineView.css:
1180         * UserInterface/Views/CPUUsageStackedView.css:
1181         * UserInterface/Views/CPUUsageStackedView.js:
1182         * UserInterface/Views/CPUUsageView.css:
1183         * UserInterface/Views/CPUUsageView.js:
1184         * UserInterface/Views/LegacyCPUTimelineView.css:
1185         * UserInterface/Views/MemoryCategoryView.css:
1186         * UserInterface/Views/MemoryCategoryView.js:
1187         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
1188         Update references.
1189
1190 2019-02-25  Devin Rousso  <drousso@apple.com>
1191
1192         Web Inspector: hovering a node inside an object preview should highlight it
1193         https://bugs.webkit.org/show_bug.cgi?id=194862
1194         <rdar://problem/48246433>
1195
1196         Reviewed by Joseph Pecoraro.
1197
1198         * UserInterface/Views/FormattedValue.js:
1199         (WI.FormattedValue.createElementForNodePreview):
1200         When provided a way to access the `WI.RemoteObject` for the given preview, add various mouse
1201         event listeners that highlight the corresponding DOM node.
1202
1203         * UserInterface/Views/ObjectPreviewView.js:
1204         (WI.ObjectPreviewView):
1205         (WI.ObjectPreviewView.prototype._initTitleElement):
1206         (WI.ObjectPreviewView.prototype._appendPropertyPreviews):
1207         (WI.ObjectPreviewView.prototype._appendValuePreview):
1208         Implement various ways of getting the `WI.RemoteObject` for a given preview.
1209          - When the preview is for the actual `WI.RemoteObject`, simply return it
1210          - If the preview is a property of the main object, get the `WI.RemoteObject` for that property
1211
1212         * UserInterface/Views/ObjectTreeView.js:
1213         (WI.ObjectTreeView):
1214         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1215         (WI.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
1216         Pass the `WI.RemoteObject` to the preview so that it can utilize it.
1217
1218         * UserInterface/Controllers/ConsoleManager.js:
1219         (WI.ConsoleManager):
1220         (WI.ConsoleManager.prototype.releaseRemoteObjectWithConsoleClear): Added.
1221         (WI.ConsoleManager.prototype.messagesCleared): Added.
1222
1223 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
1224
1225         Web Inspector: CPU Usage Timeline - Thread Breakdown
1226         https://bugs.webkit.org/show_bug.cgi?id=194788
1227
1228         Reviewed by Devin Rousso.
1229
1230         * Localizations/en.lproj/localizedStrings.js:
1231         * UserInterface/Main.html:
1232         New strings and files.
1233
1234         * UserInterface/Views/Variables.css:
1235         (:root):
1236         New colors for cpu threads / activity breakdown.
1237
1238         * UserInterface/Models/CPUTimelineRecord.js:
1239         (WI.CPUTimelineRecord.prototype.get workers):
1240         (WI.CPUTimelineRecord):
1241         Distinguish the workers in a CPU timeline record.
1242
1243         * UserInterface/Views/CPUTimelineOverviewGraph.js:
1244         (WI.CPUTimelineOverviewGraph):
1245         (WI.CPUTimelineOverviewGraph.prototype.layout):
1246         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1247         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect):
1248         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
1249         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
1250         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
1251         Stacked column chart for CPU in the overview graph.
1252
1253         * UserInterface/Views/CPUTimelineView.css:
1254         (.timeline-view.cpu > .content > .overview):
1255         (.timeline-view.cpu > .content > .details > .subtitle.threads):
1256         (.timeline-view.cpu > .content > .overview > .chart):
1257         (.timeline-view.cpu > .content > .overview > .chart > .subtitle):
1258         (.timeline-view.cpu > .content > .overview > .chart > .container):
1259         (.timeline-view.cpu > .content > .overview .samples,):
1260         (.timeline-view.cpu .legend):
1261         (.timeline-view.cpu .legend .row):
1262         (.timeline-view.cpu .legend .row + .row):
1263         (.timeline-view.cpu .legend .swatch):
1264         (.timeline-view.cpu .legend > .row > .swatch.sample-type-idle):
1265         (.timeline-view.cpu .legend > .row > .swatch.sample-type-script):
1266         (.timeline-view.cpu .legend > .row > .swatch.sample-type-style):
1267         (.timeline-view.cpu .legend > .row > .swatch.sample-type-layout):
1268         (.timeline-view.cpu .legend > .row > .swatch.sample-type-paint):
1269         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-idle):
1270         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script):
1271         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-style):
1272         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-layout):
1273         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-paint):
1274         (.timeline-view.cpu svg > path):
1275         (.timeline-view.cpu .main-thread svg > path,):
1276         (.timeline-view.cpu .worker-thread svg > path,):
1277         (.timeline-view.cpu .cpu-usage-view.empty):
1278         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers):
1279         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div):
1280         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div > .label):
1281         (.timeline-view.cpu > .content): Deleted.
1282         (.cpu-usage-view .line-chart > svg > path): Deleted.
1283         (.timeline-view.cpu .legend > .row > .swatch.current): Deleted.
1284         * UserInterface/Views/CPUTimelineView.js:
1285         (WI.CPUTimelineView):
1286         (WI.CPUTimelineView.displayNameForSampleType):
1287         (WI.CPUTimelineView.prototype.shown):
1288         (WI.CPUTimelineView.prototype.clear.clearUsageView):
1289         (WI.CPUTimelineView.prototype.clear):
1290         (WI.CPUTimelineView.prototype.initialLayout.createChartContainer):
1291         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
1292         (WI.CPUTimelineView.prototype.initialLayout):
1293         (WI.CPUTimelineView.prototype.layout.removeGreaterThan):
1294         (WI.CPUTimelineView.prototype.layout):
1295         (WI.CPUTimelineView.prototype.layout.layoutView):
1296         (WI.CPUTimelineView.prototype.layout.yScale):
1297         (WI.CPUTimelineView.prototype._computeSamplingData.markRecordEntries):
1298         (WI.CPUTimelineView.prototype._computeSamplingData):
1299         (WI.CPUTimelineView.prototype._removeWorkerThreadViews):
1300         (WI.CPUTimelineView.prototype._clearBreakdownLegend):
1301         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
1302         Line charts and Circle Chart for threads and breakdowns.
1303
1304         * UserInterface/Views/CPUUsageStackedView.css:
1305         (.cpu-usage-stacked-view):
1306         (.cpu-usage-stacked-view > .details):
1307         (body[dir=ltr] .cpu-usage-stacked-view > .details):
1308         (body[dir=rtl] .cpu-usage-stacked-view > .details):
1309         (.cpu-usage-stacked-view > .details > .name):
1310         (body[dir=rtl] .cpu-usage-stacked-view > .graph):
1311         (.cpu-usage-stacked-view > .graph):
1312         (.cpu-usage-stacked-view > .graph,):
1313         * UserInterface/Views/CPUUsageStackedView.js:
1314         (WI.CPUUsageStackedView):
1315         (WI.CPUUsageStackedView.prototype.get chart):
1316         (WI.CPUUsageStackedView.prototype.clear):
1317         (WI.CPUUsageStackedView.prototype.updateChart):
1318         (WI.CPUUsageStackedView.prototype._updateDetails):
1319         Same as CPUUsageView except Stacked for the total.
1320
1321         * UserInterface/Views/CPUUsageView.css:
1322         (.cpu-usage-view):
1323         (.cpu-usage-view > .details):
1324         (.cpu-usage-view > .details > .name):
1325         (.cpu-usage-view > .graph):
1326         * UserInterface/Views/CPUUsageView.js:
1327         (WI.CPUUsageView):
1328         (WI.CPUUsageView.prototype.get chart):
1329         (WI.CPUUsageView.prototype.clear):
1330         (WI.CPUUsageView.prototype.updateChart):
1331         (WI.CPUUsageView.prototype._updateDetails):
1332         Slight modifications for the new UI.
1333
1334         * UserInterface/Views/LegacyCPUTimelineView.css:
1335         (.timeline-view.legacy-cpu .cpu-usage-view .line-chart > svg > path):
1336         * UserInterface/Views/LegacyCPUTimelineView.js:
1337         (WI.LegacyCPUTimelineView.prototype.layout):
1338         Update API calls in the legacy view for minor changes.
1339
1340         * UserInterface/Views/MemoryCategoryView.css:
1341         (.memory-category-view > .details):
1342         (.memory-category-view > .details > .name):
1343         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
1344         (WI.MemoryTimelineOverviewGraph.prototype.layout):
1345         * UserInterface/Views/MemoryTimelineView.css:
1346         (body .timeline-view.memory):
1347         (.timeline-view.memory): Deleted.
1348         Improvements ported from the CPU timeline views.
1349
1350         * UserInterface/Views/StackedColumnChart.js: Added.
1351         (WI.StackedColumnChart):
1352         (WI.StackedColumnChart.prototype.get size):
1353         (WI.StackedColumnChart.prototype.set size):
1354         (WI.StackedColumnChart.prototype.initializeSections):
1355         (WI.StackedColumnChart.prototype.addColumnSet):
1356         (WI.StackedColumnChart.prototype.clear):
1357         (WI.StackedColumnChart.prototype.layout):
1358         A stacked column chart implementation.
1359
1360         * UserInterface/Views/View.js:
1361         (WI.View.prototype.removeUnparentedSubview):
1362         Add a way to remove a subview that had its `element` moved
1363         someplace other than a direct child of our element.
1364
1365 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
1366
1367         Web Inspector: Dark Mode: Network Overview Graph segments have distracting white box shadow
1368         https://bugs.webkit.org/show_bug.cgi?id=194966
1369
1370         Reviewed by Devin Rousso.
1371
1372         * UserInterface/Views/Variables.css:
1373         (@media (prefers-color-scheme: dark)):
1374         Make global timeline even/odd colors where odd is the default content background
1375         color and even is slightly different. These were used in multiple places.
1376
1377         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1378         (.timeline-overview-graph.cpu > .legend):
1379         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
1380         (@media (prefers-color-scheme: dark)): Deleted.
1381         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
1382         (.timeline-overview-graph.memory > .legend):
1383         (.timeline-overview-graph.memory:nth-child(even) > .legend):
1384         (@media (prefers-color-scheme: dark)): Deleted.
1385         * UserInterface/Views/NetworkTimelineOverviewGraph.css:
1386         (.timeline-overview-graph.network > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
1387         (.timeline-overview-graph.network:nth-child(even) > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
1388         Use the variable colors now and eliminate dark mode blocks.
1389
1390 2019-02-25  Nikita Vasilyev  <nvasilyev@apple.com>
1391
1392         Web Inspector: Styles: Command-/ should toggle edited property
1393         https://bugs.webkit.org/show_bug.cgi?id=194967
1394         <rdar://problem/48329852>
1395
1396         Reviewed by Devin Rousso.
1397
1398         * UserInterface/Models/CSSProperty.js:
1399         (WI.CSSProperty.prototype.commentOut):
1400         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1401         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelect):
1402         * UserInterface/Views/SpreadsheetStyleProperty.js:
1403         (WI.SpreadsheetStyleProperty.prototype.update):
1404         (WI.SpreadsheetStyleProperty.prototype._toggle):
1405         (WI.SpreadsheetStyleProperty.prototype._select):
1406
1407 2019-02-25  Devin Rousso  <drousso@apple.com>
1408
1409         Web Inspector: REGRESSION(r242018): Timelines shows no results
1410         https://bugs.webkit.org/show_bug.cgi?id=195017
1411
1412         Reviewed by Joseph Pecoraro.
1413
1414         `simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.
1415
1416         * UserInterface/Base/SearchUtilities.js:
1417         (WI.SearchUtilities.prototype.regExpForString):
1418         Add assertions that the provided search query is a valid non-empty string.
1419
1420         * UserInterface/Views/DataGrid.js:
1421         (WI.DataGrid.prototype._updateFilter):
1422         If the search query is empty, don't attempt to create a `RegExp` for it.
1423
1424 2019-02-25  Matt Baker  <mattbaker@apple.com>
1425
1426         Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
1427         https://bugs.webkit.org/show_bug.cgi?id=194918
1428         <rdar://problem/48289314>
1429
1430         Reviewed by Devin Rousso.
1431
1432         * UserInterface/Views/Table.js:
1433         (WI.Table.prototype.selectionControllerSelectionDidChange):
1434
1435         * UserInterface/Views/TreeOutline.js:
1436         (WI.TreeOutline.prototype._treeKeyDown):
1437
1438 2019-02-25  Devin Rousso  <drousso@apple.com>
1439
1440         Web Inspector: [META] Merge Resources and Debugger into a single Sources tab
1441         https://bugs.webkit.org/show_bug.cgi?id=183420
1442
1443         Reviewed by Joseph Pecoraro.
1444
1445         * UserInterface/Views/SourcesNavigationSidebarPanel.js: Added.
1446         (WI.SourcesNavigationSidebarPanel):
1447         (WI.SourcesNavigationSidebarPanel.shouldPlaceResourcesAtTopLevel):
1448         (WI.SourcesNavigationSidebarPanel.prototype.get minimumWidth):
1449         (WI.SourcesNavigationSidebarPanel.prototype.closed):
1450         (WI.SourcesNavigationSidebarPanel.prototype.showDefaultContentView):
1451         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
1452         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
1453         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
1454         (WI.SourcesNavigationSidebarPanel.prototype.resetFilter):
1455         (WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
1456         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
1457         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
1458         (WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
1459         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
1460         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
1461         (WI.SourcesNavigationSidebarPanel.prototype._addTarget):
1462         (WI.SourcesNavigationSidebarPanel.prototype._findCallStackTargetTreeElement):
1463         (WI.SourcesNavigationSidebarPanel.prototype._updateCallStackTreeOutline):
1464         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
1465         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
1466         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
1467         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
1468         (WI.SourcesNavigationSidebarPanel.prototype._addDebuggerTreeElementForSourceCode):
1469         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
1470         (WI.SourcesNavigationSidebarPanel.prototype._compareBreakpointTreeElements):
1471         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
1472         (WI.SourcesNavigationSidebarPanel.prototype._removeBreakpoint):
1473         (WI.SourcesNavigationSidebarPanel.prototype._removeAllBreakpoints):
1474         (WI.SourcesNavigationSidebarPanel.prototype._toggleAllBreakpoints):
1475         (WI.SourcesNavigationSidebarPanel.prototype._breakpointsBeneathTreeElement):
1476         (WI.SourcesNavigationSidebarPanel.prototype._addIssue):
1477         (WI.SourcesNavigationSidebarPanel.prototype._removeDebuggerTreeElement):
1478         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
1479         (WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
1480         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
1481         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
1482         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonGotoArrow):
1483         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
1484         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceTypeScopeBarSelectionChanged):
1485         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
1486         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
1487         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked):
1488         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
1489         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceAdded):
1490         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
1491         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointAdded):
1492         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointRemoved):
1493         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointsEnabledDidChange):
1494         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptAdded):
1495         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptRemoved):
1496         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptsCleared):
1497         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
1498         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
1499         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):
1500         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerActiveCallFrameDidChange):
1501         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerWaitingToPause):
1502         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
1503         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateDidChange):
1504         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleIssueAdded):
1505         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleCleared):
1506         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
1507         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
1508         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
1509         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetAdded):
1510         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetRemoved):
1511         (WI.SourcesNavigationSidebarPanel.prototype._handleExtraDomainsActivated):
1512         * UserInterface/Views/SourcesNavigationSidebarPanel.css: Added.
1513         (.sidebar > .panel.navigation.sources > .content):
1514         (.sidebar > .panel.navigation.sources > .navigation-bar):
1515         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints):
1516         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints.activated):
1517         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume):
1518         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume.activated):
1519         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
1520         (.sidebar > .panel.navigation.sources > .content > .details-section):
1521         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
1522         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
1523         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)):
1524         (.sidebar > .panel.navigation.sources > .content > .navigation-bar):
1525         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread):
1526         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread):
1527         (@media (prefers-dark-interface) .sidebar > > .content > .panel.navigation.sources .warning-banner):
1528
1529         * UserInterface/Views/SourcesTabContentView.js: Added.
1530         (WI.SourcesTabContentView):
1531         (WI.SourcesTabContentView.tabInfo):
1532         (WI.SourcesTabContentView.isTabAllowed):
1533         (WI.SourcesTabContentView.prototype.get type):
1534         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
1535         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
1536         (WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
1537         (WI.SourcesTabContentView.prototype.showScopeChainDetailsSidebarPanel):
1538         (WI.SourcesTabContentView.prototype.revealAndSelectBreakpoint):
1539
1540         * UserInterface/Views/CanvasSidebarPanel.js:
1541         (WI.CanvasSidebarPanel):
1542         * UserInterface/Views/DebuggerSidebarPanel.js:
1543         (WI.DebuggerSidebarPanel):
1544         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
1545         * UserInterface/Views/NavigationSidebarPanel.js:
1546         (WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
1547         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
1548         (WI.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
1549         Rework `createContentTreeOutline` to allow for additional symbols.
1550         Add another symbol to ensure that the `WI.TreeOutline` is not used for cookie restoration.
1551
1552         * UserInterface/Protocol/InspectorFrontendAPI.js:
1553         (InspectorFrontendAPI.showResources):
1554         * UserInterface/Views/ContextMenuUtilities.js:
1555         (WI.appendContextMenuItemsForURL):
1556         * UserInterface/Views/DefaultDashboardView.js:
1557         (WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
1558         * UserInterface/Views/SourceCodeTextEditor.js:
1559         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1560
1561         * UserInterface/Views/TabBrowser.js:
1562         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
1563
1564         * UserInterface/Base/Main.js:
1565         (WI.contentLoaded):
1566         (WI.showSourcesTab): Added.
1567         (WI.isShowingSourcesTab): Added.
1568         (WI.tabContentViewClassForRepresentedObject):
1569         (WI._debuggerDidPause):
1570
1571         * UserInterface/Views/DebuggerTabContentView.js:
1572         (WI.DebuggerTabContentView.isTabAllowed):
1573         * UserInterface/Views/ResourcesTabContentView.js:
1574         (WI.ResourcesTabContentView.isTabAllowed):
1575
1576         * UserInterface/Base/Setting.js:
1577         * UserInterface/Views/SettingsTabContentView.js:
1578         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1579
1580         * UserInterface/Main.html:
1581         * UserInterface/Images/Sources.svg: Added.
1582         * Localizations/en.lproj/localizedStrings.js:
1583
1584 2019-02-24  Devin Rousso  <drousso@apple.com>
1585
1586         Web Inspector: Change the InspectorOverlay to use native rather than canvas
1587         https://bugs.webkit.org/show_bug.cgi?id=105023
1588         <rdar://problem/13443692>
1589
1590         Reviewed by Brian Burg.
1591
1592         * UserInterface/Base/Main.js:
1593         (WI.initializeTarget):
1594
1595         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
1596         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
1597         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
1598         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
1599         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
1600         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
1601         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
1602         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
1603         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
1604         * Versions/Inspector-iOS-10.0.json:
1605         * Versions/Inspector-iOS-10.3.json:
1606         * Versions/Inspector-iOS-11.0.json:
1607         * Versions/Inspector-iOS-11.3.json:
1608         * Versions/Inspector-iOS-12.0.json:
1609         * Versions/Inspector-iOS-12.2.json:
1610         * Versions/Inspector-iOS-8.0.json:
1611         * Versions/Inspector-iOS-9.0.json:
1612         * Versions/Inspector-iOS-9.3.json:
1613         Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.
1614
1615 2019-02-24  Devin Rousso  <drousso@apple.com>
1616
1617         Web Inspector: provide a way to make searches case sensitive or use a regular expression
1618         https://bugs.webkit.org/show_bug.cgi?id=192527
1619
1620         Reviewed by Joseph Pecoraro.
1621
1622         * UserInterface/Base/SearchUtilities.js: Added.
1623         (WI.SearchUtilities.get defaultSettings):
1624         (WI.SearchUtilities.createSettings):
1625         (WI.SearchUtilities.regExpForString):
1626         (WI.SearchUtilities.createSettingsButton):
1627         (WI.SearchUtilities.createSettingsButton.toggleActive):
1628         * UserInterface/Views/Main.css:
1629         (.search-settings): Added.
1630         (.search-settings > .glyph): Added.
1631         (.search-settings:active > .glyph): Added.
1632         (.search-settings.active > .glyph): Added.
1633         (.search-settings:active.active > .glyph): Added.
1634         Create static utility class for handling settings related to searching/filtering.
1635
1636         * UserInterface/Base/Setting.js:
1637         * UserInterface/Views/SettingsTabContentView.js:
1638         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1639         Create default search settings that apply across WebInspector, unless a more specific
1640         setting has been created that overrides it (e.g. the navigation sidebar or Search tab).
1641
1642         * UserInterface/Views/SearchSidebarPanel.js:
1643         (WI.SearchSidebarPanel):
1644         (WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
1645         (WI.SearchSidebarPanel.prototype.performSearch.resourceCallback):
1646         (WI.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
1647         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
1648         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts):
1649         (WI.SearchSidebarPanel.prototype.performSearch.domSearchResults):
1650         (WI.SearchSidebarPanel.prototype.performSearch.domCallback):
1651         (WI.SearchSidebarPanel.prototype.performSearch):
1652         * UserInterface/Views/SearchSidebarPanel.css:
1653         (.sidebar > .panel.navigation.search > .search-bar):
1654         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
1655         Add a (*) settings "gear" after each `<input type="search">` that shows a contextmenu with
1656         checkboxes for each search setting. Any settings changed for each input take precedence over
1657         the default settings, but will match the corresponding default setting if it's changed.
1658
1659         * UserInterface/Views/SearchResultTreeElement.js:
1660         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
1661         Use the length of the found text, rather than the length of the query.
1662
1663         * UserInterface/Views/DOMTreeElement.js:
1664         (WI.DOMTreeElement.prototype._highlightSearchResults):
1665         * UserInterface/Views/DataGrid.js:
1666         (WI.DataGrid.prototype._updateFilter):
1667         * UserInterface/Views/LogContentView.js:
1668         (WI.LogContentView.prototype.performSearch):
1669         * UserInterface/Views/NetworkTableContentView.js:
1670         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
1671         * UserInterface/Views/ResourceHeadersContentView.js:
1672         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
1673         * UserInterface/Views/ResourceSecurityContentView.js:
1674         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
1675         * UserInterface/Views/SourceCodeTextEditor.js:
1676         (WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
1677         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
1678         * UserInterface/Views/TextEditor.js:
1679         (WI.TextEditor.prototype.performSearch):
1680         Use the default search settings when searching/filtering.
1681
1682         * UserInterface/Views/SearchBar.css:
1683         (.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Added.
1684         Drive-by: prevent the (x) from appearing when no text has been entered.
1685
1686         * Localizations/en.lproj/localizedStrings.js:
1687         * UserInterface/Main.html:
1688
1689 2019-02-24  Devin Rousso  <drousso@apple.com>
1690
1691         Web Inspector: make debounce Proxy into its own class
1692         https://bugs.webkit.org/show_bug.cgi?id=194721
1693
1694         Reviewed by Joseph Pecoraro.
1695
1696         The `debounce`/`throttle` functions leveraged a `Proxy` to intercept the function call and
1697         replace it with a "delayed" version. The issue with this is that it set the identifier for
1698         the timer on the function itself, which is shared across all instances of a given class.
1699         When different instances call the same delayed function, they'd clobber eachother's attempts
1700         to delay work.
1701
1702         * UserInterface/Base/Debouncer.js: Added.
1703         (Debouncer):
1704         (Debouncer.prototype.force):
1705         (Debouncer.prototype.delayForTime):
1706         (Debouncer.prototype.delayForFrame):
1707         (Debouncer.prototype.delayForMicrotask):
1708         (Debouncer.prototype.cancel):
1709         (Debouncer.prototype._execute):
1710         * UserInterface/Base/Throttler.js: Added.
1711         (Throttler):
1712         (Throttler.prototype.force):
1713         (Throttler.prototype.fire):
1714         (Throttler.prototype.cancel):
1715         (Throttler.prototype._execute):
1716         * UserInterface/Base/Utilities.js:
1717
1718         * UserInterface/Views/BezierEditor.js:
1719         (WI.BezierEditor):
1720         * UserInterface/Views/ContentBrowser.js:
1721         (WI.ContentBrowser):
1722         (WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
1723         (WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
1724         (WI.ContentBrowser.prototype._currentContentViewDidChange):
1725         (WI.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Deleted.
1726         * UserInterface/Views/DOMTreeUpdater.js:
1727         (WI.DOMTreeUpdater):
1728         (WI.DOMTreeUpdater.prototype._nodeAttributeModified):
1729         (WI.DOMTreeUpdater.prototype._nodeInserted):
1730         (WI.DOMTreeUpdater.prototype._nodeRemoved):
1731         * UserInterface/Views/NavigationSidebarPanel.js:
1732         (WI.NavigationSidebarPanel):
1733         (WI.NavigationSidebarPanel.prototype.closed):
1734         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
1735         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
1736         (WI.NavigationSidebarPanel.prototype.updateFilter):
1737         (WI.NavigationSidebarPanel.prototype.shown):
1738         (WI.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
1739         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
1740         (WI.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
1741         * UserInterface/Views/RecordingContentView.js:
1742         (WI.RecordingContentView):
1743         (WI.RecordingContentView.prototype.updateActionIndex):
1744         (WI.RecordingContentView.prototype.hidden):
1745         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1746         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
1747         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
1748         (WI.ResourceDetailsSidebarPanel):
1749         * UserInterface/Views/ShaderProgramContentView.js:
1750         (WI.ShaderProgramContentView):
1751         * UserInterface/Views/SpringEditor.js:
1752         (WI.SpringEditor.prototype._resetPreviewAnimation):
1753         * UserInterface/Views/TreeElement.js:
1754         (WI.TreeElement.prototype.set hidden):
1755         (WI.TreeElement.prototype.didChange):
1756         (WI.TreeElement.prototype._attach):
1757         (WI.TreeElement.prototype._detach):
1758         (WI.TreeElement.prototype.collapse):
1759         (WI.TreeElement.prototype.expand):
1760         (WI.TreeElement.prototype.reveal):
1761         * UserInterface/Views/TreeOutline.js:
1762         (WI.TreeOutline):
1763         (WI.TreeOutline.prototype.registerScrollVirtualizer):
1764         (WI.TreeOutline.prototype.get updateVirtualizedElementsDebouncer): Added.
1765         (WI.TreeOutline.prototype._updateVirtualizedElements): Added.
1766         (WI.TreeOutline.prototype.updateVirtualizedElements.walk): Deleted.
1767         (WI.TreeOutline.prototype.updateVirtualizedElements): Deleted.
1768         * UserInterface/Views/WebSocketContentView.js:
1769         (WI.WebSocketContentView):
1770         (WI.WebSocketContentView.prototype.shown):
1771         (WI.WebSocketContentView.prototype._updateFramesSoon):
1772         (WI.WebSocketContentView.prototype._updateFrames):
1773
1774         * UserInterface/Main.html:
1775         * UserInterface/Test.html:
1776         * .eslintrc:
1777
1778 2019-02-24  Nikita Vasilyev  <nvasilyev@apple.com>
1779
1780         Unreviewed, fix indentation.
1781
1782         * UserInterface/Models/CSSStyleDeclaration.js:
1783         (WI.CSSStyleDeclaration.prototype.markModified):
1784
1785 2019-02-23  Keith Miller  <keith_miller@apple.com>
1786
1787         Add new mac target numbers
1788         https://bugs.webkit.org/show_bug.cgi?id=194955
1789
1790         Reviewed by Tim Horton.
1791
1792         * Configurations/Base.xcconfig:
1793         * Configurations/DebugRelease.xcconfig:
1794
1795 2019-02-22  Devin Rousso  <drousso@apple.com>
1796
1797         Web Inspector: Timelines: add UI for preventing auto-stop
1798         https://bugs.webkit.org/show_bug.cgi?id=194956
1799
1800         Reviewed by Joseph Pecoraro.
1801
1802         Add a checkbox to the navigation area of the Timelines tab that controls whether recordings
1803         automatically stop (e.g. after "load" or a period of inactivity).
1804
1805         * UserInterface/Views/TimelineRecordingContentView.js:
1806         (WI.TimelineRecordingContentView):
1807         (WI.TimelineRecordingContentView.prototype.get navigationItems):
1808         (WI.TimelineRecordingContentView.prototype._handleAutoStopCheckboxCheckedDidChange): Added.
1809         (WI.TimelineRecordingContentView.prototype._handleTimelinesAutoStopSettingChanged): Added.
1810
1811         * UserInterface/Controllers/TimelineManager.js:
1812         (WI.TimelineManager):
1813         (WI.TimelineManager.prototype.capturingStopped):
1814         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
1815         (WI.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
1816         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
1817         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
1818
1819         * UserInterface/Base/Setting.js:
1820         * Localizations/en.lproj/localizedStrings.js:
1821
1822 2019-02-22  Devin Rousso  <drousso@apple.com>
1823
1824         REGRESSION(r?): Web Inspector: Popovers have inset shadows
1825         https://bugs.webkit.org/show_bug.cgi?id=192963
1826         <rdar://problem/46888679>
1827
1828         Reviewed by Brian Burg.
1829
1830         * UserInterface/Views/Popover.js:
1831         (WI.Popover.prototype._drawBackground):
1832         (WI.Popover.prototype._drawBackground.isolate): Added.
1833         * UserInterface/Views/Popover.css:
1834         (.popover):
1835
1836 2019-02-22  Devin Rousso  <drousso@apple.com>
1837
1838         Web Inspector: Styles Redesign: clicking CSS property or selector should always select its text
1839         https://bugs.webkit.org/show_bug.cgi?id=180791
1840         <rdar://problem/36038366>
1841
1842         Reviewed by Brian Burg.
1843
1844         * UserInterface/Views/SpreadsheetSelectorField.js:
1845         (WI.SpreadsheetSelectorField):
1846         (WI.SpreadsheetSelectorField.prototype.startEditing):
1847         (WI.SpreadsheetSelectorField.prototype.stopEditing):
1848         (WI.SpreadsheetSelectorField.prototype._handleMouseDown): Added.
1849         (WI.SpreadsheetSelectorField.prototype._handleMouseUp): Added.
1850         (WI.SpreadsheetSelectorField.prototype._handleFocus): Deleted.
1851
1852         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1853         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
1854         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1855         (.spreadsheet-css-declaration .selector.editing:focus, .spreadsheet-css-declaration .selector > .matched): Added.
1856         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
1857         (.spreadsheet-css-declaration .selector:focus, .spreadsheet-css-declaration .selector > .matched): Deleted.
1858
1859 2019-02-22  Nikita Vasilyev  <nvasilyev@apple.com>
1860
1861         Web Inspector: Dark Mode: DOM Content Loaded blue marker is too dark
1862         https://bugs.webkit.org/show_bug.cgi?id=194970
1863         <rdar://problem/48330126>
1864
1865         Reviewed by Joseph Pecoraro.
1866
1867         * UserInterface/Views/TimelineRuler.css:
1868         (@media (prefers-color-scheme: dark)):
1869         (.timeline-ruler > .markers > .marker.dom-content-event):
1870         Make the marker lighter for the dark mode.
1871
1872 2019-02-22  Joseph Pecoraro  <pecoraro@apple.com>
1873
1874         Web Inspector: Remove unused Timeline record selection code path
1875         https://bugs.webkit.org/show_bug.cgi?id=194931
1876
1877         Reviewed by Devin Rousso.
1878
1879         * UserInterface/Views/TimelineOverview.js:
1880         (WI.TimelineOverview):
1881         (WI.TimelineOverview.prototype.userSelectedRecord): Deleted.
1882         * UserInterface/Views/TimelineRecordingContentView.js:
1883         (WI.TimelineRecordingContentView):
1884         (WI.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord): Deleted.
1885         * UserInterface/Views/TimelineView.js:
1886         (WI.TimelineView.prototype.userSelectedRecordFromOverview): Deleted.
1887
1888 2019-02-21  Darin Adler  <darin@apple.com>
1889
1890         Some refinements for Node and Document
1891         https://bugs.webkit.org/show_bug.cgi?id=194764
1892
1893         Reviewed by Ryosuke Niwa.
1894
1895         * UserInterface/Models/NativeFunctionParameters.js: Removed getOverrideStyle
1896         because this deprecated non-working function is no longer something web authors
1897         should be thinking about or typing.
1898
1899 2019-02-21  Devin Rousso  <drousso@apple.com>
1900
1901         Web Inspector: Canvas: recordings with a single frame sometimes missing TreeElement
1902         https://bugs.webkit.org/show_bug.cgi?id=194687
1903
1904         Reviewed by Joseph Pecoraro.
1905
1906         * UserInterface/Views/CanvasSidebarPanel.js:
1907         (WI.CanvasSidebarPanel):
1908         Wait until the entire `Recording` has been processed before setting the selected action.
1909
1910         * UserInterface/Views/CanvasSidebarPanel.css:
1911         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
1912         Drive-by: ensure that the recording `TreeOutline` container element has the full height to
1913         take advantage of for virtualization.
1914
1915         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
1916         (WI.RecordingStateDetailsSidebarPanel.prototype.set recording):
1917         Drive-by: clear the `DataGrid` list when changing recordings since we removed all subviews.
1918
1919 2019-02-21  Devin Rousso  <drousso@apple.com>
1920
1921         Web Inspector: DOM Debugger: node-specific event breakpoints aren't cleared/recalculated on navigation
1922         https://bugs.webkit.org/show_bug.cgi?id=194874
1923         <rdar://problem/48253415>
1924
1925         Reviewed by Joseph Pecoraro.
1926
1927         * UserInterface/Controllers/DOMManager.js:
1928         (WI.DOMManager.prototype._setDocument):
1929         (WI.DOMManager.prototype.removeBreakpointForEventListener):
1930
1931 2019-02-21  Devin Rousso  <drousso@apple.com>
1932
1933         Web Inspector: macOS user agent option should be available in device settings menu
1934         https://bugs.webkit.org/show_bug.cgi?id=194885
1935         <rdar://problem/48259253>
1936
1937         Reviewed by Joseph Pecoraro.
1938
1939         * UserInterface/Base/Main.js:
1940         (WI._handleDeviceSettingsToolbarButtonClicked):
1941
1942 2019-02-20  Joseph Pecoraro  <pecoraro@apple.com>
1943
1944         Web Inspector: RTL: Scripts Timeline loading indicator has incorrect margins
1945         https://bugs.webkit.org/show_bug.cgi?id=194882
1946
1947         Reviewed by Matt Baker.
1948
1949         * UserInterface/Views/TimelineRecordingContentView.css:
1950         (.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
1951
1952 2019-02-20  Andy Estes  <aestes@apple.com>
1953
1954         [Xcode] Add SDKVariant.xcconfig to various Xcode projects
1955         https://bugs.webkit.org/show_bug.cgi?id=194869
1956
1957         Rubber-stamped by Jer Noble.
1958
1959         * WebInspectorUI.xcodeproj/project.pbxproj:
1960
1961 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
1962
1963         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
1964         https://bugs.webkit.org/show_bug.cgi?id=172848
1965         <rdar://problem/25709212>
1966
1967         Reviewed by Mark Lam.
1968
1969         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1970         (HeapSnapshot):
1971         Support the new snapshot version. The only thing that changes are the
1972         node flags, and its actually completely compatible with version 1.
1973
1974         (HeapSnapshot.updateCategoriesAndMetadata):
1975         List the count of object type instances in each class category.
1976
1977         (HeapSnapshot.prototype.serializeNode):
1978         Include whether or not the node is an object type.
1979
1980         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
1981         (WebInspector.HeapSnapshotNodeProxy):
1982         (WebInspector.HeapSnapshotNodeProxy.deserialize):
1983         Add a new Node isObjectType property based on the new data.
1984
1985         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
1986         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
1987         * UserInterface/Views/HeapSnapshotClusterContentView.js:
1988         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
1989         If a class contains 50% or more object type instances then treat it as such
1990         instead of defaulting to native.
1991
1992         * UserInterface/Views/HeapSnapshotDataGridTree.js:
1993         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
1994         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1995         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
1996         We can be more specific than the default if the individual instance is
1997         known to be an object type.
1998
1999 2019-02-19  Truitt Savell  <tsavell@apple.com>
2000
2001         Unreviewed, rolling out r241784.
2002
2003         Broke all OpenSource builds.
2004
2005         Reverted changeset:
2006
2007         "Web Inspector: Improve ES6 Class instances in Heap Snapshot
2008         instances view"
2009         https://bugs.webkit.org/show_bug.cgi?id=172848
2010         https://trac.webkit.org/changeset/241784
2011
2012 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2013
2014         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
2015         https://bugs.webkit.org/show_bug.cgi?id=172848
2016         <rdar://problem/25709212>
2017
2018         Reviewed by Mark Lam.
2019
2020         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2021         (HeapSnapshot):
2022         Support the new snapshot version. The only thing that changes are the
2023         node flags, and its actually completely compatible with version 1.
2024
2025         (HeapSnapshot.updateCategoriesAndMetadata):
2026         List the count of object type instances in each class category.
2027
2028         (HeapSnapshot.prototype.serializeNode):
2029         Include whether or not the node is an object type.
2030
2031         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
2032         (WebInspector.HeapSnapshotNodeProxy):
2033         (WebInspector.HeapSnapshotNodeProxy.deserialize):
2034         Add a new Node isObjectType property based on the new data.
2035
2036         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
2037         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
2038         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2039         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
2040         If a class contains 50% or more object type instances then treat it as such
2041         instead of defaulting to native.
2042
2043         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2044         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
2045         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2046         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2047         We can be more specific than the default if the individual instance is
2048         known to be an object type.
2049
2050 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2051
2052         Web Inspector: Scripts timeline on-going-recording text looks poor in dark mode
2053         https://bugs.webkit.org/show_bug.cgi?id=194809
2054
2055         Reviewed by Matt Baker.
2056
2057         * UserInterface/Views/TimelineRecordingContentView.css:
2058         (.content-view.timeline-recording > .content-browser .recording-progress > .status):
2059
2060 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
2061
2062         Web Inspector: Provide a way to avoid a recording auto-stop on reload
2063         https://bugs.webkit.org/show_bug.cgi?id=194793
2064
2065         Reviewed by Matt Baker.
2066
2067         * Localizations/en.lproj/localizedStrings.js:
2068         New tooltip.
2069
2070         * UserInterface/Controllers/TimelineManager.js:
2071         (WI.TimelineManager.prototype.willAutoStop):
2072         (WI.TimelineManager.prototype.relaxAutoStop):
2073         Getter and relaxer for auto stop behavior.
2074
2075         * UserInterface/Views/AuditNavigationSidebarPanel.js:
2076         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
2077         Drive-by fix some whitespace issues.
2078
2079         * UserInterface/Views/TimelineTabContentView.js:
2080         (WI.TimelineTabContentView):
2081         (WI.TimelineTabContentView.prototype._showRecordButton):
2082         (WI.TimelineTabContentView.prototype._showContinueButton):
2083         (WI.TimelineTabContentView.prototype._updateNavigationBarButtons):
2084         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped):
2085         (WI.TimelineTabContentView.prototype._globalModifierKeysDidChange):
2086         (WI.TimelineTabContentView.prototype._continueButtonClicked):
2087         Show a "continue" like icon instead of the usual stop button when
2088         a recording would auto-stop and the alt key is down. When pressed
2089         this button will relax the auto-stop and continue the recording
2090         until explicitly stopped by the user.
2091
2092 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
2093
2094         Web Inspector: Fix a typo causing assertions in ConsoleManager
2095         https://bugs.webkit.org/show_bug.cgi?id=194792
2096
2097         Reviewed by Matt Baker.
2098
2099         * UserInterface/Controllers/ConsoleManager.js:
2100         (WI.ConsoleManager.prototype.initializeLogChannels):
2101         Extra comma produced an undefined value in the list.
2102
2103 2019-02-18  Nikita Vasilyev  <nvasilyev@apple.com>
2104
2105         Web Inspector: Styles: typing ";" shouldn't focus on the next property when there's open parenthesis or comment
2106         https://bugs.webkit.org/show_bug.cgi?id=194789
2107
2108         Reviewed by Matt Baker.
2109
2110         * UserInterface/Views/SpreadsheetStyleProperty.js:
2111         (WI.SpreadsheetStyleProperty.prototype._handleValueBeforeInput):
2112
2113 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
2114
2115         Web Inspector: Better categorize CPU usage per-thread / worker
2116         https://bugs.webkit.org/show_bug.cgi?id=194564
2117
2118         Reviewed by Devin Rousso.
2119
2120         * UserInterface/Controllers/TimelineManager.js:
2121         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
2122         * UserInterface/Models/CPUTimelineRecord.js:
2123         (WI.CPUTimelineRecord.prototype.get mainThreadUsage):
2124         (WI.CPUTimelineRecord.prototype.get webkitThreadUsage):
2125         (WI.CPUTimelineRecord.prototype.get workerThreadUsage):
2126         (WI.CPUTimelineRecord.prototype.get unknownThreadUsage):
2127         Build a better record from the protocol events.
2128
2129 2019-02-18  Devin Rousso  <drousso@apple.com>
2130
2131         Web Inspector: duplicate left double quotation mark (\u201C) in 'Unable to show certificate for ā€œ%sā€œ.'
2132         https://bugs.webkit.org/show_bug.cgi?id=194782
2133         <rdar://problem/48159683>
2134
2135         Reviewed by Joseph Pecoraro.
2136
2137         * UserInterface/Models/Resource.js:
2138         (WI.Resource.prototype.async showCertificate):
2139         * Localizations/en.lproj/localizedStrings.js:
2140
2141 2019-02-18  Eric Carlson  <eric.carlson@apple.com>
2142
2143         Add MSE logging configuration
2144         https://bugs.webkit.org/show_bug.cgi?id=194719
2145         <rdar://problem/48122151>
2146
2147         Reviewed by Joseph Pecoraro.
2148
2149         * Localizations/en.lproj/localizedStrings.js:
2150         * UserInterface/Models/ConsoleMessage.js:
2151         * UserInterface/Models/IssueMessage.js:
2152         (WI.IssueMessage):
2153         * UserInterface/Views/LogContentView.js:
2154         (WI.LogContentView):
2155         * UserInterface/Views/SettingsTabContentView.js:
2156         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2157
2158 2019-02-17  Nikita Vasilyev  <nvasilyev@apple.com>
2159
2160         Web Inspector: Move CSS completion logic from SpreadsheetTextField to SpreadsheetStyleProperty
2161         https://bugs.webkit.org/show_bug.cgi?id=194724
2162
2163         Reviewed by Devin Rousso.
2164
2165         Move CSS value completion logic from SpreadsheetTextField, a generic text field,
2166         to SpreadsheetStyleProperty.
2167
2168         * UserInterface/Views/SpreadsheetStyleProperty.js:
2169         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
2170         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
2171
2172         * UserInterface/Views/SpreadsheetTextField.js:
2173         (WI.SpreadsheetTextField):
2174         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
2175         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
2176         (WI.SpreadsheetTextField.prototype._updateCompletions):
2177         (WI.SpreadsheetTextField.prototype._showSuggestionsView):
2178         (WI.SpreadsheetTextField.prototype._getCompletionPrefix): Deleted.
2179
2180 2019-02-17  Matt Baker  <mattbaker@apple.com>
2181
2182         Web Inspector: Frontend performance is very slow reloading theverge.com - 50% of time in TreeOutline _indexOfTreeElement
2183         https://bugs.webkit.org/show_bug.cgi?id=193605
2184         <rdar://problem/47403986>
2185
2186         Reviewed by Devin Rousso.
2187
2188         SelectionController should track an unordered Set of represented objects
2189         instead of an ordered set of indexes. This eliminates the costly and
2190         error-prone updates needed to keep the selected indexes in sync as items
2191         are added and removed from TreeOutline (and Table, to a far lesser extent).
2192
2193         The SelectionController interface is largely the same. Class and delegate
2194         methods have been renamed to reflect the change from indexes to objects.
2195         SelectionController tracks selected items in selection order. For the
2196         operations that rely on objects being in insertion order, the controller
2197         uses a comparator function provided at construction time.
2198
2199         * UserInterface/Base/IndexSet.js: Removed.
2200         No longer used. SelectionController now uses a plain Set.
2201
2202         * UserInterface/Base/Utilities.js:
2203         (value):
2204         (get return):
2205         Add utilities previously supplied by IndexSet and used by SelectionController.
2206
2207         * UserInterface/Controllers/SelectionController.js:
2208         (WI.SelectionController):
2209         (WI.SelectionController.prototype.get lastSelectedItem):
2210         (WI.SelectionController.prototype.get selectedItems):
2211         (WI.SelectionController.prototype.set allowsMultipleSelection):
2212         (WI.SelectionController.prototype.hasSelectedItem):
2213         (WI.SelectionController.prototype.selectItem):
2214         (WI.SelectionController.prototype.deselectItem):
2215         (WI.SelectionController.prototype.selectAll):
2216         (WI.SelectionController.prototype.deselectAll):
2217         (WI.SelectionController.prototype.removeSelectedItems):
2218         (WI.SelectionController.prototype.reset):
2219         (WI.SelectionController.prototype.didRemoveItems):
2220         (WI.SelectionController.prototype.handleKeyDown):
2221         (WI.SelectionController.prototype.handleItemMouseDown):
2222         (WI.SelectionController.prototype._deselectAllAndSelect):
2223         (WI.SelectionController.prototype._selectItemsFromArrowKey):
2224         (WI.SelectionController.prototype._firstSelectableItem):
2225         (WI.SelectionController.prototype._lastSelectableItem):
2226         (WI.SelectionController.prototype._previousSelectableItem):
2227         (WI.SelectionController.prototype._nextSelectableItem):
2228         (WI.SelectionController.prototype._updateSelectedItems):
2229         (WI.SelectionController.prototype._addRange):
2230         (WI.SelectionController.prototype._deleteRange):
2231         (WI.SelectionController.prototype.get numberOfItems): Deleted.
2232         (WI.SelectionController.prototype.didInsertItem): Deleted.
2233         (WI.SelectionController.prototype.handleItemMouseDown.normalizeRange): Deleted.
2234         (WI.SelectionController.prototype._nextSelectableIndex): Deleted.
2235         (WI.SelectionController.prototype._previousSelectableIndex): Deleted.
2236
2237         * UserInterface/Main.html:
2238         * UserInterface/Test.html:
2239         Remove IndexSet.
2240
2241         * UserInterface/Views/CookieStorageContentView.js:
2242         (WI.CookieStorageContentView.prototype.tableIndexForRepresentedObject):
2243         (WI.CookieStorageContentView.prototype.tableRepresentedObjectForIndex):
2244
2245         * UserInterface/Views/DOMTreeOutline.js:
2246         (WI.DOMTreeOutline.prototype.objectForSelection):
2247
2248         * UserInterface/Views/NetworkTableContentView.js:
2249         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
2250         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
2251
2252         * UserInterface/Views/Table.js:
2253         (WI.Table):
2254         (WI.Table.prototype.get selectedRow):
2255         (WI.Table.prototype.get selectedRows):
2256         (WI.Table.prototype.isRowSelected):
2257         (WI.Table.prototype.selectRow):
2258         (WI.Table.prototype.deselectRow):
2259         (WI.Table.prototype.removeRow):
2260         (WI.Table.prototype.removeSelectedRows):
2261         (WI.Table.prototype.selectionControllerSelectionDidChange):
2262         (WI.Table.prototype.selectionControllerFirstSelectableItem):
2263         (WI.Table.prototype.selectionControllerLastSelectableItem):
2264         (WI.Table.prototype.selectionControllerPreviousSelectableItem):
2265         (WI.Table.prototype.selectionControllerNextSelectableItem):
2266         (WI.Table.prototype._handleMouseDown):
2267         (WI.Table.prototype._removeRows):
2268         (WI.Table.prototype._indexForRepresentedObject):
2269         (WI.Table.prototype._representedObjectForIndex):
2270         (WI.Table.prototype.selectionControllerNumberOfItems): Deleted.
2271         (WI.Table.prototype.selectionControllerNextSelectableIndex): Deleted.
2272         (WI.Table.prototype.selectionControllerPreviousSelectableIndex): Deleted.
2273         (WI.Table.prototype._toggleSelectedRowStyle): Deleted.
2274
2275         * UserInterface/Views/TreeOutline.js:
2276         (WI.TreeOutline.compareSiblings):
2277         (WI.TreeOutline):
2278         (WI.TreeOutline.prototype.get selectedTreeElement):
2279         (WI.TreeOutline.prototype.set selectedTreeElement):
2280         (WI.TreeOutline.prototype.get selectedTreeElements):
2281         (WI.TreeOutline.prototype.removeChildAtIndex):
2282         (WI.TreeOutline.prototype.removeChildren):
2283         (WI.TreeOutline.prototype._rememberTreeElement):
2284         (WI.TreeOutline.prototype.getCachedTreeElement):
2285         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
2286         (WI.TreeOutline.prototype.selectionControllerFirstSelectableItem):
2287         (WI.TreeOutline.prototype.selectionControllerLastSelectableItem):
2288         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
2289         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
2290         (WI.TreeOutline.prototype.objectForSelection):
2291         (WI.TreeOutline._generateStyleRulesIfNeeded):
2292         (WI.TreeOutline.prototype.selectionControllerNextSelectableIndex): Deleted.
2293         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableIndex): Deleted.
2294         (WI.TreeOutline._generateStyleRulesIfNeeded._indexesForSubtree.numberOfElementsInSubtree): Deleted.
2295
2296 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
2297
2298         Web Inspector: Logging a native function to the console, such as `alert`, produces unhandled rejection
2299         https://bugs.webkit.org/show_bug.cgi?id=194740
2300
2301         Reviewed by Matt Baker.
2302
2303         * UserInterface/Protocol/RemoteObject.js:
2304         (WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
2305         In case of a protocol error (common when attempting to get a location
2306         for a native function) produce the NoSourceFound result.
2307
2308         * UserInterface/Views/ConsoleMessageView.js:
2309         (WI.ConsoleMessageView.prototype._appendLocationLink):
2310         Simplify with an arrow function.
2311
2312 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
2313
2314         Web Inspector: Some timelines views work, show Legacy CPU timeline
2315         https://bugs.webkit.org/show_bug.cgi?id=194738
2316
2317         Reviewed by Yusuke Suzuki.
2318
2319         * UserInterface/Views/ContentView.js:
2320         (WI.ContentView.createFromRepresentedObject):
2321
2322 2019-02-15  Aaron Chu  <aaron_chu@apple.com>
2323
2324         AX: Audit tab should have built-in accessibility tests.
2325         https://bugs.webkit.org/show_bug.cgi?id=194005
2326         <rdar://problem/47657503>
2327
2328         Updated built-in accessibility audits test suite.
2329
2330         Reviewed by Devin Rousso.
2331
2332         * Localizations/en.lproj/localizedStrings.js:
2333         * UserInterface/Controllers/AuditManager.js:
2334         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2335         (WI.AuditManager):
2336         (WI.AuditManager.prototype.addDefaultTestsIfNeeded.): Deleted.
2337
2338 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
2339
2340         Web Inspector: Dark Mode: commas in CSS selectors are too dim
2341         https://bugs.webkit.org/show_bug.cgi?id=194729
2342         <rdar://problem/48128592>
2343
2344         Reviewed by Matt Baker.
2345
2346         Use `--text-color-tertiary` for both light and dark modes.
2347
2348         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2349         (.spreadsheet-style-declaration-editor):
2350         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2351         (.spreadsheet-css-declaration):
2352         (.spreadsheet-css-declaration .selector > span):
2353         (@media (prefers-color-scheme: dark)):
2354         * UserInterface/Views/Variables.css:
2355         (:root):
2356
2357 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
2358
2359         Unreviewed, fix intentation.
2360
2361         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
2362         (.sidebar > .panel.details.css-style .rules):
2363         (.sidebar > .panel.details.css-style > .content > .rules .section-header):
2364
2365 2019-02-15  Dean Jackson  <dino@apple.com>
2366
2367         Allow emulation of user gestures from Web Inspector console
2368         https://bugs.webkit.org/show_bug.cgi?id=194725
2369         <rdar://problem/48126604>
2370
2371         Reviewed by Joseph Pecoraro and Devin Rousso.
2372
2373         Add some UI for emulating a User Gesture when evaluating in the console. This
2374         allows the developer to do things that would otherwise require actual interaction
2375         with the page, such as start playback of media on iOS.
2376
2377         * Localizations/en.lproj/localizedStrings.js:
2378         * UserInterface/Base/Setting.js: Add a new setting for this option.
2379         * UserInterface/Controllers/JavaScriptLogViewController.js:
2380         (WI.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
2381         * UserInterface/Controllers/RuntimeManager.js: Call evaluate with this new option.
2382         (WI.RuntimeManager.prototype.evaluateInInspectedWindow):
2383         * UserInterface/Views/LogContentView.js: Add a new checkbox in the upper bar
2384         that allows the user to toggle the setting.
2385         (WI.LogContentView):
2386         (WI.LogContentView.prototype.get navigationItems):
2387         (WI.LogContentView.prototype._handleEmulateInUserGestureSettingChanged):
2388
2389         * UserInterface/Views/NetworkTableContentView.js: Two drive-by typo fixes :)
2390         (WI.NetworkTableContentView): perserve -> preserve
2391         (WI.NetworkTableContentView.prototype.get navigationItems): checkboxs -> checkboxes
2392
2393 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
2394
2395         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
2396         https://bugs.webkit.org/show_bug.cgi?id=194619
2397         <rdar://problem/47917373>
2398
2399         Reviewed by Devin Rousso.
2400
2401         Payload of inline styles may contain `range` that doesn't match
2402         the actual text of the payload - it has an extra empty line at the end.
2403         Mismatching ranges caused data corruption.
2404
2405         * UserInterface/Models/DOMNodeStyles.js:
2406         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
2407
2408 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
2409
2410         Web Inspector: remove unused parameter in _parseStylePropertyPayload
2411         https://bugs.webkit.org/show_bug.cgi?id=194642
2412
2413         Reviewed by Devin Rousso.
2414
2415         * UserInterface/Models/DOMNodeStyles.js:
2416         (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
2417         The `styleText` parameter was never used
2418
2419 2019-02-15  Devin Rousso  <drousso@apple.com>
2420
2421         Web Inspector: Canvas: all actions after an offscreen path modification are marked as offscreen path errors
2422         https://bugs.webkit.org/show_bug.cgi?id=194684
2423
2424         Reviewed by Joseph Pecoraro.
2425
2426         * UserInterface/Models/RecordingAction.js:
2427         (WI.RecordingAction.prototype.process):
2428
2429 2019-02-15  Devin Rousso  <drousso@apple.com>
2430
2431         Web Inspector: Canvas: taking a second recording doesn't select the Initial State by default
2432         https://bugs.webkit.org/show_bug.cgi?id=194685
2433
2434         Reviewed by Matt Baker.
2435
2436         * UserInterface/Views/CanvasSidebarPanel.js:
2437         (WI.CanvasSidebarPanel.prototype._recordingChanged):
2438
2439 2019-02-14  Commit Queue  <commit-queue@webkit.org>
2440
2441         Unreviewed, rolling out r241497.
2442         https://bugs.webkit.org/show_bug.cgi?id=194676
2443
2444         New test times out (Requested by NVI on #webkit).
2445
2446         Reverted changeset:
2447
2448         "Web Inspector: Styles: valid values in style attributes are
2449         reported as unsupported property values"
2450         https://bugs.webkit.org/show_bug.cgi?id=194619
2451         https://trac.webkit.org/changeset/241497
2452
2453 2019-02-13  Nikita Vasilyev  <nvasilyev@apple.com>
2454
2455         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
2456         https://bugs.webkit.org/show_bug.cgi?id=194619
2457         <rdar://problem/47917373>
2458
2459         Reviewed by Devin Rousso.
2460
2461         Payload of inline styles may contain `range` that doesn't match
2462         the actual text of the payload - it has an extra empty line at the end.
2463         Mismatching ranges caused data corruption.
2464
2465         * UserInterface/Models/DOMNodeStyles.js:
2466         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
2467
2468 2019-02-13  Joseph Pecoraro  <pecoraro@apple.com>
2469
2470         Web Inspector: Update combined and minified copyright header for 2018-2019
2471         https://bugs.webkit.org/show_bug.cgi?id=194635
2472
2473         Reviewed by Devin Rousso.
2474
2475         * Scripts/copy-user-interface-resources.pl:
2476
2477 2019-02-13  Chris Dumez  <cdumez@apple.com>
2478
2479         Unreviewed, update localizable strings.
2480
2481         * Localizations/en.lproj/localizedStrings.js:
2482
2483 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2484
2485         Web Inspector: Experimental setting for CPU Usage Timeline improvements
2486         https://bugs.webkit.org/show_bug.cgi?id=194556
2487
2488         Reviewed by Matt Baker.
2489
2490         * UserInterface/Main.html:
2491         * UserInterface/Views/LegacyCPUTimelineView.css: Added.
2492         * UserInterface/Views/LegacyCPUTimelineView.js: Added.
2493         Copy of CPUTimelineView.js/css to be used when the setting is not set.
2494
2495         * UserInterface/Views/ContentView.js:
2496         (WI.ContentView.createFromRepresentedObject):
2497         ContentView to create based on the setting.
2498
2499         * UserInterface/Base/Setting.js:
2500         * UserInterface/Views/SettingsTabContentView.js:
2501         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2502         Experimental switch.
2503
2504 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2505
2506         Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most records do not have
2507         https://bugs.webkit.org/show_bug.cgi?id=194549
2508
2509         Reviewed by Devin Rousso.
2510
2511         * UserInterface/Models/Timeline.js:
2512         (WI.Timeline.prototype.recordsInTimeRange):
2513
2514 2019-02-12  Devin Rousso  <drousso@apple.com>
2515
2516         Web Inspector: Timelines: clicking on an empty space in the overview should deselect any selected record bar
2517         https://bugs.webkit.org/show_bug.cgi?id=194365
2518         <rdar://problem/47868426>
2519
2520         Reviewed by Joseph Pecoraro.
2521
2522         * UserInterface/Views/TimelineRecordBar.js:
2523         (WI.TimelineRecordBar.prototype._handleClick):
2524         Mark the "click" event so that later listeners know it was handled by `WI.TimelineRecordBar`.
2525
2526         * UserInterface/Views/TimelineOverview.js:
2527         (WI.TimelineOverview):
2528         (WI.TimelineOverview.prototype._instrumentAdded):
2529         (WI.TimelineOverview.prototype._instrumentRemoved):
2530         (WI.TimelineOverview.prototype._handleGraphsContainerClick): Added.
2531         (WI.TimelineOverview.prototype._handleOverviewGraphRecordSelected): Added.
2532         (WI.TimelineOverview.prototype._recordSelected):
2533         Listen for "click" on the graph container and deselect all records when fired, unless the
2534         click was marked by a `WI.TimelineRecordBar`.
2535
2536         * UserInterface/Views/TimelineRecordingContentView.js:
2537         (WI.TimelineRecordingContentView.prototype._recordSelected):
2538         Ensure that all `WI.TimelineView` update their selected record whenever it changes for any
2539         other `WI.TimelineView` (or if there is no selected record).
2540
2541         * UserInterface/Views/TimelineOverviewGraph.js:
2542         (WI.TimelineOverviewGraph.prototype.didLayoutSubtree): Added.
2543         Drive-by: since `WI.TimelineRecordBar` are reused when combining, we need to re-determine
2544         which one holds the currently selected record.
2545
2546 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2547
2548         Web Inspector: Remove unused maxUsage in CPUTimelineView
2549         https://bugs.webkit.org/show_bug.cgi?id=194526
2550
2551         Reviewed by Devin Rousso.
2552
2553         * UserInterface/Views/CPUTimelineView.js:
2554         (WI.CPUTimelineView):
2555         (WI.CPUTimelineView.prototype.shown):
2556
2557 2019-02-11  Devin Rousso  <drousso@apple.com>
2558
2559         Web Inspector: add context menu items to copy a resource's HTTP request/response data
2560         https://bugs.webkit.org/show_bug.cgi?id=194261
2561         <rdar://problem/21693696>
2562
2563         Reviewed by Joseph Pecoraro.
2564
2565         * UserInterface/Models/Resource.js:
2566         (WI.Resource.prototype.stringifyHTTPRequest): Added.
2567         (WI.Resource.prototype.stringifyHTTPResponse): Added.
2568         Don't include the request/response data, as that can be very large, and can easily be
2569         accessed by actually selecting the resource in the Resources/Network tab.
2570
2571         * UserInterface/Views/ContextMenuUtilities.js:
2572         (WI.appendContextMenuItemsForSourceCode):
2573
2574         * Localizations/en.lproj/localizedStrings.js:
2575
2576 2019-02-08  Devin Rousso  <drousso@apple.com>
2577
2578         Web Inspector: Audit: show keyboard shortcut in export tooltip
2579         https://bugs.webkit.org/show_bug.cgi?id=194454
2580
2581         Reviewed by Matt Baker.
2582
2583         * UserInterface/Views/AuditTestContentView.js:
2584         (WI.AuditTestContentView):
2585         (WI.AuditTestContentView.prototype.get saveData):
2586         (WI.AuditTestContentView.prototype._exportResult): Added.
2587         (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
2588         (WI.AuditTestContentView.prototype._exportAudit): Deleted.
2589
2590         * Localizations/en.lproj/localizedStrings.js:
2591
2592 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
2593
2594         Web Inspector: Styles: easier way to select a single line
2595         https://bugs.webkit.org/show_bug.cgi?id=193305
2596
2597         Reviewed by Devin Rousso.
2598
2599         Start property selection after mousedown when mouse cursor moves 8px,
2600         which is ~1.5 times the width of a text character in the style editor.
2601
2602         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2603         (WI.SpreadsheetCSSStyleDeclarationSection):
2604         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
2605         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
2606         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
2607
2608 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
2609
2610         Web Inspector: Debugger Popover should work with value in template string `${identifier}`
2611         https://bugs.webkit.org/show_bug.cgi?id=194459
2612         <rdar://problem/47932564>
2613
2614         Reviewed by Devin Rousso.
2615
2616         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
2617         (WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
2618         When walking backwards to get the full expression we were walking outside
2619         of the interpolation group `outside ${inside}`. Stop walking backwards once
2620         we cross the boundary.
2621
2622 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
2623
2624         Web Inspector: Import / Export Heap Snapshots
2625         https://bugs.webkit.org/show_bug.cgi?id=194448
2626         <rdar://problem/47928093>
2627
2628         Reviewed by Devin Rousso.
2629
2630         * Localizations/en.lproj/localizedStrings.js:
2631         New strings.
2632
2633         * UserInterface/Proxies/HeapSnapshotProxy.js:
2634         (WI.HeapSnapshotProxy):
2635         (WI.HeapSnapshotProxy.deserialize):
2636         (WI.HeapSnapshotProxy.prototype.get imported):
2637         (WI.HeapSnapshotProxy.prototype.get snapshotStringData):
2638         (WI.HeapSnapshotProxy.prototype.set snapshotStringData):
2639         Include an "imported" state on the HeapSnapshot and allow for
2640         stashing the snapshotStringData on the main thread side.
2641
2642         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
2643         (WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):
2644         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
2645         (HeapSnapshotWorker.prototype.clearSnapshots):
2646         (HeapSnapshotWorker.prototype.createSnapshot):
2647         Provide a specialized way to create an imported HeapSnapshot.
2648         Track imported snapshots separately since they won't want to
2649         be searched for live/dead objects due to active recording GCs.
2650
2651         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2652         (HeapSnapshot):
2653         (HeapSnapshot.updateCategoriesAndMetadata):
2654         (HeapSnapshot.allocationBucketCounts):
2655         (HeapSnapshot.instancesWithClassName):
2656         (HeapSnapshot.prototype.nodeWithIdentifier):
2657         (HeapSnapshot.prototype.dominatedNodes):
2658         (HeapSnapshot.prototype.retainedNodes):
2659         (HeapSnapshot.prototype.retainers):
2660         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
2661         (HeapSnapshot.prototype.serialize):
2662         (HeapSnapshot.prototype.serializeNode):
2663         (HeapSnapshot.prototype._buildPostOrderIndexes):
2664         (HeapSnapshot.prototype._buildDominatorIndexes):
2665         (HeapSnapshot.prototype._buildRetainedSizes):
2666         (HeapSnapshot.prototype._gcRootPathes.visitNode):
2667         (HeapSnapshot.prototype._gcRootPathes):
2668         Construct a HeapSnapshot knowinng whether or not it is imported.
2669         Imported snapshots may be the "GCDebugging" snapshot type which
2670         differs from "Inspector" by the number of node fields. So keep
2671         the node field count a member instead of a global constant
2672         in order to work with both snapshot types.
2673
2674         * UserInterface/Models/HeapAllocationsInstrument.js:
2675         (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
2676         * UserInterface/Protocol/ConsoleObserver.js:
2677         (WI.ConsoleObserver.prototype.heapSnapshot):
2678         * UserInterface/Protocol/HeapObserver.js:
2679         (WI.HeapObserver.prototype.trackingStart):
2680         (WI.HeapObserver.prototype.trackingComplete):
2681         Stash the original string JSON data on the main thread side
2682         where we already have the data.
2683
2684         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
2685         (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
2686         Don't show [S] icons for imported snapshots with no timestamp.
2687
2688         * UserInterface/Views/HeapAllocationsTimelineView.js:
2689         (WI.HeapAllocationsTimelineView):
2690         (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
2691         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
2692         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
2693         Import button that just creates a new snapshot.
2694
2695         * UserInterface/Views/HeapSnapshotContentView.js:
2696         (WI.HeapSnapshotContentView):
2697         (WI.HeapSnapshotContentView.prototype.get navigationItems):
2698         (WI.HeapSnapshotContentView.prototype.get supportsSave):
2699         (WI.HeapSnapshotContentView.prototype.get saveData):
2700         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
2701         Export button that saves the original data.
2702
2703         * UserInterface/Views/TimelineTabContentView.js:
2704         (WI.TimelineTabContentView.displayNameForRecord):
2705         Specialized display string for imported snapshots.
2706
2707 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
2708
2709         Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
2710         https://bugs.webkit.org/show_bug.cgi?id=194445
2711
2712         Reviewed by Devin Rousso.
2713
2714         * UserInterface/Base/Setting.js:
2715         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2716         (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
2717         * UserInterface/Views/SettingsTabContentView.js:
2718         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
2719
2720 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
2721
2722         Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
2723         https://bugs.webkit.org/show_bug.cgi?id=182523
2724         <rdar://problem/37260209>
2725
2726         Reviewed by Devin Rousso.
2727
2728         Close CSS comments, append missing closed quotes and right parenthesis.
2729
2730         * UserInterface/Models/CSSCompletions.js:
2731         (WI.CSSCompletions.completeUnbalancedValue):
2732         * UserInterface/Models/CSSProperty.js:
2733         (WI.CSSProperty.prototype.set rawValue):
2734
2735 2019-02-07  Joseph Pecoraro  <pecoraro@apple.com>
2736
2737         Web Inspector: Make Timeline markers light gray instead of black in dark mode
2738         https://bugs.webkit.org/show_bug.cgi?id=194417
2739
2740         Reviewed by Devin Rousso.
2741
2742         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
2743         (.timeline-overview-graph.rendering-frame > .divider):
2744         * UserInterface/Views/TimelineRuler.css:
2745         (.timeline-ruler > .markers > .divider):
2746
2747 2019-02-06  Devin Rousso  <drousso@apple.com>
2748
2749         Web Inspector: DOM: don't send the entire function string with each event listener
2750         https://bugs.webkit.org/show_bug.cgi?id=194293
2751         <rdar://problem/47822809>
2752
2753         Reviewed by Joseph Pecoraro.
2754
2755         * UserInterface/Views/EventListenerSectionGroup.js:
2756         (WI.EventListenerSectionGroup.prototype._functionTextOrLink):
2757
2758 2019-02-06  Joseph Pecoraro  <pecoraro@apple.com>
2759
2760         Web Inspector: "Worker not found" uncaught protocol errors
2761         https://bugs.webkit.org/show_bug.cgi?id=194319
2762
2763         Reviewed by Matt Baker.
2764
2765         * UserInterface/Base/Main.js:
2766         (WI.terminatePageTarget):
2767         Remove Worker targets associated with the Page on navigation.
2768         Eventually we will have to associate Workers with their parent
2769         frame, but for now a transition can only happen at the Page
2770         level, so we can eliminate all workers on the page.
2771
2772         * UserInterface/Controllers/WorkerManager.js:
2773         (WI.WorkerManager.prototype.workerCreated):
2774         * UserInterface/Protocol/Connection.js:
2775         (InspectorBackend.WorkerConnection.sendMessageToBackend):
2776         Allow any WorkerAgent domain message to fail silently. This can
2777         happen if a Worker is created and destroyed before the frontend
2778         hears about it and sends messages to the backend for that Worker.
2779
2780 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
2781
2782         Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty
2783         https://bugs.webkit.org/show_bug.cgi?id=194318
2784
2785         Reviewed by Devin Rousso.
2786
2787         Previously, WI.CSSStyleDeclaration.Event.PropertiesChanged fired when
2788         old text and new text were empty strings.
2789
2790         * UserInterface/Models/CSSStyleDeclaration.js:
2791
2792 2019-02-05  Devin Rousso  <drousso@apple.com>
2793
2794         Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
2795         https://bugs.webkit.org/show_bug.cgi?id=159577
2796         <rdar://problem/27251461>
2797
2798         Reviewed by Joseph Pecoraro.
2799
2800         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2801         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
2802         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
2803
2804 2019-02-05  Matt Baker  <mattbaker@apple.com>
2805
2806         Web Inspector: Elements tab: selection is broken after deleting the selected node
2807         https://bugs.webkit.org/show_bug.cgi?id=194300
2808         <rdar://problem/47829275>
2809
2810         Reviewed by Devin Rousso.
2811
2812         Deleting a TreeElement can cause an IndexSet including indexes
2813         outside the deleted range to be passed to SelectionController,
2814         corrupting the internal selection state.
2815
2816         * UserInterface/Views/TreeOutline.js:
2817         (WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added.
2818         (WI.TreeOutline.prototype._indexesForSubtree):
2819         Finding the last (rightmost leaf) TreeElement in the subtree used
2820         TreeElement.prototype.traverseNextElement to do a depth first traversal.
2821         This method did not stay within the subtree rooted at `treeElement`.
2822
2823 2019-02-05  Matt Baker  <mattbaker@apple.com>
2824
2825         Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
2826         https://bugs.webkit.org/show_bug.cgi?id=194254
2827         <rdar://problem/47805023>
2828
2829         Reviewed by Devin Rousso.
2830
2831         * UserInterface/Views/TreeOutline.js:
2832         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
2833         TreeOutline should always call the TreeElement `select` and `deselect`
2834         methods while processing selection changes. Having notifications
2835         suppressed by `this._suppressNextSelectionDidChangeEvent` should only
2836         affect the dispatching of TreeOutline events.
2837
2838 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
2839
2840         Web Inspector: Styles: remove harmless "property was unlocked" asserts
2841         https://bugs.webkit.org/show_bug.cgi?id=194262
2842
2843         Reviewed by Matt Baker.
2844
2845         * UserInterface/Views/SpreadsheetStyleProperty.js:
2846         (WI.SpreadsheetStyleProperty.prototype.remove):
2847         (WI.SpreadsheetStyleProperty.prototype.update):
2848         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
2849         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
2850
2851 2019-02-04  Devin Rousso  <drousso@apple.com>
2852
2853         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
2854         https://bugs.webkit.org/show_bug.cgi?id=194280
2855         <rdar://problem/47811159>
2856
2857         Reviewed by Matt Baker.
2858
2859         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
2860         (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
2861         Add a fallback value in case the `class` attribute isn't specified for the selected node.
2862
2863 2019-02-04  Devin Rousso  <drousso@apple.com>
2864
2865         Web Inspector: Resources: missing resource data for document on reload
2866         https://bugs.webkit.org/show_bug.cgi?id=194243
2867         <rdar://problem/47559021>
2868
2869         Reviewed by Joseph Pecoraro.
2870
2871         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2872         (WI.ResourceDetailsSidebarPanel.prototype.set resource):
2873         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
2874
2875         * UserInterface/Base/Object.js:
2876         (WI.Object.removeEventListener):
2877         Drive-by: there's no need to iterate over the entire table to check if `thisObject` exists,
2878         as that is handled for us by `ListMultimap`, which we later call anyways.
2879
2880 2019-02-04  Matt Baker  <mattbaker@apple.com>
2881
2882         Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
2883         https://bugs.webkit.org/show_bug.cgi?id=194242
2884         <rdar://problem/47802027>
2885
2886         Reviewed by Joseph Pecoraro.
2887
2888         * UserInterface/Views/FolderizedTreeElement.js:
2889         (WI.FolderizedTreeElement.prototype.removeChildren):
2890         FolderTreeElements are removed by the base class call to removeChildren.
2891         Calling `removeChildren` for detached TreeElements is unnecessary.
2892
2893 2019-02-04  Matt Baker  <mattbaker@apple.com>
2894
2895         Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
2896         https://bugs.webkit.org/show_bug.cgi?id=194169
2897         <rdar://problem/47743864>
2898
2899         Reviewed by Devin Rousso.
2900
2901         * UserInterface/Views/TreeOutline.js:
2902         (WI.TreeOutline.prototype._handleMouseDown):
2903         Add a special case for a single-selection TreeOutline with
2904         allowsRepeatSelection enabled. Since the element is already
2905         selected, bypass the SelectionCongroller and dispatch an
2906         event with event.data.selectedByUser set to true.
2907
2908 2019-02-04  Nikita Vasilyev  <nvasilyev@apple.com>
2909
2910         Web Inspector: Styles: fix race conditions when editing
2911         https://bugs.webkit.org/show_bug.cgi?id=192739
2912         <rdar://problem/46752925>
2913
2914         Reviewed by Devin Rousso.
2915
2916         Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
2917         and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
2918         on the backend, CSSStyleDeclaration (on the front-end) gets updated.
2919
2920         Unsure there's no race conditions by introducing `_updatesInProgressCount`:
2921
2922           - Increment it before calling CSSAgent.setStyleText.
2923           - Decrement it after CSSAgent.setStyleText is finished.
2924
2925         Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.
2926
2927         * UserInterface/Models/CSSProperty.js:
2928         (WI.CSSProperty.prototype._updateOwnerStyleText):
2929         * UserInterface/Models/CSSStyleDeclaration.js:
2930         (WI.CSSStyleDeclaration):
2931         (WI.CSSStyleDeclaration.prototype.set text): Removed.
2932         (WI.CSSStyleDeclaration.prototype.setText): Added.
2933         Change the setter to a method since it has side effects including an asynchronous backend call.
2934
2935         * UserInterface/Models/DOMNodeStyles.js:
2936         (WI.DOMNodeStyles.prototype.changeStyleText):
2937
2938         * UserInterface/Views/SpreadsheetStyleProperty.js:
2939         (WI.SpreadsheetStyleProperty.prototype.get nameTextField): Removed.
2940         (WI.SpreadsheetStyleProperty.prototype.get valueTextField): Removed.
2941         Drive-by: remove unused code.
2942
2943 2019-02-01  Devin Rousso  <drousso@apple.com>
2944
2945         Web Inspector: create icons for media event types instead of using a blue circle
2946         https://bugs.webkit.org/show_bug.cgi?id=190381
2947         <rdar://problem/45507995>
2948
2949         Reviewed by Brian Burg.
2950
2951         * UserInterface/Models/DOMNode.js:
2952         (WI.DOMNode.isPlayEvent): Added.
2953         (WI.DOMNode.isPauseEvent): Added.
2954         (WI.DOMNode.isStopEvent): Added.
2955
2956         * UserInterface/Views/DOMEventsBreakdownView.js:
2957         (WI.DOMEventsBreakdownView.prototype.layout):
2958         * UserInterface/Views/DOMEventsBreakdownView.css:
2959         (.dom-events-breakdown tr > :matches(th, td)):
2960         (.dom-events-breakdown .graph):
2961         (.dom-events-breakdown .graph > :matches(img, .area)): Added.
2962         (.dom-events-breakdown .graph > img): Added.
2963         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > img): Added.
2964         (.dom-events-breakdown .graph > :matches(.point, .area)): Deleted.
2965         (.dom-events-breakdown .graph > .point): Deleted.
2966         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > .point): Deleted.
2967
2968         * UserInterface/Views/NetworkTableContentView.js:
2969         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):
2970
2971         * UserInterface/Images/EventPause.svg: Added.
2972         * UserInterface/Images/EventPlay.svg: Added.
2973         * UserInterface/Images/EventProcessing.svg: Added.
2974         * UserInterface/Images/EventStop.svg: Added.
2975
2976 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2977
2978         Web Inspector: Make WI.ColumnChart a WI.View subclass
2979         https://bugs.webkit.org/show_bug.cgi?id=194171
2980
2981         Rubber-stamped by Devin Rousso.
2982
2983         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2984         (WI.CPUTimelineOverviewGraph):
2985         * UserInterface/Views/ColumnChart.js:
2986         (WI.ColumnChart):
2987         (WI.ColumnChart.prototype.set size):
2988         (WI.ColumnChart.prototype.layout):
2989         (WI.ColumnChart.prototype.get element): Deleted.
2990         (WI.ColumnChart.prototype.needsLayout): Deleted.
2991         (WI.ColumnChart.prototype.updateLayout): Deleted.
2992
2993 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2994
2995         Web Inspector: Make WI.StackedLineChart a WI.View subclass
2996         https://bugs.webkit.org/show_bug.cgi?id=194119
2997
2998         Rubber-stamped by Devin Rousso.
2999
3000         * UserInterface/Views/LineChart.js:
3001         (WI.LineChart.prototype.layout):
3002         (WI.LineChart):
3003         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
3004         (WI.MemoryTimelineOverviewGraph):
3005         * UserInterface/Views/StackedLineChart.js:
3006         (WI.StackedLineChart):
3007         (WI.StackedLineChart.prototype.set size):
3008         (WI.StackedLineChart.prototype.layout):
3009         (WI.StackedLineChart.prototype.get element): Deleted.
3010         (WI.StackedLineChart.prototype.get points): Deleted.
3011         (WI.StackedLineChart.prototype.needsLayout): Deleted.
3012         (WI.StackedLineChart.prototype.updateLayout): Deleted.
3013
3014 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
3015
3016         Web Inspector: Make WI.CircleChart a WI.View subclass
3017         https://bugs.webkit.org/show_bug.cgi?id=194118
3018
3019         Reviewed by Matt Baker.
3020
3021         * UserInterface/Views/CircleChart.js:
3022         (WI.CircleChart.prototype.get centerElement):
3023         (WI.CircleChart.prototype.layout):
3024         (WI.CircleChart.prototype.get element): Deleted.
3025         (WI.CircleChart.prototype.needsLayout): Deleted.
3026         (WI.CircleChart.prototype.updateLayout): Deleted.
3027         * UserInterface/Views/MemoryTimelineView.js:
3028         (WI.MemoryTimelineView):
3029
3030 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
3031
3032         Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing
3033         https://bugs.webkit.org/show_bug.cgi?id=194115
3034         <rdar://problem/47716693>
3035
3036         Rubber-stamped by Devin Rousso.
3037
3038         * UserInterface/Views/CPUTimelineView.js:
3039         (WI.CPUTimelineView.prototype.reset):
3040         (WI.CPUTimelineView.prototype.clear):
3041         (WI.CPUTimelineView.prototype.layout):
3042         * UserInterface/Views/MemoryTimelineView.js:
3043         (WI.MemoryTimelineView.prototype.reset):
3044         (WI.MemoryTimelineView.prototype.clear):
3045         (WI.MemoryTimelineView.prototype.layout):
3046         When there are no visible records in the selected range clear our UI.
3047         Introduce a `clear` method that clears the UI but keeps
3048         non-range-specific values (e.g. maximums).
3049
3050 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
3051
3052         Web Inspector: Timeline graphs have drawing issues with multiple discontinuities
3053         https://bugs.webkit.org/show_bug.cgi?id=194110
3054         <rdar://problem/47714356>
3055
3056         Reviewed by Devin Rousso.
3057
3058         * UserInterface/Views/CPUTimelineView.js:
3059         (WI.CPUTimelineView):
3060         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
3061         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
3062         (WI.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
3063         (WI.MemoryTimelineOverviewGraph.prototype.layout):
3064         * UserInterface/Views/MemoryTimelineView.js:
3065         (WI.MemoryTimelineView.prototype.layout.xScale):
3066         (WI.MemoryTimelineView.prototype.layout.yScale):
3067         (WI.MemoryTimelineView.prototype.layout):
3068         Handle if multiple discontinuities exist between records.
3069
3070 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
3071
3072         Web Inspector: Timeline time range selection should show duration alongside start and end
3073         https://bugs.webkit.org/show_bug.cgi?id=194109
3074         <rdar://problem/47714279>
3075
3076         Reviewed by Devin Rousso.
3077
3078         * Localizations/en.lproj/localizedStrings.js:
3079         * UserInterface/Views/TimelineRecordingContentView.js:
3080         (WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
3081         Include the duration when not obvious.
3082
3083 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
3084
3085         Web Inspector: Improve API and documentation of ColumnChart
3086         https://bugs.webkit.org/show_bug.cgi?id=193982
3087
3088         Reviewed by Devin Rousso.
3089
3090         This used to be named "BarChart". Convert remaining instances
3091         of "bar" to "column" and clean up related things.
3092
3093         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3094         (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart):
3095         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
3096         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart): Deleted.
3097         (.timeline-overview-graph.cpu > .bar-chart > svg > rect): Deleted.
3098         * UserInterface/Views/CPUTimelineOverviewGraph.js:
3099         (WI.CPUTimelineOverviewGraph.prototype.layout):
3100         * UserInterface/Views/ColumnChart.js:
3101         (WI.ColumnChart):
3102         (WI.ColumnChart.prototype.get columns):
3103         (WI.ColumnChart.prototype.addColumn):
3104         (WI.ColumnChart.prototype.clear):
3105         (WI.ColumnChart.prototype.updateLayout):
3106         (WI.ColumnChart.prototype.get bars): Deleted.
3107         (WI.ColumnChart.prototype.addBar): Deleted.
3108         * UserInterface/Views/StackedLineChart.js:
3109         (WI.StackedLineChart.prototype.get element):
3110         (WI.StackedLineChart.prototype.get points):
3111
3112 2019-01-31  Joseph Pecoraro  <pecoraro@apple.com>
3113
3114         Web Inspector: Timeline time range selection sometimes shows 0.000, should be just 0
3115         https://bugs.webkit.org/show_bug.cgi?id=194108
3116         <rdar://problem/47714273>
3117
3118         Reviewed by Devin Rousso.
3119
3120         * UserInterface/Base/Utilities.js:
3121         Check under epsilon for the zero case.
3122
3123 2019-01-31  Matt Baker  <mattbaker@apple.com>
3124
3125         REGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing innerHTML/tagName/attribute
3126         https://bugs.webkit.org/show_bug.cgi?id=192652
3127         <rdar://problem/46684612>
3128
3129         Reviewed by Devin Rousso.
3130
3131         * UserInterface/Views/DOMTreeElement.js:
3132         (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
3133         Call to Event.preventDefault() should be made here instead of at the
3134         TreeOutline level.
3135
3136         * UserInterface/Views/TreeElement.js:
3137         (WI.TreeElement.prototype.selectOnMouseDown): Deleted.
3138         Remove dead code.
3139
3140         * UserInterface/Views/TreeOutline.js:
3141         (WI.TreeOutline._handleMouseDown):
3142         Do not prevent default event handling when the item cannot be selected.
3143         This matches TreeOutline behavior prior to introducing SelectionController.
3144
3145 2019-01-30  Devin Rousso  <drousso@apple.com>
3146
3147         Web Inspector: Memory Timeline View should be responsive / resizable
3148         https://bugs.webkit.org/show_bug.cgi?id=153758
3149         <rdar://problem/24444320>
3150
3151         Reviewed by Joseph Pecoraro.
3152
3153         Leverage the SVG `viewBox` (which was misspelled) to scale the graphs when the width of the
3154         container changes. The `viewBox` used is equal to the total amount of time that is visible.
3155
3156         Make `WI.LineChart` (and its container classes) into subclasses of `WI.View` to leverage the
3157         existing layout system.
3158
3159         Prevent any work from being done when resizing, as this is now handled by CSS/SVG.
3160
3161         * UserInterface/Views/LineChart.js:
3162         (WI.LineChart):
3163         (WI.LineChart.prototype.set size):
3164         (WI.LineChart.prototype.addPoint):
3165         (WI.LineChart.prototype.clear):
3166         (WI.LineChart.prototype.layout):
3167         (WI.LineChart.prototype.get element): Deleted.
3168         (WI.LineChart.prototype.get points): Deleted.
3169         (WI.LineChart.prototype.needsLayout): Deleted.
3170         (WI.LineChart.prototype.updateLayout): Deleted.
3171
3172         * UserInterface/Views/CPUUsageView.js:
3173         (WI.CPUUsageView):
3174         (WI.CPUUsageView.prototype.clear):
3175         (WI.CPUUsageView.prototype.updateChart): Added.
3176         (WI.CPUUsageView.prototype.get element): Deleted.
3177         (WI.CPUUsageView.prototype.layoutWithDataPoints): Deleted.
3178         * UserInterface/Views/CPUUsageView.css:
3179         (.cpu-usage-view):
3180         (.cpu-usage-view > .details):
3181         (.cpu-usage-view > .graph, .cpu-usage-view > .graph > .line-chart, .cpu-usage-view > .graph > .line-chart > svg): Added.
3182         (.cpu-usage-view > .graph): Deleted.
3183
3184         * UserInterface/Views/CPUTimelineView.js:
3185         (WI.CPUTimelineView):
3186         (WI.CPUTimelineView.prototype.layout):
3187         (WI.CPUTimelineView.prototype.layout.layoutView):
3188         (WI.CPUTimelineView.prototype.layout.layoutView.xScale):
3189         (WI.CPUTimelineView.prototype.layout.layoutView.yScale):
3190         * UserInterface/Views/CPUTimelineView.css:
3191         (body .timeline-view.cpu): Added.
3192         (.timeline-view.cpu > .content):
3193         (.timeline-view.cpu): Deleted.
3194
3195         * UserInterface/Views/MemoryCategoryView.js:
3196         (WI.MemoryCategoryView):
3197         (WI.MemoryCategoryView.prototype.clear):
3198         (WI.MemoryCategoryView.prototype.updateChart): Added.
3199         (WI.MemoryCategoryView.prototype.get element): Deleted.
3200         (WI.MemoryCategoryView.prototype.layoutWithDataPoints): Deleted.
3201         * UserInterface/Views/MemoryCategoryView.css:
3202         (.memory-category-view):
3203         (.memory-category-view > .details):
3204         (.memory-category-view > .graph, .memory-category-view > .graph > .line-chart, .memory-category-view > .graph > .line-chart > svg): Added.
3205         (.memory-category-view > .graph): Deleted.
3206
3207         * UserInterface/Views/MemoryTimelineView.js:
3208         (WI.MemoryTimelineView.prototype.layout):
3209         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView):
3210         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.xScale):
3211         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.yScale):
3212         (WI.MemoryTimelineView.prototype._initializeCategoryViews):
3213         (WI.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow):
3214         * UserInterface/Views/MemoryTimelineView.css:
3215         (.timeline-view.memory > .content > .overview):
3216         (.timeline-view.memory > .content > .overview > .divider):
3217         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage, .timeline-view.memory > .content > .overview .legend .size): Added.
3218         (.timeline-view.memory .legend):
3219         (.timeline-view.memory .legend .row): Added.
3220         (.timeline-view.memory .legend .row + .row): Added.
3221         (.timeline-view.memory .legend .swatch): Addd.
3222         (.timeline-view.memory .legend .swatch.javascript): Addd.
3223         (.timeline-view.memory .legend .swatch.images): Addd.
3224         (.timeline-view.memory .legend .swatch.layers): Addd.
3225         (.timeline-view.memory .legend .swatch.page): Addd.
3226         (.timeline-view.memory .legend .swatch.current): Addd.
3227         (.timeline-view.memory > .content): Deleted.
3228         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage):
3229         (body[dir=ltr] .timeline-view.memory .legend): Deleted.
3230         (body[dir=rtl] .timeline-view.memory .legend): Deleted.
3231         (.timeline-view.memory .legend > .row): Deleted.
3232         (.timeline-view.memory .legend > .row > .swatch): Deleted.
3233         (body[dir=ltr] .timeline-view.memory .legend > .row > .swatch): Deleted.
3234         (body[dir=rtl] .timeline-view.memory .legend > .row > .swatch): Deleted.
3235         (.timeline-view.memory .legend > .row > p): Deleted.
3236         (body[dir=ltr] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
3237         (body[dir=rtl] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
3238         (.timeline-view.memory .legend > .row > .label): Deleted.
3239         (.timeline-view.memory .legend > .row > .size): Deleted.
3240         (.timeline-view.memory .legend > .row > .swatch.javascript): Deleted.
3241         (.timeline-view.memory .legend > .row > .swatch.images): Deleted.
3242         (.timeline-view.memory .legend > .row > .swatch.layers): Deleted.
3243         (.timeline-view.memory .legend > .row > .swatch.page): Deleted.
3244         (.timeline-view.memory .legend > .row > .swatch.current): Deleted.
3245
3246 2019-01-30  Nikita Vasilyev  <nvasilyev@apple.com>
3247
3248         Web Inspector: Changes: group CSS rules by resource
3249         https://bugs.webkit.org/show_bug.cgi?id=193940
3250         <rdar://problem/47617785>
3251
3252         Reviewed by Matt Baker.
3253
3254         Create resource sections with source links in their headers.
3255
3256         Also:
3257         - Use read-only WI.SpreadsheetStyleProperty to display inline swatches for colors;
3258         - Make the red and green background span the entire width of the panel.
3259
3260         * Localizations/en.lproj/localizedStrings.js:
3261         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
3262         (.sidebar > .panel.changes-panel):
3263         (.sidebar > .panel.changes-panel .css-rule):
3264         (.sidebar > .panel.selected.changes-panel.empty):
3265         (.changes-panel .resource-section):
3266         (.changes-panel .resource-section > .header):
3267         (.changes-panel .resource-section > .header > a:hover):
3268         (.sidebar > .panel.changes-panel .selector-line,):
3269         (.changes-panel .css-property-line > .property):
3270         (.changes-panel .css-property-line.unchanged):
3271         (.changes-panel .css-property-line.added):
3272         (.changes-panel .css-property-line.removed):
3273         (.changes-panel .css-property-line.removed::before):
3274         (.changes-panel .css-property-line.added::before):
3275         (@media (prefers-color-scheme: dark)):
3276
3277         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
3278         (WI.ChangesDetailsSidebarPanel.prototype.layout):
3279         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
3280         (WI.ChangesDetailsSidebarPanel.prototype._createLocationLink):
3281
3282         * UserInterface/Views/SpreadsheetStyleProperty.js:
3283         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
3284         Allow passing `null` as a delegate.
3285
3286 2019-01-30  Devin Rousso  <drousso@apple.com>
3287
3288         Web Inspector: change style of device settings override popover content
3289         https://bugs.webkit.org/show_bug.cgi?id=194049
3290
3291         Reviewed by Joseph Pecoraro.
3292
3293         * UserInterface/Base/Main.js:
3294         (WI._handleDeviceSettingsToolbarButtonClicked):
3295         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
3296         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer): Deleted.
3297         * UserInterface/Views/Main.css:
3298         (.device-settings-content):
3299         (.device-settings-content > tr > td:first-child): Added.
3300         (.device-settings-content .container):
3301         (.device-settings-content .container > * + *): Added.
3302         (.device-settings-content .column): Added.
3303         (.device-settings-content .user-agent select): Added.
3304         (.device-settings-content .user-agent input): Added.
3305         (.device-settings-content label + label): Added.
3306         (.device-settings-content label > input): Added.
3307         (.device-settings-content .columns): Deleted.
3308         (.device-settings-content .columns > .column): Deleted.
3309         (.device-settings-content .columns > .column + .column): Deleted.
3310         (.device-settings-content .user-agent-value): Deleted.
3311         (.device-settings-content .user-agent-value > select): Deleted.
3312         (.device-settings-content .user-agent-value > input): Deleted.
3313         (body[dir=ltr] .device-settings-content .user-agent-value > input): Deleted.
3314         (body[dir=rtl] .device-settings-content .user-agent-value > input): Deleted.
3315
3316 2019-01-30  Devin Rousso  <drousso@apple.com>
3317
3318         Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith')
3319         https://bugs.webkit.org/show_bug.cgi?id=194029
3320
3321         Reviewed by Matt Baker.
3322
3323         * UserInterface/Views/ConsoleMessageView.js:
3324         (WI.ConsoleMessageView.prototype._appendLocationLink):
3325
3326 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
3327
3328         Web Inspector: Enabled Changes panel in Elements tab by default
3329         https://bugs.webkit.org/show_bug.cgi?id=193986
3330         <rdar://problem/47647683>
3331
3332         Reviewed by Matt Baker.
3333
3334         * UserInterface/Base/Setting.js:
3335         * UserInterface/Views/ElementsTabContentView.js:
3336         (WI.ElementsTabContentView):
3337         * UserInterface/Views/SettingsTabContentView.js:
3338         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3339
3340 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
3341
3342         Web Inspector: Styles: enable computed style cascades by default
3343         https://bugs.webkit.org/show_bug.cgi?id=193983
3344         <rdar://problem/47645821>
3345
3346         Reviewed by Matt Baker.
3347
3348         * Localizations/en.lproj/localizedStrings.js:
3349         * UserInterface/Base/Setting.js:
3350         * UserInterface/Views/ComputedStyleDetailsPanel.css:
3351         (.computed-style-properties):
3352         (.computed-style-properties .property .go-to-arrow):
3353         (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
3354         (.details-section.computed-style-properties > .content):
3355         (@media (prefers-color-scheme: dark)):
3356         (.computed-with-traces .computed-style-properties): Deleted.
3357         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
3358         (.computed-with-traces .details-section.computed-style-properties > .content): Deleted.
3359         (.computed-with-traces .computed-style-properties .property .go-to-arrow): Deleted.
3360         * UserInterface/Views/ComputedStyleDetailsPanel.js:
3361         (WI.ComputedStyleDetailsPanel.prototype.refresh):
3362         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
3363         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
3364         (WI.ComputedStyleDetailsSidebarPanel):
3365         * UserInterface/Views/SettingsTabContentView.js:
3366         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3367
3368 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
3369
3370         Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler
3371         https://bugs.webkit.org/show_bug.cgi?id=193921
3372
3373         Reviewed by Devin Rousso.
3374
3375         * UserInterface/Base/Utilities.js:
3376         * UserInterface/Debug/UncaughtExceptionReporter.js:
3377         * UserInterface/Views/NetworkTableContentView.js:
3378         (WI.NetworkTableContentView.prototype._exportHAR):
3379         * UserInterface/Views/TextEditor.js:
3380         (WI.TextEditor.prototype.updateFormattedState):
3381
3382 2019-01-28  Devin Rousso  <drousso@apple.com>
3383
3384         Web Inspector: provide a way to edit page WebRTC settings on a remote target
3385         https://bugs.webkit.org/show_bug.cgi?id=193863
3386         <rdar://problem/47572764>
3387
3388         Reviewed by Joseph Pecoraro.
3389
3390         * UserInterface/Base/Main.js:
3391         (WI.loaded):
3392         (WI.initializeTarget):
3393         (WI._handleDeviceSettingsToolbarButtonClicked):
3394         (WI._handleDeviceSettingsToolbarButtonClicked.createCheckbox):
3395         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns): Deleted.
3396         * UserInterface/Views/Main.css:
3397         (.device-settings-content .container): Added.
3398
3399         * Localizations/en.lproj/localizedStrings.js:
3400
3401 2019-01-28  Matt Baker  <mattbaker@apple.com>
3402
3403         Web Inspector: Elements tab should toggle visibility for all selected nodes
3404         https://bugs.webkit.org/show_bug.cgi?id=193089
3405         <rdar://problem/47009256>
3406
3407         Reviewed by Devin Rousso.
3408
3409         Update "Toggle Visibility" command in DOM tree for multiple selection.
3410         When both visible and hidden elements are selected in the DOM tree,
3411         the toggle command behaves contextually. If one or more elements are
3412         visible, they are hidden, otherwise they are shown. The context menu
3413         shows "Hide Elements" or "Show Elements", respectively.
3414
3415         When only one element is selected, or the context menu target element
3416         is not selected, the command continues to be "Toggle Visibility".
3417
3418         * Localizations/en.lproj/localizedStrings.js:
3419
3420         * UserInterface/Views/DOMTreeElement.js:
3421         (WI.DOMTreeElement.prototype.get isNodeHidden): Added.
3422         (WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
3423         (WI.DOMTreeElement.prototype.toggleElementVisibility):
3424         (WI.DOMTreeElement.prototype._populateTagContextMenu):
3425
3426         * UserInterface/Views/DOMTreeOutline.js:
3427         (WI.DOMTreeOutline):
3428         (WI.DOMTreeOutline.prototype.toggleSelectedElementsVisibility):  Added.
3429         Provide a public method for toggling the visibility of selected DOM nodes.
3430         Used by the "H" keyboard shortcut and DOMTreeElement context menu.
3431
3432         (WI.DOMTreeOutline.prototype._hideElements):
3433         (WI.DOMTreeOutline.prototype._hideElement): Deleted.
3434         Rename for multiple selection.
3435
3436 2019-01-28  Commit Queue  <commit-queue@webkit.org>
3437
3438         Unreviewed, rolling out r240351.
3439         https://bugs.webkit.org/show_bug.cgi?id=193918
3440
3441         Causes overlapping Timeline records, as some record types
3442         don't have an endTime (Requested by drousso on #webkit).
3443
3444         Reverted changeset:
3445
3446         "WebInspector: Confusingly nested events in the timeline for
3447         Mutation Observers"
3448         https://bugs.webkit.org/show_bug.cgi?id=192884
3449         https://trac.webkit.org/changeset/240351
3450
3451 2019-01-28  Matt Baker  <mattbaker@apple.com>
3452
3453         REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
3454         https://bugs.webkit.org/show_bug.cgi?id=193808
3455         <rdar://problem/47537734>
3456
3457         Reviewed by Devin Rousso.
3458
3459         * UserInterface/Controllers/SelectionController.js:
3460         (WI.SelectionController.prototype.didRemoveItems):
3461
3462         * UserInterface/Views/TreeOutline.js:
3463         (WI.TreeOutline.prototype._indexesForSubtree):
3464         Fix a bug where no IndexSet was returned when passed a TreeElement with
3465         no children. This caused the Timelines tree selection to be corrupted when
3466         entering and exiting edit mode, as TreeElements are inserted and removed.
3467
3468 2019-01-28  Nikita Vasilyev  <nvasilyev@apple.com>
3469
3470         Web Inspector: Add Changes panel to Elements tab
3471         https://bugs.webkit.org/show_bug.cgi?id=193803
3472
3473         Reviewed by Devin Rousso.
3474
3475         Introduce the new experimental Changes Panel. It shows a list of CSS changes
3476         made via Web Inspector, so the changes could be copied to the source files.
3477
3478         * Localizations/en.lproj/localizedStrings.js:
3479         * UserInterface/Base/Setting.js:
3480         * UserInterface/Base/Utilities.js:
3481         (Array.diffArrays): Added.
3482
3483         * UserInterface/Controllers/CSSManager.js:
3484         (WI.CSSManager):
3485         (WI.CSSManager.prototype.get modifiedCSSRules):
3486         (WI.CSSManager.prototype.addModifiedCSSRule):
3487         (WI.CSSManager.prototype.removeModifiedCSSRule):
3488         (WI.CSSManager.prototype._mainResourceDidChange):
3489
3490         * UserInterface/Main.html:
3491         * UserInterface/Models/CSSProperty.js:
3492         (WI.CSSProperty):
3493         (WI.CSSProperty.prototype.remove):
3494         (WI.CSSProperty.prototype.replaceWithText):
3495         (WI.CSSProperty.prototype.commentOut):
3496         (WI.CSSProperty.prototype.set text):
3497         (WI.CSSProperty.prototype.get modified):
3498         (WI.CSSProperty.prototype.set name):
3499         (WI.CSSProperty.prototype.set rawValue):
3500         (WI.CSSProperty.prototype.get initialState):
3501         (WI.CSSProperty.prototype._updateOwnerStyleText):
3502         (WI.CSSProperty.prototype._markModified):
3503         Mark CSSProperty modified *before* making any changes to copy its initial state.
3504
3505         * UserInterface/Models/CSSRule.js:
3506         (WI.CSSRule):
3507         (WI.CSSRule.prototype.get id):
3508         (WI.CSSRule.prototype.get initialState):
3509         (WI.CSSRule.prototype.get stringId):
3510         (WI.CSSRule.prototype.markModified):
3511
3512         * UserInterface/Models/CSSStyleDeclaration.js:
3513         (WI.CSSStyleDeclaration):
3514         (WI.CSSStyleDeclaration.prototype.get initialState):
3515         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
3516         (WI.CSSStyleDeclaration.prototype.get properties):
3517         (WI.CSSStyleDeclaration.prototype.set properties):
3518         (WI.CSSStyleDeclaration.prototype.propertyForName):
3519         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
3520         (WI.CSSStyleDeclaration.prototype.markModified):
3521
3522         * UserInterface/Views/ChangesDetailsSidebarPanel.css: Added.
3523         (.sidebar > .panel.changes-panel):
3524         (.sidebar > .panel.changes-panel:not(.empty)):
3525         (.sidebar > .panel.changes-panel.empty):
3526         (.changes-panel ins):
3527         (.changes-panel del):
3528         (.changes-panel del.css-property::before):
3529         (.changes-panel ins.css-property::before):
3530         (@media (prefers-color-scheme: dark)):
3531
3532         * UserInterface/Views/ChangesDetailsSidebarPanel.js: Added.
3533         (WI.ChangesDetailsSidebarPanel):
3534         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
3535         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
3536         (WI.ChangesDetailsSidebarPanel.prototype.shown):
3537         (WI.ChangesDetailsSidebarPanel.prototype.detached):
3538         (WI.ChangesDetailsSidebarPanel.prototype.layout):
3539         (WI.ChangesDetailsSidebarPanel.prototype._mainResourceDidChange):
3540
3541         * UserInterface/Views/ElementsTabContentView.js:
3542         (WI.ElementsTabContentView):
3543
3544         * UserInterface/Views/SettingsTabContentView.js:
3545         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3546
3547         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3548         (.spreadsheet-style-declaration-editor .property):
3549         (.spreadsheet-style-declaration-editor .property.modified):
3550         (.spreadsheet-style-declaration-editor .property.modified:not(.selected)):
3551         (@media (prefers-color-scheme: dark)):
3552
3553         * UserInterface/Views/SpreadsheetStyleProperty.js:
3554         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
3555
3556 2019-01-26  Devin Rousso  <drousso@apple.com>
3557
3558         Web Inspector: handle CSS Color 4 color syntaxes
3559         https://bugs.webkit.org/show_bug.cgi?id=193166
3560         <rdar://problem/47062403>
3561
3562         Reviewed by Simon Fraser.
3563
3564         * UserInterface/Models/Color.js:
3565         (WI.Color.fromString):
3566         (WI.Color.fromString.splitFunctionString): Added.
3567         (WI.Color.fromString.parseFunctionAlpha): Added.
3568         (WI.Color.fromString.parseFunctionComponent): Added.
3569         (WI.Color.fromString.parseHueComponent): Added.
3570         (WI.Color.fromString.parsePercentageComponent): Added.
3571
3572 2019-01-26  Devin Rousso  <drousso@apple.com>
3573
3574         Web Inspector: provide a way to edit the user agent of a remote target
3575         https://bugs.webkit.org/show_bug.cgi?id=193862
3576         <rdar://problem/47359292>
3577
3578         Reviewed by Joseph Pecoraro.
3579
3580         * UserInterface/Base/Main.js:
3581         (WI.loaded):
3582         (WI.contentLoaded):
3583         (WI.initializeTarget):
3584         (WI._handleDeviceSettingsToolbarButtonClicked):
3585         (WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
3586         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
3587         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
3588         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
3589         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
3590         (WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
3591         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
3592
3593         * UserInterface/Views/Main.css:
3594         (.device-settings-content):
3595         (.device-settings-content .user-agent-value): Added.
3596         (.device-settings-content .user-agent-value > select): Added.
3597         (.device-settings-content .user-agent-value > input): Added.
3598         (body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
3599         (body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
3600         (.device-settings-content label > input): Added.
3601         (body[dir=ltr] .device-settings-content label > input): Deleted.
3602         (body[dir=rtl] .device-settings-content label > input): Deleted.
3603
3604         * Localizations/en.lproj/localizedStrings.js:
3605
3606 2019-01-25  Devin Rousso  <drousso@apple.com>
3607
3608         Web Inspector: provide a way to edit page settings on a remote target
3609         https://bugs.webkit.org/show_bug.cgi?id=193813
3610         <rdar://problem/47359510>
3611
3612         Reviewed by Joseph Pecoraro.
3613
3614         Add toolbar button that shows a popover with the target's (page's) settings when clicked.
3615
3616         * UserInterface/Base/Main.js:
3617         (WI.loaded):
3618         (WI.contentLoaded):
3619         (WI.initializeTarget): Added.
3620         (WI._handleDeviceSettingsToolbarButtonClicked): Added.
3621         (WI.didDismissPopover): Added.
3622         * UserInterface/Views/Main.css:
3623         (.device-settings-content): Added.
3624         (.device-settings-content .columns): Added.
3625         (.device-settings-content .columns > .column): Added.
3626         (.device-settings-content .columns > .column + .column): Added.
3627         (body[dir=ltr] .device-settings-content label > input): Added.
3628         (body[dir=rtl] .device-settings-content label > input): Added.
3629
3630         * UserInterface/Views/Popover.js:
3631         (WI.Popover.prototype._update.area):
3632         (WI.Popover.prototype._update):
3633         (WI.Popover.prototype._drawBackground):
3634         (WI.Popover.prototype._bestMetricsForEdge):
3635         (WI.Popover.prototype._drawFrame):
3636         If the best area is negative, treat it as the worst area.
3637         Allow areas to be clamped so long as the clamped edge is not the preferred edge.
3638
3639         * UserInterface/Base/Test.js:
3640         (WI.initializeTarget): Added.
3641
3642         * UserInterface/Images/Device.svg: Added.
3643         * Localizations/en.lproj/localizedStrings.js:
3644
3645 2019-01-25  Devin Rousso  <drousso@apple.com>
3646
3647         Web Inspector: Audit: unable to import audits
3648         https://bugs.webkit.org/show_bug.cgi?id=193861
3649
3650         Reviewed by Joseph Pecoraro.
3651
3652         * UserInterface/Controllers/AuditManager.js:
3653         (WI.AuditManager.prototype.async processJSON):
3654
3655 2019-01-25  Devin Rousso  <drousso@apple.com>
3656
3657         Web Inspector: Uncaught Exception: No node with given id found
3658         https://bugs.webkit.org/show_bug.cgi?id=193833
3659
3660         Reviewed by Joseph Pecoraro.
3661
3662         * UserInterface/Views/CanvasContentView.js:
3663         (WI.CanvasContentView):
3664         (WI.CanvasContentView.prototype.initialLayout):
3665         (WI.CanvasContentView.prototype.layout):
3666         (WI.CanvasContentView.prototype._refreshPixelSize):
3667         Drive-by: show the refresh button when viewing a specific canvas.
3668
3669         * UserInterface/Views/CanvasTabContentView.js:
3670         (WI.CanvasTabContentView.prototype._removeCanvas):
3671         Reset to the overview if the canvas is removed.
3672
3673 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
3674
3675         Web Inspector: Improve Dark Mode appearance within Memory timeline
3676         https://bugs.webkit.org/show_bug.cgi?id=193804
3677
3678         Reviewed by Matt Baker.
3679
3680         * UserInterface/Views/TimelineOverview.css:
3681         (.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
3682         (.timeline-overview > .tree-outline.timelines .item.selected + .item,):
3683         (@media (prefers-color-scheme: dark)):
3684         (.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
3685         (body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
3686         Fix some colors for Timelines edit mode.
3687
3688         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3689         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
3690         (@media (prefers-color-scheme: dark)):
3691         (.timeline-overview-graph.cpu > .legend):
3692         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
3693         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
3694         (.timeline-overview-graph.memory:nth-child(even) > .legend):
3695         (@media (prefers-color-scheme: dark)):
3696         (.timeline-overview-graph.memory > .legend):
3697         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
3698         Improved colors in CPU / Memory overview graph legends.
3699
3700         * UserInterface/Views/CPUUsageView.css:
3701         (.cpu-usage-view > .details):
3702         * UserInterface/Views/CircleChart.css:
3703         (.circle-chart > svg > path.background):
3704         * UserInterface/Views/MemoryCategoryView.css:
3705         (.memory-category-view > .details):
3706         (.memory-category-view > .details > .name):
3707         * UserInterface/Views/MemoryTimelineView.css:
3708         (.timeline-view.memory > .content > .overview .total-usage,):
3709         (.timeline-view.memory .legend > .row > .size):
3710         Improved colors in CPU / Memory detail views.
3711
3712         * UserInterface/Views/Variables.css:
3713         (:root):
3714         Add a default --text-secondary-color which will end up slightly
3715         lighter in dark mode where it was already implemented.
3716
3717         (@media (prefers-color-scheme: dark)):
3718         Improved max-comparison colors.
3719
3720 2019-01-25  Devin Rousso  <drousso@apple.com>
3721
3722         Web Inspector: Timelines: DOMContentLoaded and load event lines need to be more obvious
3723         https://bugs.webkit.org/show_bug.cgi?id=193186
3724         <rdar://problem/45100694>
3725
3726         Reviewed by Joseph Pecoraro.
3727
3728         Shift around z-index values to make Timelines markers appear behind record bars. Widen the
3729         marker hit region to make it easier to see the tooltip.
3730
3731         * UserInterface/Views/Variables.css:
3732         (:root):
3733
3734         * UserInterface/Views/TimelineRuler.css:
3735         (.timeline-ruler):
3736         (.timeline-ruler > .markers):
3737         (.timeline-ruler > .markers > .marker):
3738         (body[dir=ltr] .timeline-ruler > .markers > .marker):
3739         (body[dir=rtl] .timeline-ruler > .markers > .marker):
3740         (.timeline-ruler > .markers > .marker::before):
3741         (body[dir=ltr] .timeline-ruler > .markers > .marker::before):
3742         (body[dir=rtl] .timeline-ruler > .markers > .marker::before):
3743         (.timeline-ruler > .markers > .marker::after): Added.
3744         (body[dir=ltr] .timeline-ruler > .markers > .marker::after): Added.
3745         (body[dir=rtl] .timeline-ruler > .markers > .marker::after): Added.
3746         (.timeline-ruler > .markers > .marker.current-time):
3747         (.timeline-ruler > .markers > .marker.current-time::after): Added.
3748         (.timeline-ruler > .markers > .marker.load-event):
3749         (.timeline-ruler > .markers > .marker.dom-content-event):
3750         (.timeline-ruler > .markers > .marker.timestamp):
3751         (.timeline-ruler > .selection-handle):
3752         (.timeline-ruler.both-handles-clamped > .selection-handle):
3753         (.timeline-ruler > .shaded-area):
3754         (.timeline-ruler > .markers > .marker.current-time::before): Deleted.
3755
3756         * UserInterface/Views/TimelineRecordBar.css:
3757         (.timeline-record-bar):
3758         (.timeline-record-bar > .segment):
3759
3760         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3761         (.timeline-overview-graph.cpu > .legend):
3762         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
3763         (.timeline-overview-graph.memory > .legend):
3764
3765 2019-01-25  Devin Rousso  <drousso@apple.com>
3766
3767         Web Inspector: Audit: remove experimental setting
3768         https://bugs.webkit.org/show_bug.cgi?id=193743
3769         <rdar://problem/28234022>
3770
3771         Reviewed by Joseph Pecoraro.
3772
3773         * UserInterface/Base/Setting.js:
3774         (WI.Setting):
3775         (WI.Setting.localStorageKey): Added.
3776         (WI.Setting.migrateValue):
3777         Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
3778
3779         * UserInterface/Base/Main.js:
3780         (WI.loaded):
3781
3782         * UserInterface/Views/AuditTabContentView.js:
3783         (WI.AuditTabContentView.isTabAllowed):
3784
3785         * UserInterface/Views/SettingsTabContentView.js:
3786         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3787
3788         * Localizations/en.lproj/localizedStrings.js:
3789
3790 2019-01-25  Devin Rousso  <drousso@apple.com>
3791
3792         Web Inspector: show uncaught exception view for unhandled promise rejections
3793         https://bugs.webkit.org/show_bug.cgi?id=193832
3794
3795         Reviewed by Matt Baker.
3796
3797         * UserInterface/Debug/UncaughtExceptionReporter.js:
3798         (handleUnhandledPromiseRejection): Added.
3799
3800 2019-01-25  Devin Rousso  <drousso@apple.com>
3801
3802         Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
3803         https://bugs.webkit.org/show_bug.cgi?id=193830
3804
3805         Reviewed by Matt Baker.
3806
3807         * UserInterface/Models/RecordingAction.js:
3808         (WI.RecordingAction.prototype.process):
3809
3810 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
3811
3812         Web Inspector: Add another Protocol Version (iOS 12.2)
3813         https://bugs.webkit.org/show_bug.cgi?id=193810
3814         <rdar://problem/42981838>
3815
3816         Reviewed by Matt Baker.
3817
3818         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js: Added.
3819         * Versions/Inspector-iOS-12.2.json: Added.
3820
3821 2019-01-25  Devin Rousso  <drousso@apple.com>
3822
3823         Web Inspector: `WI.Setting.migrateValue` doesn't take into account the key prefix
3824         https://bugs.webkit.org/show_bug.cgi?id=193814
3825
3826         Reviewed by Matt Baker.
3827
3828         * UserInterface/Base/Setting.js:
3829         (WI.Setting):
3830         (WI.Setting.migrateValue):
3831         (WI.Setting._localStorageKey): Added.
3832
3833 2019-01-25  Devin Rousso  <drousso@apple.com>
3834
3835         Web Inspector: improve invalid Audit/Recording JSON error messages
3836         https://bugs.webkit.org/show_bug.cgi?id=193476
3837         <rdar://problem/47303659>
3838
3839         Reviewed by Joseph Pecoraro.
3840
3841         * UserInterface/Models/AuditTestBase.js:
3842         (WI.AuditTestBase):
3843         * UserInterface/Models/AuditTestCase.js:
3844         (WI.AuditTestCase.async fromPayload):
3845         * UserInterface/Models/AuditTestGroup.js:
3846         (WI.AuditTestGroup.async fromPayload):
3847         * UserInterface/Models/AuditTestCaseResult.js:
3848         (WI.AuditTestCaseResult.async fromPayload.checkArray):
3849         (WI.AuditTestCaseResult.async fromPayload):
3850         * UserInterface/Models/AuditTestGroupResult.js:
3851         (WI.AuditTestGroupResult.async fromPayload):
3852         * UserInterface/Controllers/AuditManager.js:
3853         (WI.AuditManager.synthesizeWarning): Added.
3854         (WI.AuditManager.synthesizeError):
3855         (WI.AuditManager.prototype.async processJSON):
3856
3857         * UserInterface/Models/Recording.js:
3858         (WI.Recording.fromPayload):
3859         (WI.Recording.synthesizeWarning): Added.
3860         (WI.Recording.synthesizeError):
3861         * UserInterface/Models/RecordingFrame.js:
3862         (WI.RecordingFrame.fromPayload):
3863         * UserInterface/Models/RecordingAction.js:
3864         (WI.RecordingAction.fromPayload):
3865         (WI.RecordingAction.prototype.async swizzle):
3866         (WI.RecordingAction.prototype.apply):
3867         * UserInterface/Controllers/CanvasManager.js:
3868         (WI.CanvasManager.prototype.processJSON):
3869
3870         * Localizations/en.lproj/localizedStrings.js:
3871
3872 2019-01-24  Devin Rousso  <drousso@apple.com>
3873
3874         Web Inspector: Audit: add supports key to test/group for compatibility
3875         https://bugs.webkit.org/show_bug.cgi?id=193686
3876         <rdar://problem/47460872>
3877
3878         Reviewed by Joseph Pecoraro.
3879
3880         * UserInterface/Models/AuditTestBase.js:
3881         (WI.AuditTestBase):
3882         (WI.AuditTestBase.prototype.get supported): Added.
3883         (WI.AuditTestBase.prototype.set supported): Added.
3884         (WI.AuditTestBase.prototype.set disabled):
3885         (WI.AuditTestBase.prototype.async start):
3886         (WI.AuditTestBase.prototype.stop):
3887         (WI.AuditTestBase.toJSON):
3888         * UserInterface/Models/AuditTestCase.js:
3889         (WI.AuditTestCase.async fromPayload):
3890         * UserInterface/Models/AuditTestGroup.js:
3891         (WI.AuditTestGroup):
3892         (WI.AuditTestGroup.async fromPayload):
3893         (WI.AuditTestGroup.prototype.get supported): Added.
3894         (WI.AuditTestGroup.prototype.set supported): Added.
3895         Add support for a "supports" key in the test JSON that prevents the test from being run if
3896         it's value is lower than the frontend/backend version.
3897
3898         * UserInterface/Views/AuditTreeElement.js:
3899         (WI.AuditTreeElement.prototype.onattach):
3900         (WI.AuditTreeElement.prototype.ondelete):
3901         (WI.AuditTreeElement.prototype.populateContextMenu):
3902         (WI.AuditTreeElement.prototype._updateStatus): Added.
3903         (WI.AuditTreeElement.prototype._showRunningSpinner):
3904         (WI.AuditTreeElement.prototype._showRunningProgress):
3905         (WI.AuditTreeElement.prototype._updateTestGroupDisabled):
3906         (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
3907         (WI.AuditTreeElement.prototype._handleTestResultCleared):