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