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