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