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