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