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