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