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