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