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