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