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