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