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