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