Web Inspector: REGRESSION: Heap: snapshots taken manually don't appear in the list
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-04-15  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: REGRESSION: Heap: snapshots taken manually don't appear in the list
4         https://bugs.webkit.org/show_bug.cgi?id=196900
5         <rdar://problem/49880278>
6
7         Reviewed by Timothy Hatcher.
8
9         * UserInterface/Views/HeapAllocationsTimelineView.js:
10         (WI.HeapAllocationsTimelineView):
11         (WI.HeapAllocationsTimelineView.prototype.layout):
12         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
13         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
14         Drive-by: only show heap snapshots for the selected range.
15
16         * UserInterface/Views/TimelineView.js:
17         * UserInterface/Views/TimelineRecordingContentView.js:
18         (WI.TimelineRecordingContentView):
19         (WI.TimelineRecordingContentView.prototype._handleTimelineViewNeedsEntireSelectedRange): Added.
20         Drive-by: taking (or importing) a heap snapshot should select the entire range so that the
21         new record will appear in the list of heap snapshots.
22
23 2019-04-15  Devin Rousso  <drousso@apple.com>
24
25         Web Inspector: REGRESSION (r244157): Timelines: ruler size appears wrong on first layout
26         https://bugs.webkit.org/show_bug.cgi?id=196901
27         <rdar://problem/49880539>
28
29         Reviewed by Timothy Hatcher.
30
31         * UserInterface/Views/View.js:
32         (WI.View.prototype._layoutSubtree):
33         Ensure that the forced override of the layout reason during the initial layout doesn't
34         affect subviews.
35
36         * UserInterface/Views/ConsoleDrawer.js:
37         (WI.ConsoleDrawer.prototype.sizeDidChange): Added.
38         (WI.ConsoleDrawer.prototype.layout): Deleted.
39         * UserInterface/Views/ConsolePrompt.js:
40         (WI.ConsolePrompt.prototype.sizeDidChange): Added.
41         (WI.ConsolePrompt.prototype.layout): Deleted.
42         * UserInterface/Views/DOMTreeContentView.js:
43         (WI.DOMTreeContentView.prototype.sizeDidChange): Added.
44         (WI.DOMTreeContentView.prototype.layout):
45         * UserInterface/Views/NavigationBar.js:
46         (WI.NavigationBar.prototype.sizeDidChange): Added.
47         (WI.NavigationBar.prototype.layout):
48         (WI.NavigationBar.prototype._updateContent): Added.
49         (WI.NavigationBar.prototype._updateContent.forceItemHidden): Added.
50         (WI.NavigationBar.prototype._updateContent.isDivider): Added.
51         (WI.NavigationBar.prototype._updateContent.calculateVisibleItemWidth): Added.
52         (WI.NavigationBar.prototype.layout.forceItemHidden): Deleted.
53         (WI.NavigationBar.prototype.layout.isDivider): Deleted.
54         (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): Deleted.
55         * UserInterface/Views/TabBrowser.js:
56         (WI.TabBrowser.prototype.sizeDidChange): Added.
57         (WI.TabBrowser.prototype.layout): Deleted.
58         Move logic in `layout` to `sizeDidChange` where applicable.
59
60 2019-04-11  Devin Rousso  <drousso@apple.com>
61
62         Web Inspector: REGRESSION(r244195): Timelines: unable to take heap snapshot
63         https://bugs.webkit.org/show_bug.cgi?id=196832
64         <rdar://problem/49828862>
65
66         Reviewed by Simon Fraser.
67
68         * UserInterface/Controllers/TimelineManager.js:
69         (WI.TimelineManager.prototype.heapSnapshotAdded):
70         (WI.TimelineManager.prototype._addRecord):
71         Heap snapshots can be taken outside of a timeline recording, so remove the early return (and
72         assertion) that checks for an active recording before adding the heap snapshot record.
73
74 2019-04-11  Devin Rousso  <drousso@apple.com>
75
76         Web Inspector: Timelines: can't reliably stop/start a recording
77         https://bugs.webkit.org/show_bug.cgi?id=196778
78         <rdar://problem/47606798>
79
80         Reviewed by Timothy Hatcher.
81
82         Rather than have a binary state of capturing/not-capturing, we should use a four state:
83          1. inactive (when the backend has stopped capturing)
84          2. starting (when the frontend requests capturing to start)
85          3. active (when the backend has started capturing)
86          4. stopping (when the frontend requests capturing to stop)
87
88         Capturing is considered "on" when not in an "inactive" state. Prevent the frontend from
89         starting/stopping capturing unless we're in a "stable" ("inactive" or "active") state, not a
90         "transition" ("starting" or "stopping") state.
91
92         One "side effect" of this change is that since the capturing is considered active until the
93         backend has stopped capturing, we will continue to process records in the frontend even if
94         the frontend has requested to stop capturing. <https://webkit.org/b/152904>
95
96         * UserInterface/Controllers/TimelineManager.js:
97         (WI.TimelineManager):
98         (WI.TimelineManager.prototype.get capturingState): Added.
99         (WI.TimelineManager.prototype.reset):
100         (WI.TimelineManager.prototype.get activeRecording):
101         (WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
102         (WI.TimelineManager.prototype.isCapturing):
103         (WI.TimelineManager.prototype.startCapturing):
104         (WI.TimelineManager.prototype.stopCapturing):
105         (WI.TimelineManager.prototype.processJSON):
106         (WI.TimelineManager.prototype.capturingStarted):
107         (WI.TimelineManager.prototype.capturingStopped):
108         (WI.TimelineManager.prototype.autoCaptureStarted):
109         (WI.TimelineManager.prototype.eventRecorded):
110         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
111         (WI.TimelineManager.prototype.pageLoadEventFired):
112         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
113         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
114         (WI.TimelineManager.prototype.memoryTrackingUpdated):
115         (WI.TimelineManager.prototype.memoryTrackingCompleted):
116         (WI.TimelineManager.prototype.heapTrackingStarted):
117         (WI.TimelineManager.prototype.heapTrackingCompleted):
118         (WI.TimelineManager.prototype.heapSnapshotAdded):
119         (WI.TimelineManager.prototype._updateCapturingState): Added.
120         (WI.TimelineManager.prototype._processRecord):
121         (WI.TimelineManager.prototype._processEvent):
122         (WI.TimelineManager.prototype._loadNewRecording):
123         (WI.TimelineManager.prototype._addRecord):
124         (WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
125         (WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
126         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
127         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
128         (WI.TimelineManager.prototype._resourceWasAdded):
129         (WI.TimelineManager.prototype._garbageCollected):
130         (WI.TimelineManager.prototype._memoryPressure):
131         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
132         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
133         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
134         (WI.TimelineManager.prototype._handleDOMNodeLowPowerChanged):
135         (WI.TimelineManager.prototype.unloadRecording): Deleted.
136         (WI.TimelineManager.prototype.programmaticCaptureStarted): Deleted.
137         (WI.TimelineManager.prototype.programmaticCaptureStopped): Deleted.
138         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): Deleted.
139         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): Deleted.
140
141         * UserInterface/Protocol/ScriptProfilerObserver.js:
142         (WI.ScriptProfilerObserver.prototype.trackingComplete):
143         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
144         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
145         * UserInterface/Protocol/TimelineObserver.js:
146         (WI.TimelineObserver.prototype.programmaticCaptureStarted):
147         (WI.TimelineObserver.prototype.programmaticCaptureStopped):
148         It is possible to determine when programmatic capturing starts/stops in the frontend based
149         on the state when the backend causes the state to change, such as if the state is "inactive"
150         when the frontend is told that the backend has started capturing.
151
152         * UserInterface/Protocol/CPUProfilerObserver.js:
153         (WI.CPUProfilerObserver.prototype.trackingComplete):
154         * UserInterface/Protocol/MemoryObserver.js:
155         (WI.MemoryObserver.prototype.trackingComplete):
156         Send an end timestamp to match other instruments.
157
158         * UserInterface/Controllers/DebuggerManager.js:
159         (WI.DebuggerManager):
160         (WI.DebuggerManager.prototype._handleTimelineCapturingStateChanged): Added.
161         (WI.DebuggerManager.prototype._timelineCapturingWillStart): Deleted.
162         (WI.DebuggerManager.prototype._timelineCapturingStopped): Deleted.
163         * UserInterface/Models/DefaultDashboard.js:
164         (WI.DefaultDashboard):
165         (WI.DefaultDashboard.prototype._handleTimelineCapturingStateChanged): Added.
166         (WI.DefaultDashboard.prototype._capturingStopped): Deleted.
167         * UserInterface/Views/DebuggerSidebarPanel.js:
168         (WI.DebuggerSidebarPanel):
169         (WI.DebuggerSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
170         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Deleted.
171         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Deleted.
172         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
173         (WI.SourcesNavigationSidebarPanel):
174         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
175         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart): Deleted.
176         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped): Deleted.
177         * UserInterface/Views/TimelineOverview.js:
178         (WI.TimelineOverview):
179         (WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged): Added.
180         (WI.TimelineOverview.prototype._capturingStarted): Deleted.
181         (WI.TimelineOverview.prototype._capturingStopped): Deleted.
182         * UserInterface/Views/TimelineRecordingContentView.js:
183         (WI.TimelineRecordingContentView):
184         (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged): Added.
185         (WI.TimelineRecordingContentView.prototype._recordingUnloaded):
186         (WI.TimelineRecordingContentView.prototype._capturingStarted): Deleted.
187         (WI.TimelineRecordingContentView.prototype._capturingStopped): Deleted.
188         * UserInterface/Views/TimelineTabContentView.js:
189         (WI.TimelineTabContentView):
190         (WI.TimelineTabContentView.prototype._handleTimelineCapturingStateChanged): Added.
191         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped): Deleted.
192         Use the new single event for all Timelines capture state changes.
193         Prevent the record button from being clicked when capturing is in a transition state.
194
195 2019-04-11  Truitt Savell  <tsavell@apple.com>
196
197         Unreviewed, rolling out r244158.
198
199         Casued 8 inspector/timeline/ test failures.
200
201         Reverted changeset:
202
203         "Web Inspector: Timelines: can't reliably stop/start a
204         recording"
205         https://bugs.webkit.org/show_bug.cgi?id=196778
206         https://trac.webkit.org/changeset/244158
207
208 2019-04-10  Devin Rousso  <drousso@apple.com>
209
210         Web Inspector: save sheet should be anchored underneath the tab bar when detached
211         https://bugs.webkit.org/show_bug.cgi?id=196722
212         <rdar://problem/49613280>
213
214         Reviewed by Timothy Hatcher.
215
216         * UserInterface/Base/Main.js:
217         (WI.contentLoaded):
218
219 2019-04-10  Devin Rousso  <drousso@apple.com>
220
221         Web Inspector: Timelines: can't reliably stop/start a recording
222         https://bugs.webkit.org/show_bug.cgi?id=196778
223         <rdar://problem/47606798>
224
225         Reviewed by Timothy Hatcher.
226
227         Rather than have a binary state of capturing/not-capturing, we should use a four state:
228          1. inactive (when the backend has stopped capturing)
229          2. starting (when the frontend requests capturing to start)
230          3. active (when the backend has started capturing)
231          4. stopping (when the frontend requests capturing to stop)
232
233         Capturing is considered "on" when not in an "inactive" state. Prevent the frontend from
234         starting/stopping capturing unless we're in a "stable" ("inactive" or "active") state, not a
235         "transition" ("starting" or "stopping") state.
236
237         One "side effect" of this change is that since the capturing is considered active until the
238         backend has stopped capturing, we will continue to process records in the frontend even if
239         the frontend has requested to stop capturing. <https://webkit.org/b/152904>
240
241         * UserInterface/Controllers/TimelineManager.js:
242         (WI.TimelineManager):
243         (WI.TimelineManager.prototype.get capturingState): Added.
244         (WI.TimelineManager.prototype.reset):
245         (WI.TimelineManager.prototype.get activeRecording):
246         (WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
247         (WI.TimelineManager.prototype.isCapturing):
248         (WI.TimelineManager.prototype.startCapturing):
249         (WI.TimelineManager.prototype.stopCapturing):
250         (WI.TimelineManager.prototype.processJSON):
251         (WI.TimelineManager.prototype.capturingStarted):
252         (WI.TimelineManager.prototype.capturingStopped):
253         (WI.TimelineManager.prototype.autoCaptureStarted):
254         (WI.TimelineManager.prototype.eventRecorded):
255         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
256         (WI.TimelineManager.prototype.pageLoadEventFired):
257         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
258         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
259         (WI.TimelineManager.prototype.memoryTrackingUpdated):
260         (WI.TimelineManager.prototype.memoryTrackingCompleted):
261         (WI.TimelineManager.prototype.heapTrackingStarted):
262         (WI.TimelineManager.prototype.heapTrackingCompleted):
263         (WI.TimelineManager.prototype.heapSnapshotAdded):
264         (WI.TimelineManager.prototype._updateCapturingState): Added.
265         (WI.TimelineManager.prototype._processRecord):
266         (WI.TimelineManager.prototype._processEvent):
267         (WI.TimelineManager.prototype._loadNewRecording):
268         (WI.TimelineManager.prototype._addRecord):
269         (WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
270         (WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
271         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
272         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
273         (WI.TimelineManager.prototype._mainResourceDidChange):
274         (WI.TimelineManager.prototype._resourceWasAdded):
275         (WI.TimelineManager.prototype._garbageCollected):
276         (WI.TimelineManager.prototype._memoryPressure):
277         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
278         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
279         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
280         (WI.TimelineManager.prototype._handleDOMNodeLowPowerChanged):
281         (WI.TimelineManager.prototype.unloadRecording): Deleted.
282         (WI.TimelineManager.prototype.programmaticCaptureStarted): Deleted.
283         (WI.TimelineManager.prototype.programmaticCaptureStopped): Deleted.
284         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): Deleted.
285         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): Deleted.
286
287         * UserInterface/Protocol/ScriptProfilerObserver.js:
288         (WI.ScriptProfilerObserver.prototype.trackingComplete):
289         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
290         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
291         * UserInterface/Protocol/TimelineObserver.js:
292         (WI.TimelineObserver.prototype.programmaticCaptureStarted):
293         (WI.TimelineObserver.prototype.programmaticCaptureStopped):
294         It is possible to determine when programmatic capturing starts/stops in the frontend based
295         on the state when the backend causes the state to change, such as if the state is "inactive"
296         when the frontend is told that the backend has started capturing.
297
298         * UserInterface/Protocol/CPUProfilerObserver.js:
299         (WI.CPUProfilerObserver.prototype.trackingComplete):
300         * UserInterface/Protocol/MemoryObserver.js:
301         (WI.MemoryObserver.prototype.trackingComplete):
302         Send an end timestamp to match other instruments.
303
304         * UserInterface/Controllers/DebuggerManager.js:
305         (WI.DebuggerManager):
306         (WI.DebuggerManager.prototype._handleTimelineCapturingStateChanged): Added.
307         (WI.DebuggerManager.prototype._timelineCapturingWillStart): Deleted.
308         (WI.DebuggerManager.prototype._timelineCapturingStopped): Deleted.
309         * UserInterface/Models/DefaultDashboard.js:
310         (WI.DefaultDashboard):
311         (WI.DefaultDashboard.prototype._handleTimelineCapturingStateChanged): Added.
312         (WI.DefaultDashboard.prototype._capturingStopped): Deleted.
313         * UserInterface/Views/DebuggerSidebarPanel.js:
314         (WI.DebuggerSidebarPanel):
315         (WI.DebuggerSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
316         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Deleted.
317         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Deleted.
318         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
319         (WI.SourcesNavigationSidebarPanel):
320         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
321         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart): Deleted.
322         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped): Deleted.
323         * UserInterface/Views/TimelineOverview.js:
324         (WI.TimelineOverview):
325         (WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged): Added.
326         (WI.TimelineOverview.prototype._capturingStarted): Deleted.
327         (WI.TimelineOverview.prototype._capturingStopped): Deleted.
328         * UserInterface/Views/TimelineRecordingContentView.js:
329         (WI.TimelineRecordingContentView):
330         (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged): Added.
331         (WI.TimelineRecordingContentView.prototype._recordingUnloaded):
332         (WI.TimelineRecordingContentView.prototype._capturingStarted): Deleted.
333         (WI.TimelineRecordingContentView.prototype._capturingStopped): Deleted.
334         * UserInterface/Views/TimelineTabContentView.js:
335         (WI.TimelineTabContentView):
336         (WI.TimelineTabContentView.prototype._handleTimelineCapturingStateChanged): Added.
337         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped): Deleted.
338         Use the new single event for all Timelines capture state changes.
339         Prevent the record button from being clicked when capturing is in a transition state.
340
341 2019-04-10  Devin Rousso  <drousso@apple.com>
342
343         Web Inspector: REGRESSION: Audit: result UI shown on first open if an audit was previously selected
344         https://bugs.webkit.org/show_bug.cgi?id=196723
345         <rdar://problem/49722252>
346
347         Reviewed by Timothy Hatcher.
348
349         When opening Web Inspector for the first time, we will trigger resize `layout`s on the main
350         content area as Web Inspector is resized to it's old window size.
351
352         Rather than treating this layout as a `View.LayoutReason.Resize`, we should treat the
353         first `layout` (e.g. `initialLayout`) as a `View.LayoutReason.Dirty` instead, as there was
354         previously no content.
355
356         * UserInterface/Views/View.js:
357         (WI.View.prototype._layoutSubtree):
358         (WI.View.prototype._setLayoutReason):
359
360         * UserInterface/Views/AuditTestContentView.js:
361         (WI.AuditTestContentView):
362         Drive-by: ensure that this class is not instantiated directly.
363
364 2019-04-10  Devin Rousso  <drousso@apple.com>
365
366         Web Inspector: Debugger: current call frame indicator is indented when there is more than one thread
367         https://bugs.webkit.org/show_bug.cgi?id=196580
368         <rdar://problem/49582138>
369
370         Reviewed by Timothy Hatcher.
371
372         * UserInterface/Views/CallFrameTreeElement.css:
373         (.tree-outline .item.call-frame .status):
374         (.tree-outline.single-thread .item.call-frame .status): Added.
375
376 2019-04-10  Devin Rousso  <drousso@apple.com>
377
378         Web Inspector: REGRESSION (r238602): Elements: deleting the last child of a collapsed parent selects the parent's next sibling
379         https://bugs.webkit.org/show_bug.cgi?id=192711
380         <rdar://problem/46738990>
381
382         Reviewed by Timothy Hatcher.
383
384         Original patch by Matt Baker <mattbaker@apple.com>.
385
386         * UserInterface/Controllers/SelectionController.js:
387         (WI.SelectionController.prototype.removeSelectedItems):
388         When looking for a new item to select, start with the item preceding the
389         selection, instead of the item following the selection. This matches
390         pre-multiple selection behavior, as well as Mail and Xcode.
391
392         * UserInterface/Views/DOMTreeElement.js:
393         (WI.DOMTreeElement.prototype.onexpand):
394         Drive-by fix: when a hidden node is selected, its selection area is drawn
395         with a height of 0px. Update the selection area once the hidden node's
396         parent is expanded. AFAIK, this has always been broken.
397
398         * UserInterface/Views/DOMTreeOutline.js:
399         (WI.DOMTreeOutline.prototype.ondelete):
400         After a delete the `SelectionController` may have chosen a child of a
401         collapsed parent as the new selected item. If the item isn't the closing tag (e.g. after
402         deleting the last child), reveal it.
403
404         (WI.DOMTreeOutline.prototype.selectionControllerPreviousSelectableItem):
405
406         * UserInterface/Views/TreeElement.js:
407         (WI.TreeElement.prototype.get previousSelectableSibling): Added.
408         (WI.TreeElement.prototype.get nextSelectableSibling): Added.
409
410         * UserInterface/Views/TreeOutline.js:
411         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
412         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
413         Set `skipUnrevealed` to false, so that children of collapsed parent nodes
414         are considered when looking for an item to selected after a delete. Hidden `TreeElement`s
415         are still ignored as they aren't `selectable`.
416
417 2019-04-10  Devin Rousso  <drousso@apple.com>
418
419         Web Inspector: Elements tab: multiple selection lost after navigating to another tab
420         https://bugs.webkit.org/show_bug.cgi?id=192681
421         <rdar://problem/46709392>
422
423         Reviewed by Timothy Hatcher.
424
425         Orginal patch by Matt Baker <mattbaker@apple.com>.
426
427         * UserInterface/Controllers/SelectionController.js:
428         (WI.SelectionController.prototype.selectItem):
429         Simplify internal logic by removing an early return.
430
431         (WI.SelectionController.prototype.selectItems): Added.
432         (WI.SelectionController.prototype.selectAll):
433         Provide a means to select multiple items in a single operation.
434         If `_lastSelectedItem` is not in the items to select, the last
435         item being selected will become the last selected item.
436
437         (WI.SelectionController.prototype._deselectAllAndSelect):
438         Drive-by fix: correct a logic error. If no items are selected, the item
439         passed as an argument should still become selected.
440
441         * UserInterface/Views/TreeOutline.js:
442         (WI.TreeOutline.prototype.selectTreeElements): Added.
443
444         * UserInterface/Views/DOMTreeElement.js:
445         (WI.DOMTreeElement):
446         (WI.DOMTreeElement.prototype.get closeTagTreeElement): Added.
447         (WI.DOMTreeElement.prototype._updateChildren):
448         Make the close tag `TreeElement` available from the open tag `TreeElement`.
449
450         * UserInterface/Views/DOMTreeOutline.js:
451         (WI.DOMTreeOutline.prototype.update):
452         Restore selected `TreeElement`s after updating.
453
454         * UserInterface/Base/Utilities.js:
455         * UserInterface/Test.html:
456
457 2019-04-08  Matt Baker  <mattbaker@apple.com>
458
459         Web Inspector: Elements tab: Classes toggle should use accent color on hover
460         https://bugs.webkit.org/show_bug.cgi?id=196266
461
462         Reviewed by Devin Rousso.
463
464         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
465         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
466         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle::before):
467         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)):
468         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)::before):
469         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover::before):
470         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected:active::before):
471         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected): Deleted.
472         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover): Deleted.
473
474 2019-04-08  Devin Rousso  <drousso@apple.com>
475
476         Web Inspector: REGRESSION: Audit: default audits aren't added when an existing audit is present
477         https://bugs.webkit.org/show_bug.cgi?id=196663
478         <rdar://problem/49660757>
479
480         Reviewed by Timothy Hatcher.
481
482         Rather than have a button that allows the user to re-add the default audits, prevent them
483         from being deletable in the first place. "Deleting" a default audit will instead mark it as
484         disabled (and beep if it is already disabled).
485
486         * UserInterface/Controllers/AuditManager.js:
487         (WI.AuditManager.prototype.loadStoredTests):
488         (WI.AuditManager.prototype.removeTest):
489         (WI.AuditManager.prototype._addDefaultTests): Added.
490         (WI.AuditManager.prototype.addDefaultTestsIfNeeded): Deleted.
491
492         * UserInterface/Views/AuditNavigationSidebarPanel.js:
493         (WI.AuditNavigationSidebarPanel.prototype._addTest):
494         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
495         (WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
496         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
497         * UserInterface/Views/AuditNavigationSidebarPanel.css:
498         (.sidebar > .panel.navigation.audit.has-results > .content > .message-text-view.no-enabled-audits): Added.
499         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view): Deleted.
500         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > .message): Deleted.
501         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > button): Deleted.
502
503         * Localizations/en.lproj/localizedStrings.js:
504
505 2019-04-06  Nikita Vasilyev  <nvasilyev@apple.com>
506
507         REGRESSION(r237196): Web Inspector: Computed panel shouldn't update when it isn't visible
508         https://bugs.webkit.org/show_bug.cgi?id=196667
509         <rdar://problem/49664912>
510
511         Reviewed by Timothy Hatcher.
512
513         Explicitly define `hidden` and `shown` methods instead of relying on SidebarPanel's `visible` getter.
514
515         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
516         (WI.GeneralStyleDetailsSidebarPanel.prototype.visibilityDidChange): Deleted.
517         (WI.GeneralStyleDetailsSidebarPanel.prototype.hidden): Added.
518         (WI.GeneralStyleDetailsSidebarPanel.prototype.shown): Added.
519
520 2019-04-05  Devin Rousso  <drousso@apple.com>
521
522         Web Inspector: TestSuite test cases should have their own timeout to ensure tests fail with output instead of timeout by test runner
523         https://bugs.webkit.org/show_bug.cgi?id=162814
524         <rdar://problem/28574102>
525
526         Reviewed by Brian Burg.
527
528         A 10s timer is started for every test case added to an async suite. The timer is cleared
529         when the test finishes, but if the timer fires, the test is forcibly ended with an error.
530
531         This timer can be configured by setting a `timeout` value when adding the test case. Values
532         are expected to be in milliseconds. The value `-1` will prevent a timer from being set.
533
534         This change also relaxes the expectation that any individual test case failure will stop the
535         rest of the suite from running. Since timers are set per test case, it is possible to
536         recover from a "bad" test case to still run the remaining test cases.
537
538         NOTE: there may be unexpected behaviour if a test times out, as the timer doesn't actually
539         stop the execution of the test, so it may still run and log information, which may appear
540         "out of nowhere" in the middle of other tests.
541
542         * UserInterface/Test/TestSuite.js:
543         (TestSuite.prototype.get passCount):
544         (AsyncTestSuite.prototype.runTestCases):
545         (SyncTestSuite.prototype.runTestCases):
546
547 2019-04-03  Devin Rousso  <drousso@apple.com>
548
549         Web Inspector: Single click on links in non-read-only TextEditors should not follow links
550         https://bugs.webkit.org/show_bug.cgi?id=123364
551         <rdar://problem/15323913>
552
553         Reviewed by Timothy Hatcher.
554
555         * UserInterface/Base/Main.js:
556         (WI._updateModifierKeys):
557         Add classes to the body whenever alt, shift, or ctrl are pressed.
558
559         * UserInterface/Views/CodeMirrorEditor.js:
560         (WI.CodeMirrorEditor.create):
561         Add a `read-only` class if the `CodeMirror` is readonly.
562
563         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
564         (.cm-s-default .cm-link,):
565         (.read-only.cm-s-default .cm-link:hover,):
566         (.cm-s-default .cm-link:hover,): Deleted.
567
568         * UserInterface/Views/TextEditor.js:
569         (WI.TextEditor.prototype.set readOnly):
570         (WI.TextEditor.prototype._openClickedLinks):
571
572 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
573
574         Remove support for -apple-trailing-word
575         https://bugs.webkit.org/show_bug.cgi?id=196525
576
577         Reviewed by Zalan Bujtas.
578
579         This CSS property is nonstandard and not used.
580
581         * UserInterface/Models/CSSKeywordCompletions.js:
582
583 2019-04-03  Nikita Vasilyev  <nvasilyev@apple.com>
584
585         Web Inspector: Uncaught Exception: TypeError: this._computedStyleSection.focus is not a function. (In 'this._computedStyleSection.focus()', 'this._computedStyleSection.focus' is undefined)
586         https://bugs.webkit.org/show_bug.cgi?id=192108
587         <rdar://problem/46685392>
588
589         Reviewed by Devin Rousso.
590
591         This patch fixes the uncaught exception. Tabbing to and from "Properties" section continues
592         working the same way as before the patch.
593
594         * UserInterface/Views/ComputedStyleDetailsPanel.js:
595         (WI.ComputedStyleDetailsPanel.prototype.focusFirstSection): Deleted.
596         (WI.ComputedStyleDetailsPanel.prototype.focusLastSection): Deleted.
597
598 2019-04-02  Devin Rousso  <drousso@apple.com>
599
600         Web Inspector: Elements: DOM breakpoint icon should stroke when hovering selection area
601         https://bugs.webkit.org/show_bug.cgi?id=196516
602         <rdar://problem/49540494>
603
604         Reviewed by Timothy Hatcher.
605
606         * UserInterface/Views/DOMTreeContentView.css:
607         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint,): Added.
608         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Added.
609         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, :hover) .status-image.breakpoint): Deleted.
610         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, :hover) .status-image.breakpoint.subtree): Deleted.
611
612 2019-04-01  Devin Rousso  <drousso@apple.com>
613
614         Web Inspector: Debugger: modernize serialization of breakpoints and the maps that hold them
615         https://bugs.webkit.org/show_bug.cgi?id=196230
616         <rdar://problem/49236485>
617
618         Reviewed by Joseph Pecoraro.
619
620         * UserInterface/Controllers/DebuggerManager.js:
621         (WI.DebuggerManager):
622         (WI.DebuggerManager.prototype.breakpointsForSourceCode):
623         (WI.DebuggerManager.prototype.addBreakpoint):
624         (WI.DebuggerManager.prototype.removeBreakpoint):
625         (WI.DebuggerManager.prototype._setBreakpoint):
626         (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
627
628         * UserInterface/Models/Breakpoint.js:
629         (WI.Breakpoint):
630         (WI.Breakpoint.fromJSON): Added.
631         (WI.Breakpoint.prototype.toJSON):
632         (WI.Breakpoint.prototype.set resolved):
633         (WI.Breakpoint.prototype.recreateAction):
634         (WI.Breakpoint.prototype.saveIdentityToCookie):
635         (WI.Breakpoint.prototype._isSpecial): Added.
636         (WI.Breakpoint.set resolved.isSpecialBreakpoint): Deleted.
637         (WI.Breakpoint.serializeOptions): Deleted.
638
639         * UserInterface/Models/BreakpointAction.js:
640         (WI.BreakpointAction):
641         (WI.BreakpointAction.fromJSON): Added.
642         (WI.BreakpointAction.prototype.toProtocol): Added.
643
644         * UserInterface/Views/DebuggerSidebarPanel.js:
645         (WI.DebuggerSidebarPanel.prototype._addBreakpointsForSourceCode):
646
647         * UserInterface/Views/SourceCodeTextEditor.js:
648         (WI.SourceCodeTextEditor.prototype._prepareEditorForInitialContent):
649         (WI.SourceCodeTextEditor.prototype._breakpointsEnabledDidChange):
650
651 2019-04-01  Devin Rousso  <drousso@apple.com>
652
653         Web Inspector: DOMDebugger: disabling a breakpoint for a specific event listener removes it from the UI
654         https://bugs.webkit.org/show_bug.cgi?id=196453
655         <rdar://problem/49489318>
656
657         Reviewed by Joseph Pecoraro.
658
659         Allow breakpoints for specific event listeners to be disabled, rather than immeditately
660         removing/deleting them when they are about to become disabled. This preserves the existing
661         functionality, but now allows for the tree element to stay in the UI in a disabled state.
662
663         * UserInterface/Controllers/DOMManager.js:
664         (WI.DOMManager):
665         (WI.DOMManager.prototype.setBreakpointForEventListener):
666         (WI.DOMManager.prototype.removeBreakpointForEventListener):
667         (WI.DOMManager.prototype.removeEventListenerBreakpointsForNode): Added.
668         (WI.DOMManager.prototype._updateEventBreakpoint): Added.
669         (WI.DOMManager.prototype._handleEventBreakpointDisabledStateChanged): Added.
670
671         * UserInterface/Controllers/DOMDebuggerManager.js:
672         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
673
674         * UserInterface/Views/EventBreakpointTreeElement.js:
675         (WI.EventBreakpointTreeElement.prototype.populateContextMenu):
676         (WI.EventBreakpointTreeElement.prototype._toggleBreakpoint):
677
678         * UserInterface/Views/ContextMenuUtilities.js:
679         (WI.appendContextMenuItemsForDOMNodeBreakpoints):
680
681         * UserInterface/Views/DOMNodeTreeElement.js:
682         (WI.DOMNodeTreeElement.prototype.ondelete):
683
684 2019-04-01  Devin Rousso  <drousso@apple.com>
685
686         Web Inspector: Canvas: auto-record after page load sometimes shows the wrong UI
687         https://bugs.webkit.org/show_bug.cgi?id=196320
688         <rdar://problem/49356686>
689
690         Reviewed by Joseph Pecoraro.
691
692         It was previously possible that the timing of a recording being started and the preview
693         image being loaded would not always be in the same order.
694
695         Utilize the existing `View.prototype.layout` mechanics to ensure that updates are coalesced
696         and that the changes are always applied in a particular order.
697
698         * UserInterface/Views/CanvasContentView.js:
699         (WI.CanvasContentView):
700         (WI.CanvasContentView.prototype.refreshPreview): Added.
701         (WI.CanvasContentView.prototype.initialLayout):
702         (WI.CanvasContentView.prototype.layout):
703         (WI.CanvasContentView.prototype.shown):
704         (WI.CanvasContentView.prototype.attached):
705         (WI.CanvasContentView.prototype._refreshPixelSize):
706         (WI.CanvasContentView.prototype.refresh): Deleted.
707         (WI.CanvasContentView.prototype._recordingStarted): Deleted.
708         (WI.CanvasContentView.prototype._recordingProgress): Deleted.
709         (WI.CanvasContentView.prototype._recordingStopped): Deleted.
710         (WI.CanvasContentView.prototype._shaderProgramAdded): Deleted.
711         (WI.CanvasContentView.prototype._shaderProgramRemoved): Deleted.
712
713         * UserInterface/Views/CanvasOverviewContentView.js:
714         (WI.CanvasOverviewContentView.prototype._refreshPreviews):
715
716 2019-04-01  Devin Rousso  <drousso@apple.com>
717
718         Web Inspector: Canvas: add compatibility support for WebMetal
719         https://bugs.webkit.org/show_bug.cgi?id=196412
720         <rdar://problem/49439417>
721
722         Reviewed by Joseph Pecoraro.
723
724         * UserInterface/Models/Canvas.js:
725         (WI.Canvas.fromPayload):
726         (WI.Canvas.displayNameForContextType):
727         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
728         * Versions/Inspector-iOS-12.2.json:
729
730 2019-04-01  Devin Rousso  <drousso@apple.com>
731
732         Web Inspector: "Copy as HTML" appears twice when showing a context menu for a logged node
733         https://bugs.webkit.org/show_bug.cgi?id=196271
734         <rdar://problem/49290676>
735
736         Reviewed by Joseph Pecoraro.
737
738         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
739         (WI.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
740
741         * Localizations/en.lproj/localizedStrings.js:
742
743 2019-04-01  Devin Rousso  <drousso@apple.com>
744
745         Web Inspector: Debugger: breakpoints don't populate in inspector2 on first load
746         https://bugs.webkit.org/show_bug.cgi?id=196063
747         <rdar://problem/49097787>
748
749         Reviewed by Joseph Pecoraro.
750
751         In the case that a breakpoint becomes resolved after the resource has finished loaded, there
752         won't be an already existing `TreeElement` for the breakpoint to replace.
753
754         This can realistically only happen if the IndexedDB lookup is super slow, or the resource is
755         extremely fast (e.g. a `data` url).
756
757         * UserInterface/Views/DebuggerSidebarPanel.js:
758         (WI.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
759         (WI.DebuggerSidebarPanel.prototype._addDebuggerObject): Deleted.
760
761         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
762         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
763         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
764         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
765
766 2019-04-01  Joseph Pecoraro  <pecoraro@apple.com>
767
768         Web Inspector: CPU Usage Timeline - Adjust Energy Impact Threshholds
769         https://bugs.webkit.org/show_bug.cgi?id=196421
770         <rdar://problem/49125703>
771
772         Reviewed by Devin Rousso.
773
774         - Low - Keep Below 3% to continue to encourage idle pages stay below 3%
775           Might want to reduce to 2.5 or 2 after fixing bug 196419.
776
777         - High - Make Above 30% instead of 50% to encourage long running interactivity to stay below 30%
778           Depends on interaction, but sustained (1-2min) at 30%+ will certainly impact battery.
779
780         - Very High - Make above 100% instead of 150%
781           CPU Usage spikes around page load and is quite often still under 100% despite many threads.
782           Drop this a bit as we dropped High down.
783
784         Reduce the size of the Medium section, and increase the High section
785         Having 70% of the chart be "Medium" is just too much Medium, and
786         we've now made it more possible to be in the High range.
787
788         * UserInterface/Views/CPUTimelineView.js:
789         (WI.CPUTimelineView.prototype.get mediumEnergyThreshold):
790         (WI.CPUTimelineView.prototype.get highEnergyThreshold):
791         (WI.CPUTimelineView.prototype.get lowEnergyGraphBoundary):
792         (WI.CPUTimelineView.prototype.get mediumEnergyGraphBoundary):
793         (WI.CPUTimelineView.prototype.get highEnergyGraphBoundary):
794         (WI.CPUTimelineView.prototype.initialLayout):
795         (WI.CPUTimelineView.prototype.layout.bestThreadLayoutMax):
796         (WI.CPUTimelineView.prototype._layoutEnergyChart):
797
798 2019-03-29  Myles C. Maxfield  <mmaxfield@apple.com>
799
800         Delete WebMetal implementation in favor of WebGPU
801         https://bugs.webkit.org/show_bug.cgi?id=195418
802
803         Reviewed by Dean Jackson.
804
805         * UserInterface/Models/Canvas.js:
806         (WI.Canvas.fromPayload):
807         (WI.Canvas.displayNameForContextType):
808         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
809         * Versions/Inspector-iOS-12.2.json:
810
811 2019-03-29  Devin Rousso  <drousso@apple.com>
812
813         Web Inspector: Storage: some cookie column headers are not localized
814         https://bugs.webkit.org/show_bug.cgi?id=196406
815         <rdar://problem/48467422>
816
817         Reviewed by Joseph Pecoraro.
818
819         * UserInterface/Views/CookieStorageContentView.js:
820         (WI.CookieStorageContentView.prototype.initialLayout):
821
822         * Localizations/en.lproj/localizedStrings.js:
823
824 2019-03-28  Joseph Pecoraro  <pecoraro@apple.com>
825
826         Web Inspector: Show Resource Initiator in Network Tab detail views
827         https://bugs.webkit.org/show_bug.cgi?id=196316
828         <rdar://problem/49352679>
829
830         Reviewed by Devin Rousso.
831
832         * UserInterface/Controllers/NetworkManager.js:
833         (WI.NetworkManager.prototype.resourceRequestWillBeSent):
834         (WI.NetworkManager.prototype.resourceRequestWasServedFromMemoryCache):
835         (WI.NetworkManager.prototype._initiatorCallFramesFromPayload):
836         Initialize call frames from the initiator payload.
837
838         * UserInterface/Models/Resource.js:
839         (WI.Resource.prototype.get initiatorCallFrames):
840         Initialization and accessor.
841
842         * UserInterface/Views/CallFrameTreeElement.js:
843         (WI.CallFrameTreeElement):
844         Selecting a native element won't do anything so just don't allow selection.
845
846         * UserInterface/Views/ResourceHeadersContentView.css:
847         (.resource-headers .go-to-link):
848         (.resource-headers .call-stack):
849         (.resource-headers .call-stack:hover):
850         (@media (prefers-color-scheme: dark)):
851         * UserInterface/Views/ResourceHeadersContentView.js:
852         (WI.ResourceHeadersContentView):
853         (WI.ResourceHeadersContentView.prototype.hidden):
854         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
855         Add an "Initiator" line in the summary with a way to view the whole
856         initiator backtrace if one exists.
857
858 2019-03-26  Devin Rousso  <drousso@apple.com>
859
860         Web Inspector: Sources: fix typo in CSS selector to always show add breakpoint button
861         https://bugs.webkit.org/show_bug.cgi?id=196241
862
863         Reviewed by Matt Baker.
864
865         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
866         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoints).collapsed > .header > .options,):
867         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,): Deleted.
868
869 2019-03-25  Joseph Pecoraro  <pecoraro@apple.com>
870
871         Web Inspector: Page Weight indicator clears on pages with zero length resources (macrumors.com)
872         https://bugs.webkit.org/show_bug.cgi?id=196170
873
874         Reviewed by Timothy Hatcher.
875
876         * UserInterface/Models/DefaultDashboard.js:
877         (WI.DefaultDashboard.prototype._resourceSizeDidChange):
878         Catch NaN earlier.
879
880         * UserInterface/Models/Resource.js:
881         (WI.Resource.prototype.updateWithMetrics):
882         When we receive exact metrics transition the estimated size to zero,
883         since we won't receive any more updates for the resource.
884
885 2019-03-24  Devin Rousso  <drousso@apple.com>
886
887         Web Inspector: Canvas: WebGL action icon shouldn't invert when selected
888         https://bugs.webkit.org/show_bug.cgi?id=196135
889
890         Reviewed by Timothy Hatcher.
891
892         * UserInterface/Views/RecordingActionTreeElement.js:
893         (WI.RecordingActionTreeElement._classNameForAction):
894         (WI.RecordingActionTreeElement._classNameForAction.classNameForActionName): Deleted.
895         Remove unnecessary logging and memoization.
896
897         * UserInterface/Views/RecordingActionTreeElement.css:
898         (.tree-outline:focus .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Added.
899         (@media (prefers-color-scheme: dark)):
900         (.item.recording-action:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Added.
901         (.tree-outline:focus .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer) > .icon): Deleted.
902         (.item.recording-action.has-context-replacer > .icon): Deleted.
903         (.item.recording-action:not(.invalid, .initial-state, .has-context-replacer) > .icon): Deleted.
904         Simplify styles between light and dark mode.
905
906 2019-03-24  Simon Welsh  <simon@welsh-au.com>
907
908         Web Inspector: testCellRoleForRequiredChidren accessibility audit checks for rows in cells
909         https://bugs.webkit.org/show_bug.cgi?id=195988
910
911         Reviewed by Timothy Hatcher.
912
913         The audit now checks that rows contain cells, allowing any of the four
914         cell-based roles.
915
916         * UserInterface/Controllers/AuditManager.js:
917         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
918         (WI.AuditManager):
919         (WI.AuditManager.prototype.addDefaultTestsIfNeeded.const.testCellRoleForRequiredChidren): Deleted.
920
921 2019-03-24  Devin Rousso  <drousso@apple.com>
922
923         Web Inspector: Canvas: missing icons for WebGL2 contexts
924         https://bugs.webkit.org/show_bug.cgi?id=196136
925
926         Reviewed by Timothy Hatcher.
927
928         * UserInterface/Views/CanvasSidebarPanel.css:
929         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled > .glyph): Added.
930         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas:matches(.canvas-2d, .bitmaprenderer) .icon): Added.
931         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas:matches(.webgl, .webgl2, .webgpu, .webmetal) .icon): Added.
932         (@media (prefers-color-scheme: dark)):
933         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled): Deleted.
934         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.canvas-2d .icon): Deleted.
935         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.casnvas.webgl .icon): Deleted.
936         Use the 2D icon for BitmapRenderer and the 3D icon for WebGL2, WebMetals, and WebGPU.
937         Drive-by: the start/stop button text was too dark when disabled in dark mode.
938
939         * UserInterface/Models/Canvas.js:
940         Drive-by: "gpu" => "webgpu", to match the protocol string.
941
942 2019-03-22  Devin Rousso  <drousso@apple.com>
943
944         Web Inspector: Sources: "Reveal in Resources Tab" still shown when Sources tab is enabled
945         https://bugs.webkit.org/show_bug.cgi?id=196134
946
947         Reviewed by Joseph Pecoraro.
948
949         * UserInterface/Views/RecordingActionTreeElement.js:
950         (WI.RecordingActionTreeElement.prototype.populateContextMenu):
951         Drive-by: find the first call frame that has a source code location, rather than naively
952         always using the top call frame.
953
954         * UserInterface/Views/SearchResultTreeElement.js:
955         (WI.SearchResultTreeElement.prototype.populateContextMenu):
956
957 2019-03-22  Keith Rollin  <krollin@apple.com>
958
959         Enable ThinLTO support in Production builds
960         https://bugs.webkit.org/show_bug.cgi?id=190758
961         <rdar://problem/45413233>
962
963         Reviewed by Daniel Bates.
964
965         Enable building with Thin LTO in Production when using Xcode 10.2 or
966         later. This change results in a 1.45% progression in PLT5. Full
967         Production build times increase about 2-3%. Incremental build times
968         are more severely affected, and so LTO is not enabled for local
969         engineering builds.
970
971         LTO is enabled only on macOS for now, until rdar://problem/49013399,
972         which affects ARM builds, is fixed.
973
974         To change the LTO setting when building locally:
975
976         - If building with `make`, specify WK_LTO_MODE={none,thin,full} on the
977           command line.
978         - If building with `build-webkit`, specify --lto-mode={none,thin,full}
979           on the command line.
980         - If building with `build-root`, specify --lto={none,thin,full} on the
981           command line.
982         - If building with Xcode, create a LocalOverrides.xcconfig file at the
983           top level of your repository directory (if needed) and define
984           WK_LTO_MODE to full, thin, or none.
985
986         * Configurations/Base.xcconfig:
987
988 2019-03-21  Joseph Pecoraro  <pecoraro@apple.com>
989
990         Web Inspector: Timelines - Cannot export on about:blank - suggested filename containing a colon silently fails
991         https://bugs.webkit.org/show_bug.cgi?id=196109
992
993         Reviewed by Timothy Hatcher.
994
995         * UserInterface/Base/FileUtilities.js:
996         (WI.FileUtilities.sanitizeFilename):
997         (WI.FileUtilities.inspectorURLForFilename):
998         New utility functions.
999
1000         * UserInterface/Test.html:
1001         Include FileUtilities.
1002
1003         * UserInterface/Base/Main.js:
1004         * UserInterface/Controllers/AuditManager.js:
1005         (WI.AuditManager.prototype.export):
1006         * UserInterface/Debug/ProtocolTrace.js:
1007         (WI.ProtocolTrace.prototype.get saveData):
1008         (WI.ProtocolTrace):
1009         * UserInterface/Views/ConsoleMessageView.js:
1010         (WI.ConsoleMessageView.prototype._handleContextMenu):
1011         (WI.ConsoleMessageView):
1012         * UserInterface/Views/ContextMenuUtilities.js:
1013         * UserInterface/Views/HeapSnapshotContentView.js:
1014         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
1015         * UserInterface/Views/LogContentView.js:
1016         (WI.LogContentView.prototype.get saveData):
1017         (WI.LogContentView.prototype._handleContextMenuEvent):
1018         * UserInterface/Views/NetworkTableContentView.js:
1019         (WI.NetworkTableContentView.prototype._exportHAR):
1020         * UserInterface/Views/RecordingContentView.js:
1021         (WI.RecordingContentView.prototype._exportRecording):
1022         (WI.RecordingContentView.prototype._exportReduction):
1023         * UserInterface/Views/ScriptContentView.js:
1024         (WI.ScriptContentView.prototype.get saveData):
1025         * UserInterface/Views/ShaderProgramContentView.js:
1026         (WI.ShaderProgramContentView.prototype.get saveData):
1027         * UserInterface/Views/TextContentView.js:
1028         (WI.TextContentView.prototype.get saveData):
1029         * UserInterface/Views/TextResourceContentView.js:
1030         (WI.TextResourceContentView.prototype.get saveData):
1031         * UserInterface/Views/TimelineRecordingContentView.js:
1032         (WI.TimelineRecordingContentView.prototype._exportTimelineRecording):
1033         Update "web-inspector:///" URL building code to use the utility.
1034
1035 2019-03-21  Nikita Vasilyev  <nvasilyev@apple.com>
1036
1037         Web Inspector: Use CSS variables for text color in Computed panel
1038         https://bugs.webkit.org/show_bug.cgi?id=196117
1039
1040         Reviewed by Timothy Hatcher.
1041
1042         * UserInterface/Views/ComputedStyleSection.css:
1043         (.computed-style-section):
1044         (.computed-style-section .computed-property-item .property-trace-item .selector):
1045         (.computed-style-section .computed-property-item .go-to-link):
1046
1047 2019-03-21  Devin Rousso  <drousso@apple.com>
1048
1049         Web Inspector: Timelines: flatten the overview to show all records, one per line
1050         https://bugs.webkit.org/show_bug.cgi?id=191901
1051         <rdar://problem/46423618>
1052
1053         Reviewed by Timothy Hatcher.
1054
1055         * UserInterface/Views/OverviewTimelineView.js:
1056         (WI.OverviewTimelineView):
1057         (WI.OverviewTimelineView.prototype.closed):
1058         (WI.OverviewTimelineView.prototype.get navigationItems): Added.
1059         (WI.OverviewTimelineView.prototype.reset):
1060         (WI.OverviewTimelineView.prototype.layout):
1061         (WI.OverviewTimelineView.prototype.get _relevantTimelines): Added.
1062         (WI.OverviewTimelineView.prototype.get _shouldGroupBySourceCode): Added.
1063         (WI.OverviewTimelineView.prototype._loadExistingRecords): Added.
1064         (WI.OverviewTimelineView.prototype._insertDataGridNode):
1065         (WI.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
1066         (WI.OverviewTimelineView.prototype._addSourceCodeTimeline):
1067         (WI.OverviewTimelineView.prototype._processPendingRepresentedObjects):
1068         (WI.OverviewTimelineView.prototype._handleGroupBySourceCodeSettingChanged): Added.
1069         (WI.OverviewTimelineView.prototype._handleGroupBySourceCodeNavigationItemCheckedDidChange): Added.
1070         (WI.OverviewTimelineView.prototype._handleTimelineRecordAdded): Added.
1071         (WI.OverviewTimelineView.prototype._sourceCodeTimelineAdded):
1072         (WI.OverviewTimelineView.prototype._networkTimelineRecordAdded): Deleted.
1073         Listen for new records on all timelines. Add each record as a new line. Since each timeline
1074         has different data to display, only show the "name" and "graph" for all records.
1075
1076         * UserInterface/Views/TimelineRecordingContentView.js:
1077         (WI.TimelineRecordingContentView):
1078         (WI.TimelineRecordingContentView.prototype._currentContentViewDidChange):
1079         (WI.TimelineRecordingContentView.prototype._updateImportedView): Deleted.
1080         When viewing the overview of an imported recording, show the non-grouped overview.
1081
1082         * UserInterface/Models/TimelineRecording.js:
1083         (WI.TimelineRecording.prototype.addRecord):
1084         (WI.TimelineRecording.prototype._keyForRecord):
1085         Drive-by: show Media timeline events under the owner frame's resource when grouped.
1086
1087         * UserInterface/Views/TimelineRecordBar.css:
1088         (.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment, .timeline-record-bar.timeline-record-type-heap-allocations > .segment): Added.
1089         (.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment): Deleted.
1090
1091         * UserInterface/Base/Setting.js:
1092         Add setting for controlling the Timeline overview grouping.
1093
1094         * UserInterface/Main.html:
1095         * UserInterface/Views/SourceCodeTimelineTreeElement.js: Removed.
1096         * UserInterface/Views/TimelineRecordingImportedView.js: Removed.
1097         * UserInterface/Views/TimelineRecordingImportedView.css: Removed.
1098         Remove unused files.
1099
1100         * Localizations/en.lproj/localizedStrings.js:
1101
1102 2019-03-21  Devin Rousso  <drousso@apple.com>
1103
1104         Web Inspector: Sources: the name of the file should not be used as a folder
1105         https://bugs.webkit.org/show_bug.cgi?id=196064
1106         <rdar://problem/49097710>
1107
1108         Reviewed by Timothy Hatcher.
1109
1110         * UserInterface/Views/GeneralTreeElement.js:
1111         (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath):
1112
1113         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1114         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
1115         Drive-by: sort resources in each folder by name when grouping by path.
1116
1117 2019-03-20  Devin Rousso  <drousso@apple.com>
1118
1119         Web Inspector: Canvas: rework how Canvas.enable/Canvas.disable is used so that events are not sent when the Canvas tab isn't enabled
1120         https://bugs.webkit.org/show_bug.cgi?id=195828
1121         <rdar://problem/48941756>
1122
1123         Reviewed by Timothy Hatcher.
1124
1125         * UserInterface/Controllers/CanvasManager.js:
1126         (WI.CanvasManager):
1127         (WI.CanvasManager.prototype.initializeTarget):
1128         (WI.CanvasManager.prototype.enable): Added.
1129         (WI.CanvasManager.prototype.disable): Added.
1130
1131         * UserInterface/Views/CanvasTabContentView.js:
1132         (WI.CanvasTabContentView):
1133         (WI.CanvasTabContentView.prototype.closed): Added.
1134
1135         * UserInterface/Base/Test.js:
1136         (WI.contentLoaded):
1137
1138 2019-03-20  Devin Rousso  <drousso@apple.com>
1139
1140         Web Inspector: Sources: collapsing a section doesn't shrink the space used by that section
1141         https://bugs.webkit.org/show_bug.cgi?id=196045
1142
1143         Reviewed by Timothy Hatcher.
1144
1145         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1146         (WI.SourcesNavigationSidebarPanel):
1147         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
1148         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
1149         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1150         (.sidebar > .panel.navigation.sources > .content > .details-section):
1151         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,):
1152         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
1153         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint):
1154         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.pause-reason, .call-stack, .breakpoints) > .content,):
1155         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints) > .content):
1156         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content):
1157         (.sidebar > .panel.navigation.sources > .content > .details-section.call-stack):
1158         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints):
1159         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .create-breakpoint):
1160         (.sidebar > .panel.navigation.sources > .content > .pause-reason):
1161         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content,):
1162         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .tree-outline .item.event-target-window .icon):
1163         (.sidebar > .panel.navigation.sources > .content .details-section): Deleted.
1164         (.sidebar > .panel.navigation.sources > .content .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,): Deleted.
1165         (.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .content): Deleted.
1166         (.sidebar > .panel.navigation.sources > .content .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
1167         (.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
1168         (.sidebar > .panel.navigation.sources > .content > .call-stack-container): Deleted.
1169         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Deleted.
1170         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Deleted.
1171         (.sidebar > .panel.navigation.sources > .content > .resources-container): Deleted.
1172         (.sidebar > .panel.navigation.sources > .content > .pause-reason-container): Deleted.
1173         (.sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Deleted.
1174         (.sidebar > .panel.navigation.sources > .content > .breakpoints .tree-outline .item.event-target-window .icon): Deleted.
1175          - Apply the overflow scrolling to the content element of each `WI.DetailsSection`.
1176          - Ensure that there is a maximum height for each section.
1177          - When `.collapsed`, don't try to grow/shrink the section based on its contents.
1178
1179         * UserInterface/Views/CallFrameTreeElement.css:
1180         (.tree-outline .item.call-frame):
1181         (.tree-outline .item.call-frame .status):
1182         Make the container of the active call frame status indicator relatively positioned so that
1183         the active call frame status indicator will follow the container when scrolling.
1184
1185 2019-03-20  Devin Rousso  <drousso@apple.com>
1186
1187         Web Inspector: Timeline should show when events preventDefault() was called on an event or not
1188         https://bugs.webkit.org/show_bug.cgi?id=176824
1189         <rdar://problem/34290931>
1190
1191         Reviewed by Timothy Hatcher.
1192
1193         Original patch by Joseph Pecoraro <pecoraro@apple.com>.
1194
1195         * Localizations/en.lproj/localizedStrings.js:
1196         New string.
1197
1198         * UserInterface/Controllers/TimelineManager.js:
1199         (WI.TimelineManager.prototype._processRecord):
1200         Include the whole data object as extra details.
1201
1202         * UserInterface/Models/ScriptTimelineRecord.js:
1203         (WI.ScriptTimelineRecord):
1204         (WI.ScriptTimelineRecord.prototype.get eventType):
1205         Wholesale copy of the extra data instead of just a single property.
1206
1207         * UserInterface/Views/ScriptDetailsTimelineView.js:
1208         (WI.ScriptDetailsTimelineView):
1209         Give the name column more initial space, there is still extra space
1210         after this adjustment but name is comfortably larger (and the most
1211         likely to be expanded).
1212
1213         * UserInterface/Views/ScriptTimelineDataGridNode.js:
1214         (WI.ScriptTimelineDataGridNode.prototype.get subtitle):
1215         Include "default prevented" as the event's subtitle if it was prevented.
1216
1217 2019-03-20  Devin Rousso  <drousso@apple.com>
1218
1219         Web Inspector: Styles Redesign: Editing selector should not hide the rule
1220         https://bugs.webkit.org/show_bug.cgi?id=178489
1221         <rdar://problem/35062434>
1222
1223         Reviewed by Timothy Hatcher.
1224
1225         Extracts the selector payload parsing logic inside `WI.DOMNodeStyles` into static functions
1226         so that when the user changes the selector of a `WI.CSSRule`, it's able to process and
1227         update itself with the new selector. This is mainly useful in the case where the `WI.CSSRule`
1228         no longer applies to the selected node (meaning it won't be part of that node's
1229         `WI.DOMNodeStyles`) in that it allows the `WI.SpreadsheetCSSStyleDeclarationSection` to
1230         display the new selector text and the owner `WI.SpreadsheetRulesStyleDetailsPanel` to keep
1231         that section visible even though it isn't applicable to the current node anymore.
1232
1233         * UserInterface/Models/DOMNodeStyles.js:
1234         (WI.DOMNodeStyles):
1235         (WI.DOMNodeStyles.parseSelectorListPayload): Added.
1236         (WI.DOMNodeStyles.createSourceCodeLocation): Added.
1237         (WI.DOMNodeStyles.prototype.refresh):
1238         (WI.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
1239         (WI.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
1240         (WI.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
1241         (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
1242         (WI.DOMNodeStyles.prototype._parseRulePayload):
1243         (WI.DOMNodeStyles.prototype._styleSheetContentDidChange):
1244         (WI.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload): Deleted.
1245         (WI.DOMNodeStyles.prototype._createSourceCodeLocation): Deleted.
1246         (WI.DOMNodeStyles.prototype._parseSelectorListPayload): Deleted.
1247         Keep track of all `WI.CSSRule` and `WI.CSSStyleDeclaration` that have ever been associated
1248         with this object, so that if a rule's selector is changed to no longer match, and then is
1249         changed back to match again, we are able to update that rule instead of creating a new one.
1250
1251         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1252         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
1253         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
1254         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionSelectorWillChange): Added.
1255         Attempt to preserve the position of any sections that are changed and no longer apply to the
1256         current node.
1257
1258         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1259         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
1260         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
1261         Drive-by: remove unused CSS classes.
1262
1263         * UserInterface/Models/CSSRule.js:
1264         (WI.CSSRule.prototype.update):
1265         (WI.CSSRule.prototype._selectorResolved):
1266         Drive-by: remove unused event.
1267
1268         * UserInterface/Base/Multimap.js:
1269         (Multimap.prototype.has): Added.
1270         (Multimap.prototype.sets): Added.
1271         (Multimap.prototype.copy): Added.
1272
1273 2019-03-20  Devin Rousso  <drousso@apple.com>
1274
1275         Web Inspector: no way to filter out all console messages or all evaluations/results
1276         https://bugs.webkit.org/show_bug.cgi?id=167035
1277         <rdar://problem/30023523>
1278
1279         Reviewed by Timothy Hatcher.
1280
1281         * UserInterface/Views/LogContentView.js:
1282         (WI.LogContentView):
1283         (WI.LogContentView.prototype.didAppendConsoleMessageView):
1284         (WI.LogContentView.prototype._markScopeBarItemUnread):
1285         (WI.LogContentView.prototype._markScopeBarItemForMessageLevelUnread): Added.
1286         (WI.LogContentView.prototype._previousMessageRepeatCountUpdated):
1287         (WI.LogContentView.prototype._messageSourceBarSelectionDidChange):
1288         (WI.LogContentView.prototype._scopeBarSelectionDidChange):
1289         (WI.LogContentView.prototype._filterMessageElements):
1290         (WI.LogContentView.prototype.performSearch):
1291         * UserInterface/Views/LogContentView.css:
1292         (.log-scope-bar > li.unread.evaluations::before): Added.
1293
1294         * UserInterface/Views/ConsoleCommandView.js:
1295         (WI.ConsoleCommandView):
1296         Drive-by: remove unnecessary super-class extends.
1297
1298         * Localizations/en.lproj/localizedStrings.js:
1299
1300 2019-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
1301
1302         Web Inspector: Styles: enabledProperties don't get invalidated after removing property
1303         https://bugs.webkit.org/show_bug.cgi?id=196038
1304
1305         Reviewed by Timothy Hatcher.
1306
1307         * UserInterface/Models/CSSStyleDeclaration.js:
1308         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
1309
1310 2019-03-20  Devin Rousso  <drousso@apple.com>
1311
1312         Web Inspector: DOM: include window as part of any event listener chain
1313         https://bugs.webkit.org/show_bug.cgi?id=195730
1314         <rdar://problem/48916872>
1315
1316         Reviewed by Timothy Hatcher.
1317
1318         Allow non-nodes (e.g. `window`) to be listed as the target of an event listener.
1319         Add support for the same concept when showing breakpoint details after pausing on a specific
1320         event listener in the Debugger/Sources navigation sidebar.
1321
1322         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1323         (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
1324         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByEvent):
1325         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByTarget): Added.
1326         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback):
1327         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners):
1328         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode): Deleted.
1329
1330         * UserInterface/Views/EventListenerSectionGroup.js:
1331         (WI.EventListenerSectionGroup.prototype._targetTextOrLink): Added.
1332         (WI.EventListenerSectionGroup.prototype._nodeTextOrLink): Deleted.
1333
1334         * UserInterface/Views/DebuggerSidebarPanel.js:
1335         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
1336         (WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
1337         (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
1338         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
1339         * UserInterface/Views/DebuggerSidebarPanel.css:
1340         (.sidebar > .panel.navigation.debugger > .content > .breakpoints .tree-outline .item.event-target-window .icon): Added.
1341
1342         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1343         (WI.SourcesNavigationSidebarPanel):
1344         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
1345         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
1346         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
1347         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1348         (.sidebar > .panel.navigation.sources > .content > .breakpoints .tree-outline .item.event-target-window .icon): Added.
1349
1350         * Localizations/en.lproj/localizedStrings.js:
1351
1352 2019-03-20  Devin Rousso  <drousso@apple.com>
1353
1354         Web Inspector: Debugger: virtualize the list of variables in the Scope sidebar
1355         https://bugs.webkit.org/show_bug.cgi?id=192648
1356         <rdar://problem/46800949>
1357
1358         Reviewed by Joseph Pecoraro.
1359
1360         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1361         (WI.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
1362
1363         * UserInterface/Views/TreeElement.js:
1364         (WI.TreeElement.prototype.set hidden):
1365         (WI.TreeElement.prototype._attach):
1366         (WI.TreeElement.prototype._detach):
1367         (WI.TreeElement.prototype.collapse):
1368         (WI.TreeElement.prototype.expand):
1369         Move `updateVirtualizedElements` calls to the owner `WI.TreeOutline` to ensure that they get
1370         called. Make the remaining calls use rAF debouncing to better coalesce updates.
1371
1372         * UserInterface/Views/TreeOutline.js:
1373         (WI.TreeOutline.prototype._rememberTreeElement):
1374         (WI.TreeOutline.prototype._forgetTreeElement):
1375         (WI.TreeOutline.prototype.registerScrollVirtualizer):
1376         (WI.TreeOutline.prototype._updateVirtualizedElements.calculateOffsetFromContainer): Added.
1377         (WI.TreeOutline.prototype._updateVirtualizedElements):
1378         (WI.TreeOutline.prototype._calculateVirtualizedValues): Deleted.
1379         Calculate the `WI.TreeOutline`'s top offset within the scroll container so that it will only
1380         update when it's within the visual area.
1381
1382         * UserInterface/Views/Utilities.js:
1383         (Array.prototype.remove):
1384         Return whether the item was actually removed from the array.
1385
1386 2019-03-20  Joseph Pecoraro  <pecoraro@apple.com>
1387
1388         Web Inspector: Timelines - Export fails for MediaTimelineRecords with originator DOM Node - Cannot serialize cyclic structure
1389         https://bugs.webkit.org/show_bug.cgi?id=196027
1390
1391         Reviewed by Timothy Hatcher.
1392
1393         * UserInterface/Models/MediaTimelineRecord.js:
1394         (WI.MediaTimelineRecord.prototype.toJSON):
1395         Remove the originator since that is a WI.DOMNode and cannot
1396         be JSON serialized.
1397
1398 2019-03-20  Devin Rousso  <drousso@apple.com>
1399
1400         Web Inspector: Debugger: move breakpoint storage to use `WI.ObjectStore`
1401         https://bugs.webkit.org/show_bug.cgi?id=192719
1402         <rdar://problem/46746857>
1403
1404         Reviewed by Timothy Hatcher.
1405
1406         * UserInterface/Controllers/DebuggerManager.js:
1407         (WI.DebuggerManager):
1408         (WI.DebuggerManager.prototype.addBreakpoint):
1409         (WI.DebuggerManager.prototype.removeBreakpoint):
1410         (WI.DebuggerManager.prototype._debuggerBreakpointOptions):
1411         (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
1412         (WI.DebuggerManager.prototype._setBreakpoint):
1413         (WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):
1414         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
1415         (WI.DebuggerManager.prototype._saveBreakpoints): Deleted.
1416
1417         * UserInterface/Models/Breakpoint.js:
1418         (WI.Breakpoint.prototype.saveIdentityToCookie):
1419         (WI.Breakpoint.prototype.serializeOptions): Added.
1420         (WI.Breakpoint.prototype.toJSON): Added.
1421         (WI.Breakpoint.prototype.get options): Deleted.
1422         (WI.Breakpoint.prototype.get info): Deleted.
1423         (WI.Breakpoint.prototype._serializableActions): Deleted.
1424         * UserInterface/Models/BreakpointAction.js:
1425         (WI.BreakpointAction.prototype.toJSON): Added.
1426         (WI.BreakpointAction.prototype.get info): Deleted.
1427
1428         * UserInterface/Base/ObjectStore.js:
1429         (WI.ObjectStore.async reset): Added.
1430         (WI.ObjectStore._open):
1431         (WI.ObjectStore.prototype.get keyPath): Added.
1432         (WI.ObjectStore.prototype.async.getAll):
1433         (WI.ObjectStore.prototype.async.put): Added.
1434         (WI.ObjectStore.prototype.async.putObject): Added.
1435         (WI.ObjectStore.prototype.async.add): Deleted.
1436         (WI.ObjectStore.prototype.async.addObject): Deleted.
1437         Replace `add` with `put` so that if a key already exists, it is overridden.
1438
1439         * UserInterface/Controllers/AuditManager.js:
1440         (WI.AuditManager.prototype.set editing):
1441         (WI.AuditManager.prototype.async processJSON):
1442
1443         * UserInterface/Controllers/BreakpointPopoverController.js:
1444         (WI.BreakpointPopoverController.prototype._popoverActionsAddActionButtonClicked):
1445         Inline some `WI.Breakpoint` static values.
1446
1447 2019-03-20  Devin Rousso  <drousso@apple.com>
1448
1449         Web Inspector: Sources: disabled breakpoints banner should be sticky
1450         https://bugs.webkit.org/show_bug.cgi?id=195104
1451         <rdar://problem/48442259>
1452
1453         Reviewed by Timothy Hatcher.
1454
1455         Allow each of the individual sections to be scrolled separately from the entire sidebar.
1456
1457         Leverage CSS variables set via JavaScript to be able to calculate the maximum height of each
1458         `WI.TreeOutline` section based on the number of items.
1459
1460         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1461         (WI.SourcesNavigationSidebarPanel):
1462         (WI.SourcesNavigationSidebarPanel.prototype._handleCallStackElementAddedOrRemoved): Added.
1463         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
1464         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
1465         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
1466         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1467         (.sidebar > .panel.navigation.sources > .content):
1468         (.sidebar > .panel.navigation.sources > .content .details-section): Added.
1469         (.sidebar > .panel.navigation.sources > .content .details-section.paused-reason.collapsed > .header > .options,): Added.
1470         (.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .content): Added.
1471         (.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Added.
1472         (.sidebar > .panel.navigation.sources > .content > .call-stack-container): Added.
1473         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Added.
1474         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Added.
1475         (.sidebar > .panel.navigation.sources > .content > .resources-container): Added.
1476         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread): Added.
1477         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread): Added.
1478         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content): Added.
1479         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content > .pause-reason-container): Added.
1480         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Added.
1481         (.sidebar > .panel.navigation.sources > .content > .details-section): Deleted.
1482         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,): Deleted.
1483         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content): Deleted.
1484         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
1485         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread): Deleted.
1486         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread): Deleted.
1487         (.sidebar > .panel.navigation.sources > .content > .resources): Deleted.
1488
1489 2019-03-20  Devin Rousso  <drousso@apple.com>
1490
1491         "Reveal in Layers Tab" context menu option should not be available if the Layers Tab has not been enabled
1492         https://bugs.webkit.org/show_bug.cgi?id=196009
1493
1494         Reviewed by Joseph Pecoraro.
1495
1496         * UserInterface/Views/ContextMenuUtilities.js:
1497         (WI.appendContextMenuItemsForDOMNode):
1498
1499 2019-03-20  Devin Rousso  <drousso@apple.com>
1500
1501         Web Inspector: Console: add a setting for controlling auto-expansion of Trace messages
1502         https://bugs.webkit.org/show_bug.cgi?id=195690
1503
1504         Reviewed by Timothy Hatcher.
1505
1506         * UserInterface/Views/ConsoleMessageView.js:
1507         (WI.ConsoleMessageView.prototype._appendStackTrace):
1508
1509         * UserInterface/Base/Setting.js:
1510         * UserInterface/Views/SettingsTabContentView.js:
1511         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1512
1513         * Localizations/en.lproj/localizedStrings.js:
1514
1515 2019-03-20  Devin Rousso  <drousso@apple.com>
1516
1517         Web Inspector: DOM: selecting a node in a different frame should automatically switch the console prompt's execution context
1518         https://bugs.webkit.org/show_bug.cgi?id=195805
1519         <rdar://problem/48930866>
1520
1521         Reviewed by Timothy Hatcher.
1522
1523         Add an "Auto" execution context item that is selected by default and will update the
1524         selected execution context whenever the inspected node changes. It will also display the
1525         preferred name for whatever execution context is currently active.
1526
1527         * UserInterface/Views/QuickConsole.js:
1528         (WI.QuickConsole):
1529         (WI.QuickConsole.prototype.initializeMainExecutionContextPathComponent):
1530         (WI.QuickConsole.prototype._preferredNameForFrame): Added.
1531         (WI.QuickConsole.prototype._selectExecutionContext): Added.
1532         (WI.QuickConsole.prototype._executionContextPathComponentsToDisplay):
1533         (WI.QuickConsole.prototype._rebuildExecutionContextPathComponents):
1534         (WI.QuickConsole.prototype._framePageExecutionContextsChanged):
1535         (WI.QuickConsole.prototype._frameExecutionContextsCleared):
1536         (WI.QuickConsole.prototype._activeExecutionContextChanged):
1537         (WI.QuickConsole.prototype._createExecutionContextPathComponent):
1538         (WI.QuickConsole.prototype._insertOtherExecutionContextPathComponent):
1539         (WI.QuickConsole.prototype._removeOtherExecutionContextPathComponent):
1540         (WI.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
1541         (WI.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
1542         (WI.QuickConsole.prototype._targetRemoved):
1543         (WI.QuickConsole.prototype._pathComponentSelected):
1544         (WI.QuickConsole.prototype._handleInspectedNodeChanged): Added.
1545         (WI.QuickConsole.prototype.get selectedExecutionContext): Deleted.
1546         (WI.QuickConsole.prototype.set selectedExecutionContext): Deleted.
1547         (WI.QuickConsole.prototype._createExecutionContextPathComponentFromFrame): Deleted.
1548         * UserInterface/Views/QuickConsole.css:
1549         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context)): Added.
1550         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context) .execution-context): Added.
1551         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context) .execution-context .selector-arrows): Added.
1552         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context): Deleted.
1553         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows): Deleted.
1554
1555         * UserInterface/Controllers/DOMManager.js:
1556         (WI.DOMManager.prototype.get inspectedNode): Added.
1557         (WI.DOMManager.prototype.setInspectedNode):
1558         Broadcast when the inspected node changes.
1559
1560         * UserInterface/Views/NavigationBar.js:
1561         (WI.NavigationBar.prototype.layout):
1562         When `sizesToFit` is enabled, don't force any items to be hidden.
1563
1564         * Localizations/en.lproj/localizedStrings.js:
1565
1566 2019-03-20  Devin Rousso  <drousso@apple.com>
1567
1568         Web Inspector: refactor WI.TimelineDataGridNode and its subclasses to unify the API surface
1569         https://bugs.webkit.org/show_bug.cgi?id=195959
1570         <rdar://problem/49028896>
1571
1572         Reviewed by Timothy Hatcher.
1573
1574         * UserInterface/Views/TimelineDataGridNode.js:
1575         (WI.TimelineDataGridNode.prototype.get records):
1576         (WI.TimelineDataGridNode.prototype.get data):
1577         (WI.TimelineDataGridNode.prototype.refresh):
1578
1579         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
1580         (WI.HeapAllocationsTimelineDataGridNode):
1581         (WI.HeapAllocationsTimelineDataGridNode.prototype.get heapSnapshot): Added.
1582         (WI.HeapAllocationsTimelineDataGridNode.prototype.get data):
1583         (WI.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
1584         (WI.HeapAllocationsTimelineDataGridNode.prototype.createCells):
1585         (WI.HeapAllocationsTimelineDataGridNode.prototype._handleHeapSnapshotCollectedNodes):
1586         (WI.HeapAllocationsTimelineDataGridNode.prototype._handleHeapSnapshotInvalidated):
1587         (WI.HeapAllocationsTimelineDataGridNode.prototype.get record): Deleted.
1588         (WI.HeapAllocationsTimelineDataGridNode.prototype.updateTimestamp): Deleted.
1589         (WI.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes): Deleted.
1590         (WI.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotInvalidated): Deleted.
1591
1592         * UserInterface/Views/LayoutTimelineDataGridNode.js:
1593         (WI.LayoutTimelineDataGridNode):
1594         (WI.LayoutTimelineDataGridNode.prototype.get data):
1595         (WI.LayoutTimelineDataGridNode.prototype.createCellContent):
1596         (WI.LayoutTimelineDataGridNode.prototype.get records): Deleted.
1597
1598         * UserInterface/Views/MediaTimelineDataGridNode.js:
1599         (WI.MediaTimelineDataGridNode):
1600         (WI.MediaTimelineDataGridNode.prototype.get records): Deleted.
1601
1602         * UserInterface/Views/ProfileNodeDataGridNode.js:
1603         (WI.ProfileNodeDataGridNode):
1604         (WI.ProfileNodeDataGridNode.prototype.get profileNode):
1605         (WI.ProfileNodeDataGridNode.prototype.get data):
1606         (WI.ProfileNodeDataGridNode.prototype.createCellContent):
1607         (WI.ProfileNodeDataGridNode.prototype._populate):
1608         (WI.ProfileNodeDataGridNode.prototype.get records): Deleted.
1609         (WI.ProfileNodeDataGridNode.prototype.get baseStartTime): Deleted.
1610         (WI.ProfileNodeDataGridNode.prototype.get rangeStartTime): Deleted.
1611         (WI.ProfileNodeDataGridNode.prototype.get rangeEndTime): Deleted.
1612         (WI.ProfileNodeDataGridNode.prototype.updateRangeTimes): Deleted.
1613         (WI.ProfileNodeDataGridNode.prototype.refresh): Deleted.
1614
1615         * UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
1616         (WI.RenderingFrameTimelineDataGridNode):
1617         (WI.RenderingFrameTimelineDataGridNode.prototype.get data):
1618         (WI.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
1619         (WI.RenderingFrameTimelineDataGridNode.prototype.get records): Deleted.
1620
1621         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1622         (WI.ResourceTimelineDataGridNode):
1623         (WI.ResourceTimelineDataGridNode.prototype.get resource):
1624         (WI.ResourceTimelineDataGridNode.prototype.get data):
1625         (WI.ResourceTimelineDataGridNode.prototype.createCellContent):
1626         (WI.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
1627         (WI.ResourceTimelineDataGridNode.prototype.filterableDataForColumn):
1628         (WI.ResourceTimelineDataGridNode.prototype._createNameCellDocumentFragment):
1629         (WI.ResourceTimelineDataGridNode.prototype._cachedCellContent):
1630         (WI.ResourceTimelineDataGridNode.prototype._timelineRecordUpdated):
1631         (WI.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):
1632         (WI.ResourceTimelineDataGridNode.prototype._updateStatus):
1633         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get startTime):
1634         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get currentTime):
1635         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get endTime):
1636         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get _extraTimePadding):
1637         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
1638         (WI.ResourceTimelineDataGridNode.prototype.get records): Deleted.
1639
1640         * UserInterface/Views/ResourceTimingPopoverDataGridNode.js:
1641         (WI.ResourceTimingPopoverDataGridNode):
1642         (WI.ResourceTimingPopoverDataGridNode.prototype.get records): Deleted.
1643
1644         * UserInterface/Views/ScriptTimelineDataGridNode.js:
1645         (WI.ScriptTimelineDataGridNode.prototype.get data):
1646         (WI.ScriptTimelineDataGridNode.prototype.get subtitle):
1647         (WI.ScriptTimelineDataGridNode.prototype.createCellContent):
1648         (WI.ScriptTimelineDataGridNode.prototype.get records): Deleted.
1649         (WI.ScriptTimelineDataGridNode.prototype.get baseStartTime): Deleted.
1650         (WI.ScriptTimelineDataGridNode.prototype.get rangeStartTime): Deleted.
1651         (WI.ScriptTimelineDataGridNode.prototype.get rangeEndTime): Deleted.
1652         (WI.ScriptTimelineDataGridNode.prototype.updateRangeTimes): Deleted.
1653
1654         * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
1655         (WI.SourceCodeTimelineTimelineDataGridNode.prototype.get data):
1656
1657         * UserInterface/Views/HeapAllocationsTimelineView.js:
1658         (WI.HeapAllocationsTimelineView):
1659         (WI.HeapAllocationsTimelineView.prototype.layout):
1660         (WI.HeapAllocationsTimelineView.prototype.reset):
1661         * UserInterface/Views/LayoutTimelineView.js:
1662         (WI.LayoutTimelineView.prototype._processPendingRecords):
1663         * UserInterface/Views/MediaTimelineView.js:
1664         (WI.MediaTimelineView.prototype._processPendingRecords):
1665         * UserInterface/Views/NetworkTimelineView.js:
1666         (WI.NetworkTimelineView.prototype._processPendingRecords):
1667         * UserInterface/Views/OverviewTimelineView.js:
1668         (WI.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
1669         (WI.OverviewTimelineView.prototype._addSourceCodeTimeline):
1670         * UserInterface/Views/RenderingFrameTimelineView.js:
1671         (WI.RenderingFrameTimelineView.prototype._processPendingRecords):
1672         * UserInterface/Views/ScriptDetailsTimelineView.js:
1673         (WI.ScriptDetailsTimelineView.prototype.layout):
1674         (WI.ScriptDetailsTimelineView.prototype._processPendingRecords):
1675         Update Timeline `WI.DataGrid` views to use the new constructor format.
1676
1677         * UserInterface/Views/ResourceTimelineDataGridNode.css:
1678         (.resource-timing-popover-content .data-grid td.graph-column):
1679         Drive-by: add extra padding before/after resource timing bars shown when hovering.
1680
1681 2019-03-20  Devin Rousso  <drousso@apple.com>
1682
1683         Web Inspector: changes to CSS resources only take affect once editing stops
1684         https://bugs.webkit.org/show_bug.cgi?id=195774
1685         <rdar://problem/48905413>
1686
1687         Reviewed by Timothy Hatcher.
1688
1689         * UserInterface/Controllers/CSSManager.js:
1690         (WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
1691         (WI.CSSManager.prototype._resourceContentDidChange):
1692         (WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
1693         (WI.CSSManager.prototype._updateResourceContent):
1694         Use a `Throttler` instead of a 500ms debounce.
1695
1696 2019-03-20  Devin Rousso  <drousso@apple.com>
1697
1698         Web Inspector: Search: allow DOM searches to be case sensitive
1699         https://bugs.webkit.org/show_bug.cgi?id=194673
1700         <rdar://problem/48087577>
1701
1702         Reviewed by Timothy Hatcher.
1703
1704         * UserInterface/Views/SearchSidebarPanel.js:
1705         (WI.SearchSidebarPanel.prototype.performSearch):
1706
1707         * UserInterface/Views/DOMTreeContentView.js:
1708         (WI.DOMTreeContentView.prototype.performSearch.contextNodesReady):
1709
1710         * UserInterface/Controllers/DOMManager.js:
1711         (WI.DOMManager.prototype.performSearch.callback): Deleted.
1712         (WI.DOMManager.prototype.performSearch): Deleted.
1713         (WI.DOMManager.prototype.searchResult.mycallback): Deleted.
1714         (WI.DOMManager.prototype.searchResult): Deleted.
1715         (WI.DOMManager.prototype.cancelSearch): Deleted.
1716         Drive-by: remove unused code.
1717
1718 2019-03-19  Devin Rousso  <drousso@apple.com>
1719
1720         Web Inspector: Sources: provide option to group by path
1721         https://bugs.webkit.org/show_bug.cgi?id=195203
1722         <rdar://problem/27340680>
1723
1724         Reviewed by Timothy Hatcher.
1725
1726         Create top-level folders for each origin and nest all resources (in a folder chain) underneath.
1727
1728         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1729         (WI.SourcesNavigationSidebarPanel):
1730         (WI.SourcesNavigationSidebarPanel.prototype.closed):
1731         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.searchTreeOutline): Added.
1732         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
1733         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
1734         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
1735         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
1736         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
1737         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
1738         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown.addOption): Added.
1739         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Added.
1740         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
1741         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
1742         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
1743         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
1744         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1745         (.sidebar > .panel.navigation.sources > .content):
1746         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
1747         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Added.
1748         (.sidebar > .panel.navigation.sources > .content > .resources): Added.
1749         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread): Added.
1750         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread): Added.
1751         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)): Deleted.
1752         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread): Deleted.
1753         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread): Deleted.
1754         Drive-by: fix "No Filter Results" message view to not overlap eachother.
1755         Drive-by: try to be more smart about what tree we focus when selecting a represented object.
1756
1757         * UserInterface/Views/ResourceTreeElement.js:
1758         (WI.ResourceTreeElement):
1759         (WI.ResourceTreeElement.prototype.get mainTitleText):
1760         (WI.ResourceTreeElement.prototype._updateTitles):
1761         * UserInterface/Base/URLUtilities.js:
1762         (WI.displayNameForURL):
1763         Provide a way for the display name to use a directory "/" instead of the last path component.
1764         This is needed in cases where the loaded resource is an implicit "index.*".
1765
1766         * UserInterface/Views/GeneralTreeElement.js:
1767         (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath): Added.
1768         * UserInterface/Views/SourceCodeTreeElement.js:
1769         (WI.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath): Deleted.
1770
1771         * Localizations/en.lproj/localizedStrings.js:
1772         * UserInterface/Models/Resource.js:
1773
1774         * UserInterface/Views/DetailsSection.css:
1775         (.details-section > .header .go-to-arrow):
1776         Drive-by: vertically center go-to-arrow.
1777
1778         * UserInterface/Protocol/InspectorFrontendAPI.js:
1779         (InspectorFrontendAPI.contextMenuItemSelected):
1780
1781         * UserInterface/Base/Setting.js:
1782         * UserInterface/Views/NetworkTableContentView.js:
1783         (WI.NetworkTableContentView):
1784         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
1785         (WI.NetworkTableContentView.prototype._populateNameCell):
1786         (WI.NetworkTableContentView.prototype._generateSortComparator):
1787         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
1788         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
1789         (WI.NetworkTableContentView.prototype._handleGroupMediaRequestsByDOMNodeCheckedDidChange): Added.
1790         (WI.NetworkTableContentView.prototype._handleGroupByDOMNodeCheckedDidChange): Deleted.
1791         Rename the `groupByNode` setting to be more specific.
1792
1793 2019-03-19  Devin Rousso  <drousso@apple.com>
1794
1795         Web Inspector: CPU Usage Timeline - the right edge of each column should align with a CPU measurement
1796         https://bugs.webkit.org/show_bug.cgi?id=195789
1797         <rdar://problem/48915271>
1798
1799         Reviewed by Joseph Pecoraro.
1800
1801         Right now, each column is rendered such that the middle of the column is aligned with the
1802         time of the CPU measurement. This could potentially be misleading, as the width/position of
1803         the bar implies that there was a period of time after the actual time of the CPU measurement
1804         that should be "attributed" to that same CPU measurement.
1805
1806            1      2      3
1807                _______
1808                [  *  ]
1809                [  *  ]_______
1810                [  *  ][  *  ]
1811         _______[  *  ][  *  ]
1812         [  *  ][  *  ][  *  ]
1813         [__*__][__*__][__*__]
1814          A   B  C   D  E   F
1815
1816         In this example, one might "attribute" any work done at time B to record 1, when in reality,
1817         it should be "attributed" to record 2, since the CPU measurement had already been taken by
1818         the time B was captured, meaning that the work for B hadn't yet been done and could
1819         therefore not have affected the CPU measurement for record 1.
1820
1821         We should be rendering the columns such that the CPU measurement aligns with the trailing
1822         edge of the column, so that all of the work that could be "attributed" to a given CPU
1823         measurement comes before it.
1824
1825           1      2      3
1826             _______       ___
1827             [    *]       [
1828             [    *]_______[
1829             [    *][    *][
1830         ____[    *][    *][
1831           *][    *][    *][
1832         __*][____*][____*][__
1833          A   B  C   D  E   F
1834
1835                 NOTE: this "rendering" isn't exactly accurate, as the `*` should overlap the `]`.
1836
1837         Legend:
1838          - `[     ]` represents a column for a CPU measurement
1839          - `*` represents the time when the measurement actually takes place
1840
1841         * UserInterface/Views/CPUTimelineOverviewGraph.js:
1842         (WI.CPUTimelineOverviewGraph.prototype.layout):
1843         (WI.CPUTimelineOverviewGraph.prototype._handleChartClick):
1844         * UserInterface/Views/TimelineOverview.js:
1845         (WI.TimelineOverview.prototype._recordSelected):
1846
1847 2019-03-19  Devin Rousso  <drousso@apple.com>
1848
1849         Web Inspector: Provide $event in the console when paused on an event listener
1850         https://bugs.webkit.org/show_bug.cgi?id=188672
1851
1852         Reviewed by Timothy Hatcher.
1853
1854         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1855         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
1856
1857 2019-03-19  Devin Rousso  <drousso@apple.com>
1858
1859         Web Inspector: DOM: "Capture Screenshot" should only be shown if the node is attached
1860         https://bugs.webkit.org/show_bug.cgi?id=195793
1861         <rdar://problem/48916594>
1862
1863         Reviewed by Joseph Pecoraro.
1864
1865         * UserInterface/Models/DOMNode.js:
1866         (WI.DOMNode.prototype.get attached): Added.
1867
1868         * UserInterface/Views/ContextMenuUtilities.js:
1869         (WI.appendContextMenuItemsForDOMNode):
1870         * UserInterface/Views/DOMTreeElement.js:
1871         (WI.DOMTreeElement.prototype._populateTagContextMenu):
1872
1873 2019-03-18  Joseph Pecoraro  <pecoraro@apple.com>
1874
1875         Web Inspector: HAR Extension for `serverIPAddress` port number
1876         https://bugs.webkit.org/show_bug.cgi?id=195695
1877
1878         Reviewed by Matt Baker.
1879
1880         * UserInterface/Controllers/HARBuilder.js:
1881         (WI.HARBuilder.entry):
1882         (WI.HARBuilder.port):
1883         * UserInterface/Models/LocalResource.js:
1884         (WI.LocalResource.fromHAREntry):
1885
1886 2019-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
1887
1888         Web Inspector: Changes: style attribute changes aren't being tracked
1889         https://bugs.webkit.org/show_bug.cgi?id=193859
1890         <rdar://problem/47568977>
1891
1892         Reviewed by Devin Rousso.
1893
1894         * UserInterface/Controllers/CSSManager.js:
1895         (WI.CSSManager):
1896         (WI.CSSManager.prototype.get modifiedStyles):
1897         (WI.CSSManager.prototype.addModifiedStyle):
1898         (WI.CSSManager.prototype._mainResourceDidChange):
1899         (WI.CSSManager.prototype.get modifiedCSSRules): Deleted.
1900         (WI.CSSManager.prototype.addModifiedCSSRule): Deleted.
1901         (WI.CSSManager.prototype.removeModifiedCSSRule): Deleted.
1902         * UserInterface/Models/CSSRule.js:
1903         (WI.CSSRule.prototype.get stringId): Deleted.
1904         (WI.CSSRule.prototype.markModified): Deleted.
1905         * UserInterface/Models/CSSStyleDeclaration.js:
1906         (WI.CSSStyleDeclaration.prototype.get stringId):
1907         (WI.CSSStyleDeclaration.prototype.markModified):
1908         Inline styles weren't tracked because they didn't have owner rules.
1909         Track style declarations instead of CSS rules.
1910
1911         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
1912         (.sidebar > .panel.changes-panel .css-rule):
1913         (.sidebar > .panel.changes-panel .css-rule + .css-rule):
1914         (.changes-panel .selector.style-attribute):
1915         (.changes-panel .selector:not(.style-attribute)):
1916         (.changes-panel .css-property-line > .property):
1917         (.changes-panel .css-property-line.unchanged): Deleted.
1918         Drive-by: use text-color-secondary for unchanged properties instead of altering opacity.
1919
1920         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
1921         (WI.ChangesDetailsSidebarPanel.prototype.layout):
1922         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
1923         For an inline style declaration, instead of showing a CSS source file location show an appropriate selector for its DOM node.
1924
1925 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
1926
1927         Web Inspector: HAR Extension for Resource Priority
1928         https://bugs.webkit.org/show_bug.cgi?id=195693
1929
1930         Reviewed by Devin Rousso.
1931
1932         * UserInterface/Controllers/HARBuilder.js:
1933         (WI.HARBuilder.entry):
1934         (WI.HARBuilder.priority):
1935         (WI.HARBuilder.networkPriorityFromHARPriority):
1936         Include priority custom extension.
1937
1938         * UserInterface/Models/LocalResource.js:
1939         (WI.LocalResource.fromHAREntry):
1940         Import priority.
1941
1942 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
1943
1944         Web Inspector: CPU Usage Timeline - Give long thread names a tooltip if they could be ellipsized
1945         https://bugs.webkit.org/show_bug.cgi?id=195314
1946
1947         Reviewed by Devin Rousso.
1948
1949         * UserInterface/Views/CPUUsageView.js:
1950         (WI.CPUUsageView):
1951
1952 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
1953
1954         Web Inspector: CPU Usage Timeline - Reduce the intensity of the orange overlay color in dark mode
1955         https://bugs.webkit.org/show_bug.cgi?id=195772
1956
1957         Reviewed by Devin Rousso.
1958
1959         * UserInterface/Views/Variables.css:
1960         (@media (prefers-color-scheme: dark)):
1961         (:root):
1962
1963 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
1964
1965         Web Inspector: Timelines - Import / Export Timeline Recordings
1966         https://bugs.webkit.org/show_bug.cgi?id=195709
1967         <rdar://problem/23188921>
1968
1969         Reviewed by Devin Rousso.
1970
1971         Timeline exporting saves TimelineRecording and TimelineOverview state.
1972         The TimelineRecording includes all kinds of model objects, such as
1973         records, markers, memory pressure events, etc. It also includes raw
1974         protocol data, such as script profiler samples. TimelineOverview
1975         includes some of the view state to restore, such as the selected
1976         time range, zoom level, and selected timeline.
1977
1978         Timeline importing constructs a new TimelineRecording by replaying
1979         the records, markers, and other events, as well as re-initializing
1980         more state. To finally display the imported recording, the content
1981         view will immediately initialize start/current/end times and the
1982         overview will restore the view state.
1983
1984         * Localizations/en.lproj/localizedStrings.js:
1985         New strings.
1986
1987         * UserInterface/Controllers/TimelineManager.js:
1988         (WI.TimelineManager.synthesizeImportError):
1989         (WI.TimelineManager.prototype.importRecording):
1990         Import API.
1991
1992         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
1993         Initialize the samples on the recording via a different path
1994         so that the data can be saved for exporting.
1995
1996         * UserInterface/Models/TimelineRecording.js:
1997         (WI.TimelineRecording):
1998         (WI.TimelineRecording.import):
1999         (WI.TimelineRecording.prototype.exportData):
2000         (WI.TimelineRecording.prototype.get capturing):
2001         (WI.TimelineRecording.prototype.get imported):
2002         (WI.TimelineRecording.prototype.unloaded):
2003         (WI.TimelineRecording.prototype.reset):
2004         (WI.TimelineRecording.prototype.addEventMarker):
2005         (WI.TimelineRecording.prototype.addRecord):
2006         (WI.TimelineRecording.prototype.addMemoryPressureEvent):
2007         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
2008         (WI.TimelineRecording.prototype.canExport):
2009         Save data at the TimelineRecording level that can be used for export.
2010         We only allow exporting a TimelineRecording that has started/stopped
2011         at least once and is not currently capturing.
2012
2013         * UserInterface/Views/TimelineRecordingContentView.js:
2014         (WI.TimelineRecordingContentView):
2015         (WI.TimelineRecordingContentView.prototype.get navigationItems):
2016         (WI.TimelineRecordingContentView.prototype.get supportsSave):
2017         (WI.TimelineRecordingContentView.prototype.get saveData):
2018         (WI.TimelineRecordingContentView.prototype.shown):
2019         (WI.TimelineRecordingContentView.prototype._capturingStarted):
2020         (WI.TimelineRecordingContentView.prototype._capturingStopped):
2021         (WI.TimelineRecordingContentView.prototype._initializeImportedRecording):
2022         (WI.TimelineRecordingContentView.prototype._exportTimelineRecording):
2023         (WI.TimelineRecordingContentView.prototype._importButtonNavigationItemClicked):
2024         (WI.TimelineRecordingContentView.prototype._recordingReset):
2025         Add Import and Export buttons in the Timeline navigation bar.
2026
2027         * UserInterface/Views/TimelineOverview.js:
2028         (WI.TimelineOverview):
2029         (WI.TimelineOverview.prototype.exportData):
2030         (WI.TimelineOverview.prototype._instrumentAdded):
2031         (WI.TimelineOverview.prototype._recordingImported):
2032         When importing a recording update the TimelineOverview state
2033         soon afterwards.
2034
2035         * UserInterface/Models/CPUTimelineRecord.js:
2036         (WI.CPUTimelineRecord.fromJSON):
2037         (WI.CPUTimelineRecord.prototype.toJSON):
2038         * UserInterface/Models/GarbageCollection.js:
2039         (WI.GarbageCollection.fromJSON):
2040         (WI.GarbageCollection.prototype.toJSON):
2041         * UserInterface/Models/Geometry.js:
2042         (WI.Quad.fromJSON):
2043         (WI.Quad.prototype.toJSON):
2044         * UserInterface/Models/HeapAllocationsTimelineRecord.js:
2045         (WI.HeapAllocationsTimelineRecord.fromJSON):
2046         (WI.HeapAllocationsTimelineRecord.prototype.toJSON):
2047         * UserInterface/Models/LayoutTimelineRecord.js:
2048         (WI.LayoutTimelineRecord.fromJSON):
2049         (WI.LayoutTimelineRecord.prototype.toJSON):
2050         * UserInterface/Models/MediaTimelineRecord.js:
2051         (WI.MediaTimelineRecord.fromJSON):
2052         (WI.MediaTimelineRecord.prototype.toJSON):
2053         * UserInterface/Models/MemoryPressureEvent.js:
2054         (WI.MemoryPressureEvent.fromJSON):
2055         (WI.MemoryPressureEvent.prototype.toJSON):
2056         * UserInterface/Models/MemoryTimelineRecord.js:
2057         (WI.MemoryTimelineRecord):
2058         (WI.MemoryTimelineRecord.fromJSON):
2059         (WI.MemoryTimelineRecord.prototype.toJSON):
2060         * UserInterface/Models/RenderingFrameTimelineRecord.js:
2061         (WI.RenderingFrameTimelineRecord.fromJSON):
2062         (WI.RenderingFrameTimelineRecord.prototype.toJSON):
2063         * UserInterface/Models/ResourceTimelineRecord.js:
2064         (WI.ResourceTimelineRecord.fromJSON):
2065         (WI.ResourceTimelineRecord.prototype.toJSON):
2066         * UserInterface/Models/ScriptTimelineRecord.js:
2067         (WI.ScriptTimelineRecord.fromJSON):
2068         (WI.ScriptTimelineRecord.prototype.toJSON):
2069         * UserInterface/Models/TimelineMarker.js:
2070         (WI.TimelineMarker.fromJSON):
2071         (WI.TimelineMarker.prototype.toJSON):
2072         (WI.TimelineMarker.prototype.get type):
2073         (WI.TimelineMarker.prototype.get details):
2074         (WI.TimelineMarker.prototype.set time):
2075         (WI.TimelineMarker):
2076         * UserInterface/Models/TimelineRecord.js:
2077         (WI.TimelineRecord.fromJSON):
2078         (WI.TimelineRecord.prototype.toJSON):
2079         Import / Export toJSON / fromJSON implementations.
2080         
2081         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2082         (WI.CPUTimelineOverviewGraph):
2083         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
2084         (WI.CPUTimelineOverviewGraph.prototype._processRecord):
2085         * UserInterface/Views/LayoutTimelineOverviewGraph.js:
2086         (WI.LayoutTimelineOverviewGraph):
2087         (WI.LayoutTimelineOverviewGraph.prototype._layoutTimelineRecordAdded):
2088         (WI.LayoutTimelineOverviewGraph.prototype._processRecord):
2089         * UserInterface/Views/LayoutTimelineView.js:
2090         (WI.LayoutTimelineView):
2091         (WI.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
2092         (WI.LayoutTimelineView.prototype._processRecord):
2093         * UserInterface/Views/MediaTimelineView.js:
2094         (WI.MediaTimelineView):
2095         (WI.MediaTimelineView.prototype._handleRecordAdded):
2096         (WI.MediaTimelineView.prototype._processRecord):
2097         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
2098         (WI.MemoryTimelineOverviewGraph):
2099         (WI.MemoryTimelineOverviewGraph.prototype._memoryTimelineRecordAdded):
2100         (WI.MemoryTimelineOverviewGraph.prototype._processRecord):
2101         * UserInterface/Views/MemoryTimelineView.js:
2102         (WI.MemoryTimelineView):
2103         (WI.MemoryTimelineView.prototype._memoryTimelineRecordAdded):
2104         (WI.MemoryTimelineView.prototype._processRecord):
2105         * UserInterface/Views/NetworkTimelineOverviewGraph.js:
2106         (WI.NetworkTimelineOverviewGraph):
2107         (WI.NetworkTimelineOverviewGraph.prototype.reset):
2108         (WI.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
2109         (WI.NetworkTimelineOverviewGraph.prototype._processRecord):
2110         (WI.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded.compareByStartTime): Deleted.
2111         * UserInterface/Views/NetworkTimelineView.js:
2112         (WI.NetworkTimelineView):
2113         (WI.NetworkTimelineView.prototype._networkTimelineRecordAdded):
2114         (WI.NetworkTimelineView.prototype._processRecord):
2115         * UserInterface/Views/RenderingFrameTimelineView.js:
2116         (WI.RenderingFrameTimelineView):
2117         (WI.RenderingFrameTimelineView.prototype._renderingFrameTimelineRecordAdded):
2118         (WI.RenderingFrameTimelineView.prototype._processRecord):
2119         * UserInterface/Views/ScriptDetailsTimelineView.js:
2120         (WI.ScriptDetailsTimelineView):
2121         (WI.ScriptDetailsTimelineView.prototype._scriptTimelineRecordAdded):
2122         (WI.ScriptDetailsTimelineView.prototype._processRecord):
2123         Add common _processRecord path to each timeline OverviewGraph and TimelineView.
2124         By calling this in construction we populate graphs with TimelineRecords that
2125         may have already existed. This is necessary for imports, but this also fixes
2126         the case where you enable a timeline that had data and it didn't show data.
2127
2128         * UserInterface/Views/LayoutTimelineOverviewGraph.css:
2129         (.timeline-overview-graph.layout-overview > .graph-row):
2130         (.timeline-overview-graph.layout-overview > .graph-row > .timeline-record-bar):
2131         (.timeline-overview-graph.layout-overview > .graph-row > .timeline-record-bar > .segment):
2132         (.timeline-overview-graph.layout > .graph-row): Deleted.
2133         (.timeline-overview-graph.layout > .graph-row > .timeline-record-bar): Deleted.
2134         (.timeline-overview-graph.layout > .graph-row > .timeline-record-bar > .segment): Deleted.
2135         * UserInterface/Views/TimelineRecordBar.css:
2136         (.timeline-record-bar.timeline-record-type-layout.paint > .segment,):
2137         (.timeline-record-bar.timeline-record-type-layout.layout-timeline-record-paint > .segment,): Deleted.
2138         We simplified some of the sub-record type enum strings. To do this we needed to change
2139         "layout" to "layout-overview" to avoid a conflict.
2140
2141 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
2142
2143         Web Inspector: Network - Toggle Between Live Activity and Imported HAR resource collections
2144         https://bugs.webkit.org/show_bug.cgi?id=195734
2145
2146         Reviewed by Devin Rousso.
2147
2148         * Localizations/en.lproj/localizedStrings.js:
2149         * UserInterface/Images/NetworkHAR.svg: Added.
2150         * UserInterface/Images/NetworkOverview.svg: Added.
2151         * UserInterface/Views/NetworkTableContentView.css:
2152         (.content-view.tab.network > .content-browser > .navigation-bar .hierarchical-path .icon):
2153         (.network-overview-icon > .icon):
2154         (.network-har-icon > .icon):
2155         (@media (prefers-color-scheme: dark)):
2156
2157         * UserInterface/Views/NetworkTableContentView.js:
2158         (WI.NetworkTableContentView):
2159         (WI.NetworkTableContentView.prototype.get navigationItems):
2160         (WI.NetworkTableContentView.prototype.reset):
2161         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
2162         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
2163         (WI.NetworkTableContentView.prototype.tableNumberOfRows):
2164         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
2165         (WI.NetworkTableContentView.prototype.tableSelectionDidChange):
2166         (WI.NetworkTableContentView.prototype.tablePopulateCell):
2167         (WI.NetworkTableContentView.prototype._addCollection):
2168         (WI.NetworkTableContentView.prototype._setActiveCollection):
2169         (WI.NetworkTableContentView.prototype._addCollectionPathComponent):
2170         (WI.NetworkTableContentView.prototype._collectionsHierarchicalPathComponentWasSelected):
2171         (WI.NetworkTableContentView.prototype._changeCollection):
2172         (WI.NetworkTableContentView.prototype.handleClearShortcut):
2173         (WI.NetworkTableContentView.prototype._updateWaterfallTimeRange):
2174         (WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler):
2175         (WI.NetworkTableContentView.prototype._canExportHAR):
2176         (WI.NetworkTableContentView.prototype._processPendingEntries):
2177         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
2178         (WI.NetworkTableContentView.prototype._rowIndexForRepresentedObject):
2179         (WI.NetworkTableContentView.prototype._updateEntryForResource):
2180         (WI.NetworkTableContentView.prototype._updateEmptyFilterResultsMessage):
2181         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
2182         (WI.NetworkTableContentView.prototype._mainFrameDidChange):
2183         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
2184         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
2185         (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange):
2186         (WI.NetworkTableContentView.prototype._handleResourceAdded):
2187         (WI.NetworkTableContentView.prototype._runForMainCollection):
2188         (WI.NetworkTableContentView.prototype._isShowingMainCollection):
2189         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
2190         (WI.NetworkTableContentView.prototype._handleNodeDidFireEvent):
2191         (WI.NetworkTableContentView.prototype._handleNodeLowPowerChanged):
2192         (WI.NetworkTableContentView.prototype._updateSort):
2193         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
2194         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
2195         (WI.NetworkTableContentView.prototype._HARResources):
2196         (WI.NetworkTableContentView.prototype._importHAR):
2197         Introduce the concept of collections that can be swapped in/out
2198         to re-render the Network Table with different contents.
2199
2200 2019-03-15  Devin Rousso  <drousso@apple.com>
2201
2202         Web Inspector: provide a way to capture a screenshot of a node from within the page
2203         https://bugs.webkit.org/show_bug.cgi?id=194279
2204         <rdar://problem/10731573>
2205
2206         Reviewed by Joseph Pecoraro.
2207
2208         Add `console.screenshot` functionality, which displays a screenshot of a given object (if
2209         able) within Web Inspector's Console tab. From there, it can be viewed and saved.
2210
2211         Currently, `console.screenshot` will
2212          - capture an image of a `Node` (if provided)
2213          - capture an image of the viewport if nothing is provided
2214
2215         * UserInterface/Models/ConsoleMessage.js:
2216         (WI.ConsoleMessage):
2217         * UserInterface/Views/ConsoleCommandView.js:
2218         (WI.ConsoleCommandView.prototype.render):
2219         * UserInterface/Views/ConsoleMessageView.js:
2220         (WI.ConsoleMessageView.prototype.render):
2221         (WI.ConsoleMessageView.prototype.toClipboardString):
2222         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
2223         (WI.ConsoleMessageView.prototype._appendSavedResultIndex):
2224         (WI.ConsoleMessageView.prototype._appendStackTrace):
2225         (WI.ConsoleMessageView.prototype._makeExpandable):
2226         (WI.ConsoleMessageView.prototype._handleContextMenu): Added.
2227         * UserInterface/Views/ConsoleMessageView.css:
2228         (.console-user-command.special-user-log > .console-message-body): Added.
2229         (.console-message-body): Added.
2230         (.console-message-body > span): Added.
2231         (.console-message-body > span > :matches(.console-message-enclosed, .console-message-preview, .console-message-preview-divider)): Added.
2232         (.console-message-body > .console-image): Added.
2233         (.console-message-body > .show-grid): Added.
2234         (.console-error-level .console-message-body): Added.
2235         (.console-warning-level .console-message-body): Added.
2236         (.console-log-level.console-image-container::before): Added.
2237         (.console-user-command > .console-message-body): Added.
2238         (.console-warning-level .console-message-body): Added.
2239         (.console-error-level .console-message-body): Added.
2240         (.console-user-command > .console-message-body): Added.
2241         (.console-user-command.special-user-log > .console-message-text): Deleted.
2242         (.console-message-text): Deleted.
2243         (.console-message-text > span): Deleted.
2244         (.console-message-text > span > :matches(.console-message-enclosed, .console-message-preview, .console-message-preview-divider)): Deleted.
2245         (.console-error-level .console-message-text): Deleted.
2246         (.console-warning-level .console-message-text): Deleted.
2247         (.console-user-command > .console-message-text): Deleted.
2248         (.console-warning-level .console-message-text): Deleted.
2249         (.console-error-level .console-message-text): Deleted.
2250         (.console-user-command > .console-message-text): Deleted.
2251         * UserInterface/Views/LogContentView.css:
2252         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-text .highlighted): Added.
2253         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-body .highlighted): Deleted.
2254         Renamed variables/classes to be more semantically correct when the content is an image.
2255          - `_messageTextElement` to `_messageBodyElement` (JS)
2256          - `.console-message-text` to `.console-message-body` (CSS)
2257
2258         * UserInterface/Controllers/JavaScriptLogViewController.js:
2259         (WI.JavaScriptLogViewController.prototype.renderPendingMessages):
2260
2261         * UserInterface/Views/Main.css:
2262         (:matches(img, canvas).show-grid):
2263         (@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):
2264
2265         * UserInterface/Base/FileUtilities.js:
2266         (WI.FileUtilities.screenshotString): Added.
2267
2268         * UserInterface/Models/NativeFunctionParameters.js:
2269         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2270
2271         * UserInterface/Images/ConsoleImage.svg: Copied from UserInterface/Images/Canvas.svg.
2272         * Localizations/en.lproj/localizedStrings.js:
2273
2274 2019-03-14  Nikita Vasilyev  <nvasilyev@apple.com>
2275
2276         Web Inspector: Styles: Jump to effective property button doesn't hide after overridden property become effective
2277         https://bugs.webkit.org/show_bug.cgi?id=195770
2278         <rdar://problem/48903634>
2279
2280         Reviewed by Matt Baker.
2281
2282         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2283         (.spreadsheet-style-declaration-editor .property .select-effective-property): Added.
2284         (.spreadsheet-style-declaration-editor .property.overridden .select-effective-property): Deleted.
2285         Hide `.select-effective-property` element for properties that aren't overridden.
2286
2287 2019-03-14  Devin Rousso  <drousso@apple.com>
2288
2289         Web Inspector: REGRESSION: Canvas: the first processed action should be selected as soon as it's available if no previous selected action exists
2290         https://bugs.webkit.org/show_bug.cgi?id=195732
2291         <rdar://problem/48875214>
2292
2293         Reviewed by Matt Baker.
2294
2295         * UserInterface/Views/CanvasSidebarPanel.js:
2296         (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
2297         Rather than wait until the entire recording is ready, set the selected action as soon as the
2298         first action is ready (assuming there isn't already a selected action).
2299
2300 2019-03-14  Joseph Pecoraro  <pecoraro@apple.com>
2301
2302         Web Inspector: Network - HAR Import
2303         https://bugs.webkit.org/show_bug.cgi?id=195642
2304         <rdar://problem/34820974>
2305
2306         Reviewed by Devin Rousso.
2307
2308         * Localizations/en.lproj/localizedStrings.js
2309         * UserInterface/Test.html:
2310         * UserInterface/Test.html:
2311         New strings and resources.
2312
2313         * UserInterface/Controllers/HARBuilder.js:
2314         (WI.HARBuilder.dateFromHARDate):
2315         (WI.HARBuilder.protocolFromHARProtocol):
2316         (WI.HARBuilder.responseSourceFromHARFetchType):
2317         Reverse parsers from HAR to WI.Resource types.
2318
2319         * UserInterface/Models/LocalResource.js: Added.
2320         (WI.LocalResource):
2321         (WI.LocalResource.headersArrayToHeadersObject):
2322         (WI.LocalResource.fromHAREntry):
2323         (WI.LocalResource.prototype.hasContent):
2324         (WI.LocalResource.prototype.setContent):
2325         (WI.LocalResource.prototype.requestContentFromBackend):
2326         A Resource subclass with data fully supplied in the frontend.
2327
2328         * UserInterface/Controllers/NetworkManager.js:
2329         (WI.NetworkManager):
2330         (WI.NetworkManager.synthesizeImportError):
2331         (WI.NetworkManager.prototype.localResourceForURL):
2332         (WI.NetworkManager.prototype.processHAR):
2333         Process a HAR and extract local resources.
2334
2335         * UserInterface/Views/NetworkTableContentView.js:
2336         (WI.NetworkTableContentView):
2337         (WI.NetworkTableContentView.prototype.reset):
2338         (WI.NetworkTableContentView.prototype._handleResourceAdded):
2339         (WI.NetworkTableContentView.prototype._importHAR):
2340         Add an import button. When an import succeeds reset the
2341         table and only show imported resources (ignoring page
2342         loaded resources).
2343
2344 2019-03-14  Devin Rousso  <drousso@apple.com>
2345
2346         Web Inspector: Console: getEventListeners should work for any EventTarget
2347         https://bugs.webkit.org/show_bug.cgi?id=195713
2348
2349         Reviewed by Joseph Pecoraro.
2350
2351         * UserInterface/Models/NativeFunctionParameters.js:
2352
2353 2019-03-14  Devin Rousso  <drousso@apple.com>
2354
2355         Web Inspector: Styles: `::-webkit-scrollbar*` rules aren't shown
2356         https://bugs.webkit.org/show_bug.cgi?id=195123
2357         <rdar://problem/48450148>
2358
2359         Reviewed by Joseph Pecoraro.
2360
2361         * UserInterface/Controllers/CSSManager.js:
2362         (WI.CSSManager.displayNameForPseudoId): Added.
2363
2364         * UserInterface/Models/DOMNodeStyles.js:
2365         (WI.DOMNodeStyles.static uniqueOrderedStyles): Added.
2366         (WI.DOMNodeStyles.prototype.get uniqueOrderedStyles):
2367
2368         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2369         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
2370         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
2371         Rather than iterate over the `WI.DOMNode`'s list of pseudo-elements (which is only ::before
2372         and ::after), we iterate over the `WI.DOMNodeStyle`'s list of pseudo-element rules. This is
2373         an object where the key is a `CSS.PseudoId` and the value is an object containing all the
2374         matched rules and ordered styles for that pseudo-type. We can preserve the current
2375         functionality by using the ::before/::after `WI.DOMNode` when we encounter one of those
2376         pseudo-ids.
2377
2378         An additional benefit of this change is that `::before`/`::after` styles will still appear
2379         in the Rules panel even if they don't have a `content` property set (e.g. when the
2380         `::before`/`::after` pseudo-element doesn't exist). This is because the styles are no longer
2381         fetched from those pseudo-element nodes directly, but rather as a matched style for the
2382         parent node. As such, editing a `content` property to become invalid/disablde in a
2383         `::before`/`::after` rule won't make the entire rule disappeaer.
2384
2385 2019-03-14  Devin Rousso  <drousso@apple.com>
2386
2387         Web Inspector: we should show artificial context menus on mousedown instead of click
2388         https://bugs.webkit.org/show_bug.cgi?id=195494
2389
2390         Reviewed by Joseph Pecoraro.
2391
2392         * UserInterface/Views/ContextMenu.js:
2393         (WI.ContextMenu):
2394         (WI.ContextMenu.prototype.show):
2395         (WI.ContextMenu.prototype.addBeforeShowCallback): Added.
2396         (WI.ContextMenu.prototype.handleEvent):
2397         Provide a way to register a callback that will be called right as the "contextmenu" event is
2398         handled, but before the context menu is actually shown. Since "mousedown" events are also
2399         fired when/before a "contextmenu" event is fired, each of the below callers has to maintain
2400         some state indicating "we are about to show a context menu, so ignore all "mousedown" events
2401         until that time". Without this, the below callers wouldn't be able to tell when the context
2402         menu is finally shown.
2403
2404         * UserInterface/Base/SearchUtilities.js:
2405         (WI.SearchUtilities.createSettingsButton):
2406         * UserInterface/Views/CanvasContentView.js:
2407         (WI.CanvasContentView):
2408         (WI.CanvasContentView.prototype.initialLayout):
2409         (WI.CanvasContentView.prototype._handleCanvasElementButtonMouseDown): Added.
2410         (WI.CanvasContentView.prototype._handleViewShaderButtonMouseDown): Added.
2411         (WI.CanvasContentView.prototype._handleViewRecordingButtonMouseDown): Added.
2412         (WI.CanvasContentView.prototype._canvasElementButtonClicked): Deleted.
2413         (WI.CanvasContentView.prototype._handleViewShaderButtonClicked): Deleted.
2414         (WI.CanvasContentView.prototype._handleViewRecordingButtonClicked): Deleted.
2415         * UserInterface/Views/DebuggerSidebarPanel.js:
2416         (WI.DebuggerSidebarPanel):
2417         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): Added.
2418         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked): Deleted.
2419         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2420         (WI.SourcesNavigationSidebarPanel):
2421         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): Added.
2422         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked): Deleted.
2423         * UserInterface/Views/TabBar.js:
2424         (WI.TabBar.prototype._handleMouseDown):
2425         * UserInterface/Views/LegacyTabBar.js:
2426         (WI.LegacyTabBar.prototype._handleMouseDown):
2427
2428 2019-03-13  Devin Rousso  <drousso@apple.com>
2429
2430         Web Inspector: Debugger: pausing in an inline script on a page with a URL query creates an Extra Script
2431         https://bugs.webkit.org/show_bug.cgi?id=195705
2432         <rdar://problem/48853820>
2433
2434         Reviewed by Antoine Quint.
2435
2436         * UserInterface/Models/Script.js:
2437         (WI.Script.prototype._resolveResource):
2438         If the page's URL has a query parameter, the payload we receive for any inline <script>s
2439         doesn't include the query parameter as part of its URL. As such, if there isn't an existing
2440         resource with a URL that exactly matches the URL of the script and if the URL of the main
2441         resource for the script's target starts with the URL of the script, we assume that the
2442         script "belongs" to the target's main resource and associate the script with it as such.
2443
2444 2019-03-13  Keith Rollin  <krollin@apple.com>
2445
2446         Add support for new StagedFrameworks layout
2447         https://bugs.webkit.org/show_bug.cgi?id=195543
2448
2449         Reviewed by Alexey Proskuryakov.
2450
2451         When creating the WebKit layout for out-of-band Safari/WebKit updates,
2452         use an optional path prefix when called for.
2453
2454         Opportunistic cleanup: remove unused
2455         OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH variable, which otherwise would
2456         have needlessly been updated to also incorporate the new prefix.
2457
2458         * Configurations/Base.xcconfig:
2459         * Configurations/WebKitTargetConditionals.xcconfig: Added.
2460
2461 2019-03-13  Nikita Vasilyev  <nvasilyev@apple.com>
2462
2463         REGRESSION(r240946): Web Inspector: Styles: removing selected property doesn't update overridden status
2464         https://bugs.webkit.org/show_bug.cgi?id=195389
2465         <rdar://problem/48658929>
2466
2467         Reviewed by Matt Baker.
2468
2469         * UserInterface/Models/DOMNodeStyles.js:
2470         (WI.DOMNodeStyles.prototype.changeStyleText):
2471         Call DOMNodeStyles.prototype.refresh after the callback. No updates
2472         to CSSStyleDeclaration happen until the callback is called.
2473
2474 2019-03-13  Devin Rousso  <drousso@apple.com>
2475
2476         Web Inspector: Protocol Logging: log messages with backtrace if inspector^2 is open
2477         https://bugs.webkit.org/show_bug.cgi?id=195687
2478
2479         Reviewed by Joseph Pecoraro.
2480
2481         * UserInterface/Protocol/LoggingProtocolTracer.js:
2482         (WI.LoggingProtocolTracer.prototype._processEntry):
2483
2484 2019-03-13  Devin Rousso  <drousso@apple.com>
2485
2486         Web Inspector: REGRESSION(r242737): unnecessary semicolon added when populating WI.TreeOutline stylesheet
2487         https://bugs.webkit.org/show_bug.cgi?id=195689
2488
2489         Reviewed by Joseph Pecoraro.
2490
2491         * UserInterface/Views/TreeOutline.js:
2492         (WI.TreeOutline._generateStyleRulesIfNeeded):
2493
2494 2019-03-13  Joseph Pecoraro  <pecoraro@apple.com>
2495
2496         Web Inspector: Network - HAR Export duplicates blocked/send time if there was no dns/connect block
2497         https://bugs.webkit.org/show_bug.cgi?id=195655
2498         <rdar://problem/48831152>
2499
2500         Reviewed by Devin Rousso.
2501
2502         * UserInterface/Controllers/HARBuilder.js:
2503         (WI.HARBuilder.timings):
2504
2505 2019-03-12  Devin Rousso  <drousso@apple.com>
2506
2507         Web Inspector: Sources: allow image collections to be filtered by type
2508         https://bugs.webkit.org/show_bug.cgi?id=195630
2509
2510         Reviewed by Matt Baker.
2511
2512         * UserInterface/Views/ResourceCollectionContentView.js:
2513         (WI.ResourceCollectionContentView):
2514         (WI.ResourceCollectionContentView.prototype.get navigationItems): Added.
2515         (WI.ResourceCollectionContentView.prototype.contentViewAdded):
2516         (WI.ResourceCollectionContentView.prototype.contentViewRemoved): Added.
2517         (WI.ResourceCollectionContentView.prototype._updateImageTypeScopeBar): Added.
2518         (WI.ResourceCollectionContentView.prototype._handleImageTypeSelectionChanged): Added.
2519         * UserInterface/Views/ResourceCollectionContentView.css: Asdded.
2520         (.resource-collection-image-type-scope-bar.default-item-selected):
2521
2522         * UserInterface/Views/CollectionContentView.css:
2523         (.content-view.collection > .content-view[hidden]): Added.
2524
2525         * UserInterface/Views/ScopeBarItem.js:
2526         (WI.ScopeBarItem.prototype.set hidden):
2527         * UserInterface/Views/MultipleScopeBarItem.js:
2528         (WI.MultipleScopeBarItem.prototype.set scopeBarItems):
2529         (WI.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
2530         (WI.MultipleScopeBarItem.prototype.get _visibleScopeBarItems): Added.
2531         (WI.MultipleScopeBarItem.prototype._selectElementSelectionChanged):
2532         (WI.MultipleScopeBarItem.prototype._handleItemHiddenChanged): Added.
2533         Dispatch an event when an item is hidden so that any owner `WI.MultipleScopeBarItem` can
2534         rerender it's <select> without that item.
2535
2536         * Localizations/en.lproj/localizedStrings.js:
2537         * UserInterface/Main.html:
2538
2539 2019-03-12  Nikita Vasilyev  <nvasilyev@apple.com>
2540
2541         Web Inspector: Keyboard shortcut for settings tab too greedy on non-US keyboards
2542         https://bugs.webkit.org/show_bug.cgi?id=192947
2543         <rdar://problem/46886779>
2544
2545         Reviewed by Devin Rousso.
2546
2547         * UserInterface/Base/Main.js:
2548         (WI._showSettingsTab):
2549
2550 2019-03-12  Devin Rousso  <drousso@apple.com>
2551
2552         Web Inspector: Elements: provide node context menu items for event listeners sorted by node
2553         https://bugs.webkit.org/show_bug.cgi?id=195633
2554
2555         Reviewed by Matt Baker.
2556
2557         * UserInterface/Base/DOMUtilities.js:
2558         (WI.linkifyNodeReferenceElement):
2559         (WI.bindInteractionsForNodeToElement): Added.
2560         Split logic for adding event listeners into a separate function so it can be used on
2561         existing DOM without modifying it.
2562
2563         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2564         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
2565
2566 2019-03-12  Devin Rousso  <drousso@apple.com>
2567
2568         Web Inspector: DOM Debugger: remove left padding when the last DOM breakpoint is removed
2569         https://bugs.webkit.org/show_bug.cgi?id=195522
2570
2571         Reviewed by Matt Baker.
2572
2573         * UserInterface/Views/DOMTreeContentView.js:
2574         (WI.DOMTreeContentView.prototype._updateBreakpointStatus):
2575         * UserInterface/Views/DOMTreeElement.js:
2576         (WI.DOMTreeElement.prototype.get hasBreakpoint): Added.
2577
2578 2019-03-12  Devin Rousso  <drousso@apple.com>
2579
2580         Web Inspector: Canvas: export recording as HTML
2581         https://bugs.webkit.org/show_bug.cgi?id=195311
2582         <rdar://problem/48588673>
2583
2584         Reviewed by Joseph Pecoraro.
2585
2586         * UserInterface/Models/Recording.js:
2587         (WI.Recording.prototype.async swizzle):
2588         (WI.Recording.prototype.toHTML): Added.
2589         (WI.Recording.prototype.toHTML.escapeHTML): Added.
2590         (WI.Recording.prototype.toHTML.processObject): Added.
2591         (WI.Recording.prototype.toHTML.processValue): Added.
2592
2593         * UserInterface/Views/RecordingContentView.js:
2594         (WI.RecordingContentView):
2595         (WI.RecordingContentView.prototype._exportRecording):
2596         (WI.RecordingContentView.prototype._exportReduction): Added.
2597         (WI.RecordingContentView.prototype._updateExportButton): Added.
2598         (WI.RecordingContentView.prototype._handleExportNavigationItemClicked): Added.
2599         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
2600
2601         * UserInterface/Views/CanvasOverviewContentView.js:
2602         (WI.CanvasOverviewContentView):
2603         * UserInterface/Views/HeapAllocationsTimelineView.js:
2604         (WI.HeapAllocationsTimelineView):
2605         * UserInterface/Views/HeapSnapshotContentView.js:
2606         (WI.HeapSnapshotContentView):
2607         Drive-by: s/`toolTip`/`tooltip`.
2608
2609         * Localizations/en.lproj/localizedStrings.js:
2610
2611 2019-03-12  Devin Rousso  <drousso@apple.com>
2612
2613         Web Inspector: Audit: there should be a centralized place for reusable code
2614         https://bugs.webkit.org/show_bug.cgi?id=195265
2615         <rdar://problem/47040673>
2616
2617         Reviewed by Joseph Pecoraro.
2618
2619         * UserInterface/Controllers/AuditManager.js:
2620         (WI.AuditManager.prototype.async start):
2621         (WI.AuditManager.prototype._topLevelTestForTest): Added.
2622         (WI.AuditManager.prototype._topLevelTestForTest.walk): Added.
2623
2624         * UserInterface/Models/AuditTestBase.js:
2625         (WI.AuditTestBase):
2626         (WI.AuditTestBase.prototype.async setup): Added.
2627         (WI.AuditTestBase.toJSON):
2628
2629         * UserInterface/Models/AuditTestCase.js:
2630         (WI.AuditTestCase.async.fromPayload):
2631         (WI.AuditTestCase.prototype.async run.async parseResponse):
2632         Allow additional data to be passed back to the result's `data` for testing.
2633
2634         * UserInterface/Models/AuditTestGroup.js:
2635         (WI.AuditTestGroup.async.fromPayload):
2636
2637 2019-03-12  Joseph Pecoraro  <pecoraro@apple.com>
2638
2639         Web Inspector: Timelines - Improve handling of past recordings (readonly)
2640         https://bugs.webkit.org/show_bug.cgi?id=195594
2641
2642         Reviewed by Devin Rousso.
2643
2644         * UserInterface/Views/TimelineRecordingContentView.js:
2645         (WI.TimelineRecordingContentView.prototype._clearTimeline):
2646         Don't allow clearing of a readonly recording.
2647
2648         * UserInterface/Views/TimelineTabContentView.js:
2649         (WI.TimelineTabContentView.prototype._toggleRecordingOnSpacebar):
2650         Don't do anything when viewing a readonly recording.
2651
2652         (WI.TimelineTabContentView.prototype._recordButtonClicked):
2653         Start a new recording if viewing a readonly recording.
2654
2655 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
2656
2657         Web Inspector: REGRESSION: Network Cookies Table does not load
2658         https://bugs.webkit.org/show_bug.cgi?id=195599
2659
2660         Reviewed by Devin Rousso.
2661
2662         * UserInterface/Views/ResourceCookiesContentView.js:
2663         (WI.ResourceCookiesContentView.prototype.tableIndexForRepresentedObject):
2664         (WI.ResourceCookiesContentView.prototype.tableRepresentedObjectForIndex):
2665         Include needed delegate methods.
2666
2667 2019-03-11  Devin Rousso  <drousso@apple.com>
2668
2669         Web Inspector: use -webkit-{margin,padding}-{start,end} instead of [dir={ltr/rtl}] rules
2670         https://bugs.webkit.org/show_bug.cgi?id=195569
2671         <rdar://problem/48778727>
2672
2673         Reviewed by Matt Baker.
2674
2675         * UserInterface/Debug/UncaughtExceptionReporter.css:
2676         * UserInterface/Views/BoxModelDetailsSectionRow.css:
2677         * UserInterface/Views/BreakpointActionView.css:
2678         * UserInterface/Views/BreakpointPopoverController.css:
2679         * UserInterface/Views/CPUTimelineView.css:
2680         * UserInterface/Views/CallFrameTreeElement.css:
2681         * UserInterface/Views/CallFrameView.css:
2682         * UserInterface/Views/DOMTreeContentView.css:
2683         * UserInterface/Views/DOMTreeOutline.css:
2684         * UserInterface/Views/DashboardContainerView.css:
2685         * UserInterface/Views/DataGrid.css:
2686         * UserInterface/Views/DebuggerDashboardView.css:
2687         * UserInterface/Views/DebuggerSidebarPanel.css:
2688         * UserInterface/Views/DefaultDashboardView.css:
2689         * UserInterface/Views/DetailsSection.css:
2690         * UserInterface/Views/FilterBar.css:
2691         * UserInterface/Views/FindBanner.css:
2692         * UserInterface/Views/FontResourceContentView.css:
2693         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
2694         * UserInterface/Views/HierarchicalPathComponent.css:
2695         * UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
2696         * UserInterface/Views/Main.css:
2697         * UserInterface/Views/NetworkTableContentView.css:
2698         * UserInterface/Views/OpenResourceDialog.css:
2699         * UserInterface/Views/RecordingActionTreeElement.css:
2700         * UserInterface/Views/ScopeRadioButtonNavigationItem.css:
2701         * UserInterface/Views/SettingsTabContentView.css:
2702         * UserInterface/Views/ThreadTreeElement.css:
2703         * UserInterface/Views/Toolbar.css:
2704         * UserInterface/Views/TreeOutline.css:
2705         * UserInterface/Views/TypeTreeElement.css:
2706         * UserInterface/Views/TypeTreeView.css:
2707         * UserInterface/Views/URLBreakpointPopover.css:
2708         * UserInterface/Views/WebSocketContentView.css:
2709
2710         * UserInterface/Views/RecordingActionTreeElement.js:
2711         (WI.RecordingActionTreeElement.static _getClassNames):
2712         Replace class `.action` with `.recording-action` for better uniqueness/clarity.
2713
2714 2019-03-11  Devin Rousso  <drousso@apple.com>
2715
2716         Web Inspector: DOMDebugger: protocol error on first open
2717         https://bugs.webkit.org/show_bug.cgi?id=195248
2718         <rdar://problem/48538465>
2719
2720         Unreviewed followup of r242743 to fix test inspector/dom-debugger/dom-breakpoints.html.
2721
2722         * UserInterface/Controllers/DOMDebuggerManager.js:
2723         (WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
2724         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
2725         Still attempt to resolve the DOM breakpoint if it already has a `domNodeIdentifier` so that
2726         it will get added to the node's frame's DOM breakpoint map. Without this, some breakpoints
2727         might get "missed" when calling `WI.domDebuggerManager.removeDOMBreakpointsForNode`.
2728
2729 2019-03-11  Justin Fan  <justin_fan@apple.com>
2730
2731         [Web GPU] Update GPUSwapChainDescriptor, GPUSwapChain and implement GPUCanvasContext
2732         https://bugs.webkit.org/show_bug.cgi?id=194406
2733         <rdar://problem/47892466>
2734
2735         Reviewed by Myles C. Maxfield.
2736
2737         Name updates for Web GPU renaming in inspector.
2738
2739         * UserInterface/Models/Canvas.js:
2740         (WI.Canvas.displayNameForContextType):
2741
2742 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
2743
2744         Web Inspector: Editing Timelines shows two CPU Timelines
2745         https://bugs.webkit.org/show_bug.cgi?id=195578
2746
2747         Reviewed by Devin Rousso.
2748
2749         * UserInterface/Controllers/TimelineManager.js:
2750         (WI.TimelineManager.availableTimelineTypes):
2751         The CPU Instrument is already in the default list.
2752
2753 2019-03-11  Devin Rousso  <drousso@apple.com>
2754
2755         Web Inspector: DOMDebugger: protocol error on first open
2756         https://bugs.webkit.org/show_bug.cgi?id=195248
2757         <rdar://problem/48538465>
2758
2759         Reviewed by Joseph Pecoraro.
2760
2761         Don't try to call `DOMDebugger` commands until a target has been initialized.
2762         Still attempt to resolve DOM breakpoints whenever the main resource/frame changes.
2763
2764         * UserInterface/Controllers/DOMDebuggerManager.js:
2765         (WI.DOMDebuggerManager):
2766         (WI.DOMDebuggerManager.prototype.initializeTarget): Added.
2767         (WI.DOMDebuggerManager.supportsEventBreakpoints):
2768         (WI.DOMDebuggerManager.prototype.get supported):
2769         (WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
2770         (WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
2771         (WI.DOMDebuggerManager.prototype.addEventBreakpoint):
2772         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
2773         (WI.DOMDebuggerManager.prototype.addURLBreakpoint):
2774         (WI.DOMDebuggerManager.prototype.removeURLBreakpoint):
2775         (WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL): Added.
2776         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
2777         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
2778         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
2779         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
2780         (WI.DOMDebuggerManager.prototype._saveDOMBreakpoints):
2781         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
2782         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
2783         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
2784         (WI.DOMDebuggerManager.prototype._mainFrameDidChange):
2785         (WI.DOMDebuggerManager.prototype._mainResourceDidChange):
2786         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint.breakpointRemoved): Deleted.
2787         (WI.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints): Deleted.
2788         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint.breakpointUpdated): Deleted.
2789         (WI.DOMDebuggerManager.prototype._resolveEventBreakpoint): Deleted.
2790         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint): Deleted.
2791
2792         * UserInterface/Base/Multimap.js: Added.
2793         (Multimap):
2794         (Multimap.prototype.get):
2795         (Multimap.prototype.add):
2796         (Multimap.prototype.delete):
2797         (Multimap.prototype.clear):
2798         (Multimap.prototype.keys):
2799         (Multimap.prototype.*values):
2800         (Multimap.prototype.*[Symbol.iterator]):
2801         (Multimap.prototype.toJSON):
2802         * .eslintrc:
2803         * UserInterface/Main.html:
2804         * UserInterface/Test.html:
2805         Helper data structure for managing Maps of Sets (e.g. all DOM breakpoints for a URL).
2806
2807 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
2808
2809         Web Inspector: CPU Usage Timeline - Enable by default
2810         https://bugs.webkit.org/show_bug.cgi?id=195471
2811
2812         Reviewed by Devin Rousso.
2813
2814         Remove experimental setting and include the CPU timeline in the
2815         default set of timelines.
2816
2817         * UserInterface/Base/Setting.js:
2818         * UserInterface/Controllers/TimelineManager.js:
2819         (WI.TimelineManager.defaultTimelineTypes):
2820         * UserInterface/Main.html:
2821         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2822         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.selected):
2823         (.timeline-overview-graph.cpu > .column-chart > svg > rect): Deleted.
2824         (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart): Deleted.
2825         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2826         (WI.CPUTimelineOverviewGraph):
2827         (WI.CPUTimelineOverviewGraph.prototype.layout):
2828         * UserInterface/Views/ContentView.js:
2829         (WI.ContentView.createFromRepresentedObject):
2830         * UserInterface/Views/LegacyCPUTimelineView.css: Removed.
2831         * UserInterface/Views/LegacyCPUTimelineView.js: Removed.
2832         * UserInterface/Views/SettingsTabContentView.js:
2833         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2834         * UserInterface/Views/Variables.css:
2835         (:root):
2836
2837 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
2838
2839         Web Inspector: CPU Usage Timeline - Better Thread chart layout values
2840         https://bugs.webkit.org/show_bug.cgi?id=195547
2841
2842         Reviewed by Devin Rousso.
2843
2844         * UserInterface/Views/CPUTimelineView.js:
2845         (WI.CPUTimelineView.prototype.layout.bestThreadLayoutMax):
2846         (WI.CPUTimelineView.prototype.layout.layoutView):
2847         (WI.CPUTimelineView.prototype._showGraphOverlay):
2848         Include a separate layoutMax for the combined view and a thread layoutMax
2849         for the thread groups.
2850
2851 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
2852
2853         Web Inspector: CPU Usage Timeline - Add legend and graph hover effects
2854         https://bugs.webkit.org/show_bug.cgi?id=195390
2855
2856         Reviewed by Devin Rousso.
2857
2858         * Localizations/en.lproj/localizedStrings.js:
2859         New strings for the legends.
2860
2861         * UserInterface/Main.html:
2862         Combined files.
2863
2864         * UserInterface/Views/Variables.css:
2865         (:root):
2866         (@media (prefers-color-scheme: dark)):
2867         Tweaked colors, including individual stroke and fill colors for each CPU section.
2868
2869         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2870         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.total-usage):
2871         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
2872         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
2873         Updated colors.
2874
2875         * UserInterface/Views/CPUUsageCombinedView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CPUUsageStackedView.css.
2876         (.cpu-usage-combined-view > .details > .legend-container):
2877         (.cpu-usage-combined-view > .details > .legend-container > .row):
2878         (.cpu-usage-combined-view > .details > .legend-container > .row + .row):
2879         (.cpu-usage-combined-view > .details > .legend-container > .row > .swatch):
2880         * UserInterface/Views/CPUUsageCombinedView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CPUUsageStackedView.js.
2881         (WI.CPUUsageCombinedView.appendLegendRow):
2882         (WI.CPUUsageCombinedView):
2883         (WI.CPUUsageCombinedView.prototype.get graphElement):
2884         (WI.CPUUsageCombinedView.prototype.get chart):
2885         (WI.CPUUsageCombinedView.prototype.get rangeChart):
2886         (WI.CPUUsageCombinedView.prototype.clear):
2887         (WI.CPUUsageCombinedView.prototype.updateChart):
2888         (WI.CPUUsageCombinedView.prototype.updateMainThreadIndicator):
2889         (WI.CPUUsageCombinedView.prototype.clearLegend):
2890         (WI.CPUUsageCombinedView.prototype.updateLegend):
2891         (WI.CPUUsageCombinedView.prototype._updateDetails):
2892         * UserInterface/Views/CPUUsageIndicatorView.css: Removed.
2893         * UserInterface/Views/CPUUsageIndicatorView.js: Removed.
2894         Combined the Indicator and StackedAreaChart into a single view
2895         that share a left details section.
2896
2897         * UserInterface/Views/CPUUsageView.js:
2898         (WI.CPUUsageView):
2899         (WI.CPUUsageView.prototype.get graphElement):
2900         (WI.CPUUsageView.prototype.clear):
2901         (WI.CPUUsageView.prototype.updateChart):
2902         (WI.CPUUsageView.prototype.clearLegend):
2903         (WI.CPUUsageView.prototype.updateLegend):
2904         (WI.CPUUsageView.prototype._updateDetails):
2905         Include a legend in the left details section.
2906
2907         * UserInterface/Views/AreaChart.js:
2908         (WI.AreaChart):
2909         (WI.AreaChart.prototype.addPointMarker):
2910         (WI.AreaChart.prototype.clearPointMarkers):
2911         (WI.AreaChart.prototype.clear):
2912         (WI.AreaChart.prototype.layout):
2913         * UserInterface/Views/StackedAreaChart.js:
2914         (WI.StackedAreaChart):
2915         (WI.StackedAreaChart.prototype.addPointMarker):
2916         (WI.StackedAreaChart.prototype.clearPointMarkers):
2917         (WI.StackedAreaChart.prototype.clear):
2918         (WI.StackedAreaChart.prototype.layout):
2919         Add point markers for the area charts.
2920
2921         * UserInterface/Views/CPUTimelineView.css:
2922         * UserInterface/Views/CPUTimelineView.js:
2923         (WI.CPUTimelineView):
2924         (WI.CPUTimelineView.prototype.get cpuUsageViewHeight):
2925         (WI.CPUTimelineView.prototype.clear):
2926         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
2927         (WI.CPUTimelineView.prototype.initialLayout):
2928         (WI.CPUTimelineView.prototype.layout):
2929         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
2930         (WI.CPUTimelineView.prototype._handleMouseClick):
2931         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
2932         (WI.CPUTimelineView.prototype._showGraphOverlayNearTo):
2933         (WI.CPUTimelineView.prototype._updateGraphOverlay):
2934         (WI.CPUTimelineView.prototype._showGraphOverlay.xScale):
2935         (WI.CPUTimelineView.prototype._showGraphOverlay.yScale):
2936         (WI.CPUTimelineView.prototype._showGraphOverlay.addOverlayPoint):
2937         (WI.CPUTimelineView.prototype._showGraphOverlay):
2938         (WI.CPUTimelineView.prototype._clearOverlayMarkers.clearGraphOverlayElement):
2939         (WI.CPUTimelineView.prototype._clearOverlayMarkers):
2940         (WI.CPUTimelineView.prototype._hideGraphOverlay):
2941         Include graph overlay markers.
2942
2943 2019-03-11  Devin Rousso  <drousso@apple.com>
2944
2945         Web Inspector: eliminate manual syncing of numeric constants used by JavaScript and CSS
2946         https://bugs.webkit.org/show_bug.cgi?id=194883
2947         <rdar://problem/48257785>
2948
2949         Reviewed by Joseph Pecoraro.
2950
2951         * UserInterface/Views/CanvasOverviewContentView.js:
2952         (WI.CanvasOverviewContentView):
2953         (WI.CanvasOverviewContentView.static get recordingAutoCaptureInputMargin): Added.
2954         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
2955         * UserInterface/Views/CanvasOverviewContentView.css:
2956         (.navigation-bar > .item.canvas-recording-auto-capture > label > input):
2957
2958         * UserInterface/Views/MemoryTimelineView.js:
2959         (WI.MemoryTimelineView.static get memoryCategoryViewHeight): Added.
2960         (WI.MemoryTimelineView.prototype.initialLayout): Added.
2961         (WI.MemoryTimelineView.prototype.layout):
2962         * UserInterface/Views/MemoryCategoryView.css:
2963         (.memory-category-view):
2964
2965         * UserInterface/Views/NetworkTableContentView.js:
2966         (WI.NetworkTableContentView.static get nodeWaterfallDOMEventSize): Added.
2967         (WI.NetworkTableContentView.prototype.initialLayout):
2968         * UserInterface/Views/NetworkTableContentView.css:
2969         (.content-view.network .network-table): Deleted.
2970
2971         * UserInterface/Views/TreeOutline.js:
2972         (WI.TreeOutline._generateStyleRulesIfNeeded):
2973         * UserInterface/Views/TreeOutline.css:
2974         (.tree-outline, .tree-outline .children):
2975         (.tree-outline .item):
2976
2977         * UserInterface/Controllers/CanvasManager.js:
2978         (WI.CanvasManager.supportsRecordingAutoCapture):
2979         Drive-by: fix usage of InspectorBackend.domains.{CanvasAgent => Canvas}
2980
2981 2019-03-11  Nikita Vasilyev  <nvasilyev@apple.com>
2982
2983         REGRESSION(r242622): Web Inspector: Fix asserts "Overridden property is missing overridingProperty"
2984         https://bugs.webkit.org/show_bug.cgi?id=195515
2985         <rdar://problem/48737315>
2986
2987         Reviewed by Matt Baker.
2988
2989         * UserInterface/Views/SpreadsheetStyleProperty.js:
2990         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
2991
2992 2019-03-07  Nikita Vasilyev  <nvasilyev@apple.com>
2993
2994         Web Inspector: Styles: overridden CSS property should have go-to button to jump to effective property
2995         https://bugs.webkit.org/show_bug.cgi?id=185930
2996         <rdar://problem/40506252>
2997
2998         Reviewed by Matt Baker.
2999
3000         Introduce a new experimental jump to effective property button. The button is a small arrow button
3001         next to an overridden CSS property. Clicking the button scrolls to the effective CSS property and
3002         selects it.
3003
3004         * Localizations/en.lproj/localizedStrings.js:
3005         * UserInterface/Base/Setting.js:
3006         * UserInterface/Models/CSSProperty.js:
3007         (WI.CSSProperty):
3008         (WI.CSSProperty.prototype.update):
3009         (WI.CSSProperty.prototype.get overridingProperty):
3010         (WI.CSSProperty.prototype.set overridingProperty):
3011         * UserInterface/Models/DOMNodeStyles.js:
3012         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
3013         * UserInterface/Views/SettingsTabContentView.js:
3014         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3015         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3016         (.spreadsheet-style-declaration-editor .property.overridden .select-effective-property):
3017         (.spreadsheet-style-declaration-editor .property.overridden:hover .select-effective-property,):
3018         (.spreadsheet-style-declaration-editor .property.overridden:hover .select-effective-property::after,):
3019         (@media (prefers-color-scheme: dark)):
3020         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3021         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelectByProperty):
3022         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3023         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorSelectProperty):
3024         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3025         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionSelectProperty):
3026         * UserInterface/Views/SpreadsheetStyleProperty.js:
3027         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
3028
3029 2019-03-07  Devin Rousso  <drousso@apple.com>
3030
3031         Web Inspector: Protocol: add type checking when commands are called via invoke
3032         https://bugs.webkit.org/show_bug.cgi?id=195310
3033         <rdar://problem/48588679>
3034
3035         Reviewed by Joseph Pecoraro.
3036
3037         * UserInterface/Protocol/InspectorBackend.js:
3038         (InspectorBackend.Command.prototype.invoke.deliverFailure): Added.
3039         (InspectorBackend.Command.prototype.invoke):
3040         (InspectorBackend.Command.prototype._invokeWithArguments):
3041
3042 2019-03-07  Devin Rousso  <drousso@apple.com>
3043
3044         Web Inspector: REGRESSION(r242118): WI.ScopeBar missing background
3045         https://bugs.webkit.org/show_bug.cgi?id=195299
3046
3047         Reviewed by Joseph Pecoraro.
3048
3049         Rework the way `color`, `background-color`, and `border-color` are set for `WI.ScopeBar` to
3050         use CSS variables instead. Divides the variables into three categories:
3051          - default: these are the values that the `WI.ScopeBar` would use normally
3052          - override: these are values that take precidence over the default (e.g. set by other elements)
3053             - falls back to default when no value is set
3054          - actual: this is the resulting value that will be used when displaying
3055             - this way, other elements can "mirror" the styling of the `WI.ScopeBar`
3056
3057         * UserInterface/Views/ScopeBar.css:
3058         (.scope-bar):
3059         (.scope-bar > li):
3060         (.scope-bar > li::before):
3061         (.scope-bar > li:matches(.selected, :hover)):
3062         (.scope-bar > li:not(.selected):hover::after):
3063         (.scope-bar > li.selected:active::after):
3064         (.scope-bar > li.multiple > select):
3065         (body[dir=ltr] .scope-bar > li.multiple > select):
3066         (body[dir=rtl] .scope-bar > li.multiple > select):
3067         (.scope-bar > li.multiple:not(.selected) > select): Added.
3068         (.scope-bar > li.multiple > .arrows):
3069         (.scope-bar > li::before): Deleted.
3070         (.scope-bar.default-item-selected > li.multiple.selected::before): Deleted.
3071         (.scope-bar > li:matches(.selected, :hover)::before): Deleted.
3072         (.scope-bar > li.selected:active::before): Deleted.
3073         (.scope-bar > li.multiple.selected > select): Deleted.
3074         (body[dir=ltr] .scope-bar > li.multiple > .arrows): Deleted.
3075         (body[dir=rtl] .scope-bar > li.multiple > .arrows): Deleted.
3076         (.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows): Deleted.
3077         (.scope-bar > li:matches(.selected, :active)): Deleted.
3078         (@media (prefers-color-scheme: dark)): Deleted.
3079         Switch to using `::after` since `::before` is more commonly used.
3080
3081         * UserInterface/Views/MultipleScopeBarItem.js:
3082         (WI.MultipleScopeBarItem.prototype._handleMouseDown):
3083         Drive-by: fix the <select> alignment by re-firing the "mousedown" event on it.
3084
3085         * UserInterface/Views/AuditTestGroupContentView.js:
3086         (WI.AuditTestGroupContentView.prototype.layout):
3087         * UserInterface/Views/AuditTestGroupContentView.css:
3088         (.content-view.audit-test-group > header > nav > .scope-bar > li):
3089         (.content-view.audit-test-group > header > nav > .scope-bar > li:not(:hover, .selected)):
3090         (.content-view.audit-test-group > header > nav > .scope-bar > li > img): Added.
3091         (.content-view.audit-test-group > header > nav > .scope-bar > li.pass > img): Added.
3092         (.content-view.audit-test-group > header > nav > .scope-bar > li.warn > img): Added.
3093         (.content-view.audit-test-group > header > nav > .scope-bar > li.fail > img): Added.
3094         (.content-view.audit-test-group > header > nav > .scope-bar > li.error > img): Added.
3095         (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported > img): Added.
3096         (.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-case.filtered ~ .audit-test-case:not(.filtered), .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group): Added.
3097         (.content-view.audit-test-group > section > .audit-test-case:not(.filtered) ~ .audit-test-case:not(.filtered)): Added.
3098         (.content-view.audit-test-group > header > nav > .scope-bar > li::before): Deleted.
3099         (.content-view.audit-test-group > header > nav > .scope-bar > li.pass::before): Deleted.
3100         (.content-view.audit-test-group > header > nav > .scope-bar > li.warn::before): Deleted.
3101         (.content-view.audit-test-group > header > nav > .scope-bar > li.fail::before): Deleted.
3102         (.content-view.audit-test-group > header > nav > .scope-bar > li.error::before): Deleted.
3103         (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported::before): Deleted.
3104         (.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group): Deleted.
3105         Replace the `::before` image with an actual `<img>` now that the `WI.ScopeBar` itself uses
3106         a pseudo-element for the background styling.
3107
3108         * UserInterface/Views/LogContentView.js:
3109         (WI.LogContentView):
3110         * UserInterface/Views/LogContentView.css:
3111         (.log-scope-bar > li:not(.unread) > .indicator): Added.
3112         (.log-scope-bar > li.unread > .indicator): Added.
3113         (.log-scope-bar > li.unread:hover > .indicator): Added.
3114         (.log-scope-bar > li.unread.errors > .indicator): Added.
3115         (.log-scope-bar > li.unread.warnings > .indicator): Added.
3116         (.log-scope-bar > li.unread.logs > .indicator): Added.
3117         (.log-scope-bar > li.unread::before): Deleted.
3118         (body[dir=ltr] .log-scope-bar > li.unread::before): Deleted.
3119         (body[dir=rtl] .log-scope-bar > li.unread::before): Deleted.
3120         (.log-scope-bar > li.unread:hover::before): Deleted.
3121         (.log-scope-bar > li.unread.errors::before): Deleted.
3122         (.log-scope-bar > li.unread.warnings::before): Deleted.
3123         (.log-scope-bar > li.unread.logs::before): Deleted.
3124         Replace the `::before` unread indicator with an actual `<div>` now that the `WI.ScopeBar`
3125         itself uses a pseudo-element for the background styling.
3126
3127         * UserInterface/Views/TimelineRecordingContentView.css:
3128         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected):
3129         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple): Deleted.
3130         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows): Deleted.
3131
3132         * UserInterface/Views/CanvasSidebarPanel.js:
3133         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
3134         Drive-by: fix typo.
3135
3136 2019-03-07  Devin Rousso  <drousso@apple.com>
3137
3138         Web Inspector: CSS: there should be a way to inline-replace a variable with it's value
3139         https://bugs.webkit.org/show_bug.cgi?id=195335
3140
3141         Reviewed by Joseph Pecoraro.
3142
3143         * UserInterface/Views/InlineSwatch.js:
3144         (WI.InlineSwatch):
3145         (WI.InlineSwatch.prototype.didDismissPopover):
3146         (WI.InlineSwatch.prototype._swatchElementClicked):
3147         (WI.InlineSwatch.prototype._swatchElementClicked.optionsForType): Added.
3148         Shift-clicking a variable swatch replaces the text with the variable's value.
3149         Drive-by: try to create a readonly swatch for the variable's value (e.g. a color indicator).
3150
3151         * UserInterface/Views/SpreadsheetStyleProperty.js:
3152         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
3153         If the value of a variable swatch changes, re-render the value.
3154
3155         * UserInterface/Views/CodeMirrorTextMarkers.js:
3156         (createCodeMirrorTextMarkers):
3157         (createCodeMirrorColorTextMarkers):
3158         (createCodeMirrorGradientTextMarkers):
3159         (createCodeMirrorBezierTextMarkers):
3160         (createCodeMirrorSpringTextMarkers):
3161         Refactor function parameters for more flexibility.
3162
3163         * Localizations/en.lproj/localizedStrings.js:
3164
3165 2019-03-06  Devin Rousso  <drousso@apple.com>
3166
3167         Web Inspector: Elements: highlight the node when hovering event listeners sorted by node
3168         https://bugs.webkit.org/show_bug.cgi?id=195368
3169
3170         Reviewed by Joseph Pecoraro.
3171
3172         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
3173         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
3174
3175 2019-03-06  Matt Baker  <mattbaker@apple.com>
3176
3177         Web Inspector: system accent color follow-ups
3178         https://bugs.webkit.org/show_bug.cgi?id=195190
3179
3180         Reviewed by Devin Rousso.
3181
3182         * UserInterface/Views/ButtonToolbarItem.css:
3183         (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
3184         (@media (prefers-color-scheme: dark)):
3185         (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)): Deleted.
3186         Drop pressed toolbar button style. It's extremely subtle and not worth the hassle.
3187
3188         * UserInterface/Views/LogContentView.css:
3189         (.console-messages:focus .console-item.selected::after):
3190         (@media (prefers-color-scheme: dark)):
3191
3192         * UserInterface/Views/ScopeBar.css:
3193         (.scope-bar > li.selected:active::before):
3194
3195         * UserInterface/Views/TimelineRecordBar.css:
3196         (.timeline-record-bar.selected > .segment):
3197
3198 2019-03-06  Matt Baker  <mattbaker@apple.com>
3199
3200         REGRESSION: Elements tab: Uncaught Exception: No node with given id found
3201         https://bugs.webkit.org/show_bug.cgi?id=194299
3202         <rdar://problem/47828647>
3203
3204         Reviewed by Devin Rousso.
3205
3206         When removing the selection, TreeOutline subclasses should have more
3207         control over which item becomes selected after the selection is removed.
3208         DOMTreeOutline should track the items that are being removed, and prevent
3209         them or their descendants from becoming selected.
3210
3211         * UserInterface/Views/DOMTreeOutline.js:
3212         (WI.DOMTreeOutline):
3213         (WI.DOMTreeOutline.prototype.ondelete):
3214         (WI.DOMTreeOutline.prototype.canSelectTreeElement):
3215
3216         * UserInterface/Views/TreeOutline.js:
3217         (WI.TreeOutline.prototype.selectionControllerLastSelectableItem):
3218         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
3219         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
3220         (WI.TreeOutline.prototype.canSelectTreeElement):
3221
3222 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
3223
3224         Web Inspector: CPU Usage Timeline - Allow clicking a bar in the overview to select a tight time range around it
3225         https://bugs.webkit.org/show_bug.cgi?id=195321
3226
3227         Reviewed by Devin Rousso.
3228
3229         * UserInterface/Models/Timeline.js:
3230         (WI.Timeline.prototype.closestRecordTo):
3231         Helper to get the closest record to a timestamp.
3232
3233         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3234         (.timeline-overview-graph.cpu > .stacked-column-chart):
3235         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.selected):
3236         Style a selected record with the active color.
3237
3238         * UserInterface/Views/CPUTimelineOverviewGraph.js:
3239         (WI.CPUTimelineOverviewGraph):
3240         (WI.CPUTimelineOverviewGraph.prototype.get samplingRatePerSecond):
3241         (WI.CPUTimelineOverviewGraph.prototype.reset):
3242         (WI.CPUTimelineOverviewGraph.prototype.layout):
3243         (WI.CPUTimelineOverviewGraph.prototype.updateSelectedRecord):
3244         (WI.CPUTimelineOverviewGraph.prototype._graphPositionForMouseEvent):
3245         (WI.CPUTimelineOverviewGraph.prototype._handleGraphMouseClick):
3246         A click in the overview which hits a rect triggers a selection of
3247         the associated timeline record.
3248
3249         * UserInterface/Views/StackedColumnChart.js:
3250         (WI.StackedColumnChart.prototype.addColumnSet):
3251         (WI.StackedColumnChart.prototype.layout):
3252         Allow setting an additional class name with a column set.
3253         It will set the class name on each rect in that column.
3254
3255         * UserInterface/Views/TimelineOverview.js:
3256         (WI.TimelineOverview.prototype._recordSelected):
3257         When selecting a CPU record, make a selection range of 2 neighboring
3258         columns in each direction.
3259
3260         * UserInterface/Views/TimelineRuler.js:
3261         (WI.TimelineRuler.prototype._handleClick):
3262         When a sub-element has handled the click stop further event propagation.
3263
3264         * UserInterface/Views/TimelineOverviewGraph.js:
3265         (WI.TimelineOverviewGraph.prototype.get selected):
3266         Drive-by style fix.
3267
3268 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
3269
3270         Web Inspector: TimelineOverview clicks do not always behave as expected
3271         https://bugs.webkit.org/show_bug.cgi?id=195319
3272
3273         Reviewed by Devin Rousso.
3274
3275         * UserInterface/Views/TimelineRuler.js:
3276         (WI.TimelineRuler.prototype._shouldIgnoreMicroMovement):
3277         (WI.TimelineRuler.prototype._handleMouseDown):
3278         (WI.TimelineRuler.prototype._handleMouseMove):
3279         Ignore moves that haven't gone more than 4px. Once the threshold is
3280         passed allow all moves. This improves the click behavior since
3281         previously click would never re-dispatch if there was any movement.
3282
3283 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
3284
3285         Web Inspector: CPU Usage Timeline - Statistics and Sources sections
3286         https://bugs.webkit.org/show_bug.cgi?id=195202
3287
3288         Reviewed by Devin Rousso.
3289
3290         * Localizations/en.lproj/localizedStrings.js:
3291         New strings.
3292
3293         * UserInterface/Base/Utilities.js:
3294         (Map.prototype.getOrInitialize):
3295         Helper to get and if not found initialize with a value.
3296
3297         * UserInterface/Views/CPUTimelineView.css:
3298         (.timeline-view.cpu > .content > .overview > .chart > .container.stats):
3299         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table):
3300         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > th):
3301         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.number):
3302         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.label):
3303         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .show-more):
3304         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter):
3305         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter:hover):
3306         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active):
3307         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active + .active):
3308         (@media (prefers-color-scheme: dark)):
3309         Colors for the statistics sections.
3310
3311         * UserInterface/Views/CPUTimelineView.js:
3312         (WI.CPUTimelineView):
3313         (WI.CPUTimelineView.prototype.reset):
3314         (WI.CPUTimelineView.prototype.clear):
3315         (WI.CPUTimelineView.prototype._clearStatistics):
3316         (WI.CPUTimelineView.prototype._clearSources):
3317         Updates for additional sections.
3318         Include a cache of the statisiticsData so we can relayout parts of the UI and
3319         avoid an entire UI update.
3320
3321         (WI.CPUTimelineView.prototype.initialLayout):
3322         (WI.CPUTimelineView.prototype._layoutBreakdownChart):
3323         (WI.CPUTimelineView.prototype._layoutStatisticsAndSources):
3324         (WI.CPUTimelineView.prototype._layoutStatisticsSection.createEllipsisElement):
3325         (WI.CPUTimelineView.prototype._layoutStatisticsSection):
3326         (WI.CPUTimelineView.prototype._layoutSourcesSection.firstNonNativeCallFrame):
3327         (WI.CPUTimelineView.prototype._layoutSourcesSection.keyForSourceCodeLocation):
3328         (WI.CPUTimelineView.prototype._layoutSourcesSection.labelForLocation):
3329         (WI.CPUTimelineView.prototype._layoutSourcesSection.createEllipsisElement):
3330         (WI.CPUTimelineView.prototype._layoutSourcesSection):
3331         Extract layouts into helper methods to avoid an enormous layout method.
3332
3333         (WI.CPUTimelineView.prototype._computeSamplingData.incrementTypeCount):
3334         (WI.CPUTimelineView.prototype._computeSamplingData):
3335         Compute additional data when going through script events.
3336
3337         (WI.CPUTimelineView.prototype._resetSourcesFilters):
3338         (WI.CPUTimelineView.prototype._addSourcesFilter):
3339         (WI.CPUTimelineView.prototype._removeSourcesFilter):
3340         (WI.CPUTimelineView.prototype._updateSourcesFilters):
3341         Helpers for updating the source filters.
3342
3343         (WI.CPUTimelineView.prototype._createTableRow):
3344         (WI.CPUTimelineView.prototype._insertTableRow):
3345         Helpers for creating rows in the statistics / sources tables.
3346
3347 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
3348
3349         Web Inspector: Simplify chart <rect>s with x/y attributes instead of transform(x, y)
3350         https://bugs.webkit.org/show_bug.cgi?id=195352
3351
3352         Reviewed by Matt Baker.
3353
3354         * UserInterface/Views/ColumnChart.js:
3355         (WI.ColumnChart.prototype.layout):
3356         (WI.ColumnChart):
3357         * UserInterface/Views/RangeChart.js:
3358         (WI.RangeChart.prototype.layout):
3359         (WI.RangeChart):
3360         * UserInterface/Views/StackedColumnChart.js:
3361         (WI.StackedColumnChart.prototype.layout):
3362         (WI.StackedColumnChart):
3363
3364 2019-03-06  Devin Rousso  <drousso@apple.com>
3365
3366         Web Inspector: CSS Changes: only show changes for the given node
3367         https://bugs.webkit.org/show_bug.cgi?id=194608
3368         <rdar://problem/48050206>
3369
3370         Reviewed by Timothy Hatcher.
3371
3372         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
3373         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
3374         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
3375         (WI.ChangesDetailsSidebarPanel.prototype.layout):
3376         Make this panel a subclass of `WI.DOMDetailsSidebarPanel` so it has access to the selected
3377         DOM node in the Elements tab.
3378
3379         * UserInterface/Base/Setting.js:
3380         * UserInterface/Views/SettingsTabContentView.js:
3381         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
3382         Create new general setting for controlling this change.
3383
3384         * Localizations/en.lproj/localizedStrings.js:
3385
3386 2019-03-06  Devin Rousso  <drousso@apple.com>
3387
3388         Web Inspector: Canvas: color swatches aren't shown for valid inputs with leading/trailing whitespace
3389         https://bugs.webkit.org/show_bug.cgi?id=195298
3390
3391         Reviewed by Timothy Hatcher.
3392
3393         * UserInterface/Views/RecordingActionTreeElement.js:
3394         (WI.RecordingActionTreeElement._generateDOM):
3395         (WI.RecordingActionTreeElement._createSwatchForColorParameters):
3396         Trim the color string since it can be an arbitrary string, seeing as it is captured before
3397         the <canvas> has a chance to parse/fix it.
3398
3399 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
3400
3401         Web Inspector: recordsInTimeRange sometimes does not get the expected record when includeRecordBeforeStart
3402         https://bugs.webkit.org/show_bug.cgi?id=195317
3403
3404         Reviewed by Devin Rousso.
3405
3406         * UserInterface/Models/Timeline.js:
3407         (WI.Timeline.prototype.recordsOverlappingTimeRange):
3408
3409 2019-03-05  Devin Rousso  <drousso@apple.com>
3410
3411         Web Inspector: Canvas: remove event listeners once a recording is ready
3412         https://bugs.webkit.org/show_bug.cgi?id=195324
3413
3414         Reviewed by Matt Baker.
3415
3416         * UserInterface/Models/Recording.js:
3417         (WI.Recording):
3418         (WI.Recording.prototype.async swizzle):
3419         (WI.Recording.prototype.async _process):
3420
3421         * UserInterface/Views/RecordingActionTreeElement.js:
3422         (WI.RecordingActionTreeElement):
3423         (WI.RecordingActionTreeElement.prototype._handleValidityChanged):
3424
3425         * UserInterface/Views/CanvasSidebarPanel.js:
3426         (WI.CanvasSidebarPanel.prototype.set recording):
3427         (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
3428
3429         * UserInterface/Views/RecordingContentView.js:
3430         (WI.RecordingContentView.prototype.initialLayout):
3431         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
3432
3433 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
3434
3435         Web Inspector: Attempting to select records in the bottom 16px of the timeline overview graph fails
3436         https://bugs.webkit.org/show_bug.cgi?id=195318
3437
3438         Reviewed by Devin Rousso.
3439
3440         The bottom few pixels of the overview are reserved for the scroll-container
3441         which may show a scrollbar if the overview needs to scroll. When the scrollbars
3442         are not visible we can allow pointer events to click through the invisible
3443         scroll-container and allow record selection.
3444
3445         * UserInterface/Views/TimelineOverview.css:
3446         (.timeline-overview:not(.has-scrollbar) > .scroll-container):
3447         * UserInterface/Views/TimelineOverview.js:
3448         (WI.TimelineOverview.prototype._handleScrollEvent):
3449         (WI.TimelineOverview.prototype._handleWheelEvent):
3450         (WI.TimelineOverview._handleGestureStart):
3451
3452 2019-03-05  Devin Rousso  <drousso@apple.com>
3453
3454         Web Inspector: iPod user agent UIString should have a lowercase "T"
3455         https://bugs.webkit.org/show_bug.cgi?id=195312
3456         <rdar://problem/48586853>
3457
3458         Reviewed by Matt Baker.
3459
3460         * UserInterface/Base/Main.js:
3461         (WI._handleDeviceSettingsToolbarButtonClicked):
3462
3463 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
3464
3465         Web Inspector: CPU Usage Timeline - Adjust sizes in timeline overview
3466         https://bugs.webkit.org/show_bug.cgi?id=195313
3467
3468         Reviewed by Devin Rousso.
3469
3470         Reduce the height slightly to save some precious vertical space.
3471         Also increase the size of the minimum bar height so that it doesn't
3472         look like there are no events when there is low CPU.
3473
3474         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3475         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
3476         * UserInterface/Views/CPUTimelineOverviewGraph.js:
3477         (WI.CPUTimelineOverviewGraph.prototype.get height):
3478         Reduce the CPU overview graph height to 60px.
3479
3480         (WI.CPUTimelineOverviewGraph.prototype.layout):
3481         Increase the minimum size of a column bar to 4px.
3482
3483 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
3484
3485         Web Inspector: Reload actions from second level inspector should properly reload the inspected inspector
3486         https://bugs.webkit.org/show_bug.cgi?id=195306
3487
3488         Reviewed by Matt Baker.
3489
3490         * UserInterface/Base/Main.js:
3491         Provide a better reload for a Nth level inspector.
3492
3493         * UserInterface/Debug/Bootstrap.js:
3494         (WI.runBootstrapOperations):
3495         Simplify, should not need to check for InspectorFrontendHost.
3496
3497 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
3498
3499         Web Inspector: MediaSource logging not initialized properly
3500         https://bugs.webkit.org/show_bug.cgi?id=195307
3501
3502         Reviewed by Matt Baker.
3503
3504         * UserInterface/Controllers/ConsoleManager.js:
3505         (WI.ConsoleManager.prototype.initializeLogChannels):
3506         Typo caused undefined to be included and trigger assertions.
3507
3508 2019-03-04  Devin Rousso  <drousso@apple.com>
3509
3510         Web Inspector: CSS: class input isn't fully centered
3511         https://bugs.webkit.org/show_bug.cgi?id=195297
3512
3513         Reviewed by Matt Baker.
3514
3515         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
3516         (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input):
3517         (body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): Deleted.
3518         (body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): Deleted.
3519
3520 2019-03-04  Devin Rousso  <drousso@apple.com>
3521
3522         Web Inspector: Audit: show the version number in the UI
3523         https://bugs.webkit.org/show_bug.cgi?id=195292
3524
3525         Reviewed by Matt Baker.
3526
3527         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3528         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
3529         (WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
3530         Fix the logic for showing a placeholder when editing or with only disabled tests.
3531
3532         * UserInterface/Views/AuditNavigationSidebarPanel.css:
3533         (.sidebar > .panel.navigation.audit > .content > .message-text-view): Added.
3534         (.audit-version): Added.
3535         Don't obstruct the "Edit" button when showing a placeholder.
3536
3537         * Localizations/en.lproj/localizedStrings.js:
3538
3539 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
3540
3541         ITMLKit Inspector: Data Bindings / Associated Data for nodes
3542         https://bugs.webkit.org/show_bug.cgi?id=195290
3543         <rdar://problem/48304019>
3544
3545         Reviewed by Devin Rousso.
3546
3547         * Localizations/en.lproj/localizedStrings.js:
3548         New title and empty message strings.
3549
3550         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
3551         (.sidebar > .panel.dom-node-details .details-section.dom-node-associated-data > .content .row):
3552         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
3553         (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
3554         (WI.DOMNodeDetailsSidebarPanel.prototype.layout):
3555         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshDataBindings):
3556         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData):
3557         (WI.DOMNodeDetailsSidebarPanel.prototype._attributesChanged):
3558         New Node sections only enabled for ITMLKit `WI.sharedApp.hasExtraDomains`.
3559
3560         * UserInterface/Views/ObjectTreeView.js:
3561         (WI.ObjectTreeView):
3562         Provide a way, like TreeElement/View to access the ObjectTreeView from an element.
3563
3564 2019-03-04  Devin Rousso  <drousso@apple.com>
3565
3566         Web Inspector: Canvas: protocol error on first open
3567         https://bugs.webkit.org/show_bug.cgi?id=195059
3568         <rdar://problem/48407871>
3569
3570         Reviewed by Joseph Pecoraro.
3571
3572         * UserInterface/Controllers/CanvasManager.js:
3573         (WI.CanvasManager.prototype.initializeTarget):
3574         (WI.CanvasManager.prototype.static supportsRecordingAutoCapture):
3575         (WI.CanvasManager.prototype.setRecordingAutoCaptureFrameCount):
3576         If targets aren't available, wait until they are and then set the auto-capture frame count.
3577
3578 2019-03-04  Devin Rousso  <drousso@apple.com>
3579
3580         Web Inspector: Toggling Timeline "Stop when page loads" to on should stop (immediately or soon) any active recording if already past the load event
3581         https://bugs.webkit.org/show_bug.cgi?id=195239
3582
3583         Reviewed by Joseph Pecoraro.
3584
3585         * UserInterface/Controllers/TimelineManager.js:
3586         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
3587
3588 2019-03-02  Devin Rousso  <drousso@apple.com>
3589
3590         Web Inspector: Unexpectedly frequent flashing of DOM node attributes
3591         https://bugs.webkit.org/show_bug.cgi?id=148049
3592         <rdar://problem/22296830>
3593
3594         Reviewed by Joseph Pecoraro.
3595
3596         Save a timestamp of when the CSS animation began, so that if the attribute's node is replaced,
3597         we can "resume" the CSS animation at the same point with the attribute's new node.
3598
3599         * UserInterface/Views/DOMTreeElement.js:
3600         (WI.DOMTreeElement):
3601         (WI.DOMTreeElement.prototype.attributeDidChange):
3602         (WI.DOMTreeElement.prototype._buildAttributeDOM):
3603         (WI.DOMTreeElement.prototype._createModifiedAnimation):
3604         (WI.DOMTreeElement.prototype._markNodeChanged): Deleted.
3605         (WI.DOMTreeElement.prototype._nodeChangedAnimationEnd): Deleted.
3606         (WI.DOMTreeElement.prototype._fireDidChange): Deleted.
3607
3608 2019-03-02  Devin Rousso  <drousso@apple.com>
3609
3610         Web Inspector: Debugger: DOM, URL, and Event breakpoints don't grey out when all breakpoints are disabled
3611         https://bugs.webkit.org/show_bug.cgi?id=195170
3612         <rdar://problem/48478193>
3613
3614         Reviewed by Joseph Pecoraro.
3615
3616         * UserInterface/Views/DOMBreakpointTreeElement.js:
3617         (WI.DOMBreakpointTreeElement):
3618         (WI.DOMBreakpointTreeElement.prototype.onattach):
3619         (WI.DOMBreakpointTreeElement.prototype.ondetach):
3620         (WI.DOMBreakpointTreeElement.prototype._updateStatus):
3621         * UserInterface/Views/EventBreakpointTreeElement.js:
3622         (WI.EventBreakpointTreeElement):
3623         (WI.EventBreakpointTreeElement.prototype.onattach):
3624         (WI.EventBreakpointTreeElement.prototype.ondetach):
3625         (WI.EventBreakpointTreeElement.prototype._updateStatus):
3626         * UserInterface/Views/URLBreakpointTreeElement.js:
3627         (WI.URLBreakpointTreeElement):
3628         (WI.URLBreakpointTreeElement.prototype.onattach):
3629         (WI.URLBreakpointTreeElement.prototype.ondetach):
3630         (WI.URLBreakpointTreeElement.prototype._updateStatus):
3631         Remove the `"resolved"` class when the global "breakpoints enabled" state is changed.
3632
3633         * UserInterface/Controllers/DOMDebuggerManager.js:
3634         (WI.DOMDebuggerManager):
3635         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged): Added.
3636         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged): Added.
3637         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged): Added.
3638         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
3639         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
3640         (WI.DOMDebuggerManager.prototype._resolveEventBreakpoint):
3641         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint):
3642         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint.breakpointUpdated): Deleted.
3643         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint.breakpointUpdated): Deleted.
3644         * UserInterface/Models/DOMBreakpoint.js:
3645         (WI.DOMBreakpoint):
3646         (WI.DOMBreakpoint.deserialize): Added.
3647         (WI.DOMBreakpoint.prototype.set disabled):
3648         (WI.DOMBreakpoint.prototype.set domNodeIdentifier):
3649         * UserInterface/Models/EventBreakpoint.js:
3650         (WI.EventBreakpoint.deserialize): Added.
3651         (WI.EventBreakpoint.prototype.set disabled):
3652         (WI.EventBreakpoint.fromPayload): Deleted.
3653         * UserInterface/Models/URLBreakpoint.js:
3654         (WI.URLBreakpoint.deserialize): Added.
3655         (WI.URLBreakpoint.prototype.set disabled):
3656         * UserInterface/Views/DOMTreeContentView.js:
3657         (WI.DOMTreeContentView):
3658         (WI.DOMTreeContentView.prototype._handleDOMBreakpointDisabledStateChanged): Added.
3659         (WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeChanged): Added.
3660         * UserInterface/Views/DebuggerSidebarPanel.js:
3661         (WI.DebuggerSidebarPanel.prototype._handleDOMBreakpointResolvedStateChanged): Added.
3662         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
3663         (WI.SourcesNavigationSidebarPanel):
3664         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateChanged): Added.
3665         Drive-by: rename all events with the name `*DidChange` to `*Changed`.
3666         Drive-by: create static `deserialize` helper functions.
3667
3668 2019-03-02  Devin Rousso  <drousso@apple.com>
3669
3670         Web Inspector: Sources: breakpoints should be disabled when an audit is running
3671         https://bugs.webkit.org/show_bug.cgi?id=195105
3672         <rdar://problem/48441373>
3673
3674         Reviewed by Joseph Pecoraro.
3675
3676         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
3677         (WI.SourcesNavigationSidebarPanel):
3678         (WI.SourcesNavigationSidebarPanel.prototype.closed):
3679         (WI.SourcesNavigationSidebarPanel.prototype._updateTemporarilyDisabledBreakpointsButtons): Added.
3680         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
3681         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
3682         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
3683         (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
3684         (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
3685         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
3686         (.sidebar > .panel.navigation.sources > .content > .warning-banner + .warning-banner): Added.
3687
3688         * UserInterface/Views/DebuggerSidebarPanel.js:
3689         (WI.DebuggerSidebarPanel):
3690
3691 2019-03-02  Devin Rousso  <drousso@apple.com>
3692
3693         Web Inspector: Debugger: don't enable breakpoints when source location changes
3694         https://bugs.webkit.org/show_bug.cgi?id=195081
3695         <rdar://problem/48422701>
3696
3697         Reviewed by Joseph Pecoraro.
3698
3699         * UserInterface/Controllers/DebuggerManager.js:
3700         (WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
3701         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
3702
3703 2019-03-01  Joseph Pecoraro  <pecoraro@apple.com>
3704
3705         Web Inspector: CPU Usage - Energy Impact Section
3706         https://bugs.webkit.org/show_bug.cgi?id=195151
3707
3708         Reviewed by Devin Rousso.
3709
3710         * Localizations/en.lproj/localizedStrings.js:
3711         * UserInterface/Main.html:
3712         New strings and resources.
3713
3714         * UserInterface/Views/CPUTimelineView.css:
3715         (.timeline-view.cpu > .content .subtitle > .info):
3716         (@media (prefers-color-scheme: dark)):
3717         (.energy-info-popover-content):
3718         (.timeline-view.cpu > .content > .overview > .divider):
3719         (body[dir=ltr] .timeline-view.cpu > .content > .overview > .divider):
3720         (body[dir=rtl] .timeline-view.cpu > .content > .overview > .divider):
3721         (.timeline-view.cpu :matches(.area-chart, .stacked-area-chart) svg > path):
3722         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.low):
3723         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.medium):
3724         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.high):
3725         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > polygon.needle):
3726         (.timeline-view.cpu .energy):
3727         (.timeline-view.cpu .energy .energy-impact):
3728         (.timeline-view.cpu .energy .energy-impact.low):
3729         (.timeline-view.cpu .energy .energy-impact.medium):
3730         (.timeline-view.cpu .energy .energy-impact.high):
3731         (.timeline-view.cpu .energy .energy-impact-number):
3732         Styling the chart and text for the different energy impact levels.
3733
3734         * UserInterface/Views/CPUTimelineView.js:
3735         (WI.CPUTimelineView.prototype.get lowEnergyValue):
3736         (WI.CPUTimelineView.prototype.get highEnergyValue):
3737         (WI.CPUTimelineView.prototype.initialLayout):
3738         (WI.CPUTimelineView.prototype.layout):
3739         (WI.CPUTimelineView.prototype._layoutEnergyChart.mapWithBias):
3740         (WI.CPUTimelineView.prototype._layoutEnergyChart.valuesForGauge):
3741         (WI.CPUTimelineView.prototype._layoutEnergyChart):
3742         (WI.CPUTimelineView.prototype._clearEnergyImpactText):
3743         New gauge chart and associated popover.
3744         We do a bit of biasing of the data for each of the sections
3745         in the gauge chart. Each section biases toward the cap of the
3746         section so that:
3747           - we encourage lower power usage (sub 3%)
3748           - the gauge needle quickly moves past the low value of a range
3749
3750         * UserInterface/Views/GaugeChart.css: Added.
3751         (.gauge-chart):
3752         (body[dir=rtl] .gauge-chart):
3753         (.gauge-chart > svg > path,):
3754         (.gauge-chart > svg > polygon.needle):
3755         (.gauge-chart.empty > svg > polygon.needle):
3756         (@media (prefers-color-scheme: dark)):
3757         * UserInterface/Views/GaugeChart.js: Added.
3758         (WI.GaugeChart.prototype.get size):
3759         (WI.GaugeChart.prototype.get segments):
3760         (WI.GaugeChart.prototype.get value):
3761         (WI.GaugeChart.prototype.set value):
3762         (WI.GaugeChart.prototype.clear):
3763         (WI.GaugeChart.prototype.initialLayout):
3764         (WI.GaugeChart.prototype.layout):
3765         (WI.GaugeChart.prototype._validateSegments):
3766         (WI.GaugeChart.prototype._createSegmentPathData):
3767         GaugeChart with variable number of sections and a
3768         current value needle. It has a bit of customization
3769         when drawing the arc at the start of each segment.
3770
3771         * UserInterface/Views/Variables.css:
3772         (:root):
3773         (@media (prefers-color-scheme: dark)):
3774         New CPU colors for the different energy impact levels.
3775
3776 2019-03-01  Nikita Vasilyev  <nvasilyev@apple.com>
3777
3778         Web Inspector: Data grid border colors don't match accent colors
3779         https://bugs.webkit.org/show_bug.cgi?id=195232
3780
3781         Reviewed by Matt Baker.
3782
3783         * UserInterface/Views/DataGrid.css:
3784         (.data-grid:focus tr.selected td:not(:last-child)):
3785         (body[dir=ltr] .data-grid:focus tr.selected td:not(:last-child)):
3786         (body[dir=rtl] .data-grid:focus tr.selected td:not(:last-child)):
3787
3788 2019-02-28  Devin Rousso  <drousso@apple.com>
3789
3790         Web Inspector: Timelines: don't show the auto-stop UI when not inspecting a page
3791         https://bugs.webkit.org/show_bug.cgi?id=195192
3792
3793         Reviewed by Joseph Pecoraro.
3794
3795         * UserInterface/Views/TimelineRecordingContentView.js:
3796         (WI.TimelineRecordingContentView):
3797         (WI.TimelineRecordingContentView.prototype.get navigationItems):
3798
3799 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
3800
3801         Web Inspector: CPU Usage: Worker thread that dies might stay at a high value forever
3802         https://bugs.webkit.org/show_bug.cgi?id=195148
3803
3804         Reviewed by Matt Baker.
3805
3806         * UserInterface/Views/CPUTimelineView.js:
3807         (CPUTimelineView.prototype.layout):
3808         Handle workers dieing or at least zeroing out between records.
3809
3810 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
3811
3812         Web Inspector: CPU Usage Timeline - Make Threads section expandable / collapsable
3813         https://bugs.webkit.org/show_bug.cgi?id=195085
3814
3815         Reviewed by Matt Baker.
3816
3817         * UserInterface/Base/Setting.js:
3818         New setting to save the Threads expanded/collapsed state.
3819
3820         * UserInterface/Views/CPUTimelineView.css: