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