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