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