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