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