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