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