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