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