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