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