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