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