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