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