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