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