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