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