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