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