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