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