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