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