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