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