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