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