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