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