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