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