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