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