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