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