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