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