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