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