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