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