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