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