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