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