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