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