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