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