Web Inspector: CPU Usage Timeline - Add legend and graph hover effects
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-03-11  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Web Inspector: CPU Usage Timeline - Add legend and graph hover effects
4         https://bugs.webkit.org/show_bug.cgi?id=195390
5
6         Reviewed by Devin Rousso.
7
8         * Localizations/en.lproj/localizedStrings.js:
9         New strings for the legends.
10
11         * UserInterface/Main.html:
12         Combined files.
13
14         * UserInterface/Views/Variables.css:
15         (:root):
16         (@media (prefers-color-scheme: dark)):
17         Tweaked colors, including individual stroke and fill colors for each CPU section.
18
19         * UserInterface/Views/CPUTimelineOverviewGraph.css:
20         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.total-usage):
21         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
22         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
23         Updated colors.
24
25         * UserInterface/Views/CPUUsageCombinedView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CPUUsageStackedView.css.
26         (.cpu-usage-combined-view > .details > .legend-container):
27         (.cpu-usage-combined-view > .details > .legend-container > .row):
28         (.cpu-usage-combined-view > .details > .legend-container > .row + .row):
29         (.cpu-usage-combined-view > .details > .legend-container > .row > .swatch):
30         * UserInterface/Views/CPUUsageCombinedView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CPUUsageStackedView.js.
31         (WI.CPUUsageCombinedView.appendLegendRow):
32         (WI.CPUUsageCombinedView):
33         (WI.CPUUsageCombinedView.prototype.get graphElement):
34         (WI.CPUUsageCombinedView.prototype.get chart):
35         (WI.CPUUsageCombinedView.prototype.get rangeChart):
36         (WI.CPUUsageCombinedView.prototype.clear):
37         (WI.CPUUsageCombinedView.prototype.updateChart):
38         (WI.CPUUsageCombinedView.prototype.updateMainThreadIndicator):
39         (WI.CPUUsageCombinedView.prototype.clearLegend):
40         (WI.CPUUsageCombinedView.prototype.updateLegend):
41         (WI.CPUUsageCombinedView.prototype._updateDetails):
42         * UserInterface/Views/CPUUsageIndicatorView.css: Removed.
43         * UserInterface/Views/CPUUsageIndicatorView.js: Removed.
44         Combined the Indicator and StackedAreaChart into a single view
45         that share a left details section.
46
47         * UserInterface/Views/CPUUsageView.js:
48         (WI.CPUUsageView):
49         (WI.CPUUsageView.prototype.get graphElement):
50         (WI.CPUUsageView.prototype.clear):
51         (WI.CPUUsageView.prototype.updateChart):
52         (WI.CPUUsageView.prototype.clearLegend):
53         (WI.CPUUsageView.prototype.updateLegend):
54         (WI.CPUUsageView.prototype._updateDetails):
55         Include a legend in the left details section.
56
57         * UserInterface/Views/AreaChart.js:
58         (WI.AreaChart):
59         (WI.AreaChart.prototype.addPointMarker):
60         (WI.AreaChart.prototype.clearPointMarkers):
61         (WI.AreaChart.prototype.clear):
62         (WI.AreaChart.prototype.layout):
63         * UserInterface/Views/StackedAreaChart.js:
64         (WI.StackedAreaChart):
65         (WI.StackedAreaChart.prototype.addPointMarker):
66         (WI.StackedAreaChart.prototype.clearPointMarkers):
67         (WI.StackedAreaChart.prototype.clear):
68         (WI.StackedAreaChart.prototype.layout):
69         Add point markers for the area charts.
70
71         * UserInterface/Views/CPUTimelineView.css:
72         * UserInterface/Views/CPUTimelineView.js:
73         (WI.CPUTimelineView):
74         (WI.CPUTimelineView.prototype.get cpuUsageViewHeight):
75         (WI.CPUTimelineView.prototype.clear):
76         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
77         (WI.CPUTimelineView.prototype.initialLayout):
78         (WI.CPUTimelineView.prototype.layout):
79         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
80         (WI.CPUTimelineView.prototype._handleMouseClick):
81         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
82         (WI.CPUTimelineView.prototype._showGraphOverlayNearTo):
83         (WI.CPUTimelineView.prototype._updateGraphOverlay):
84         (WI.CPUTimelineView.prototype._showGraphOverlay.xScale):
85         (WI.CPUTimelineView.prototype._showGraphOverlay.yScale):
86         (WI.CPUTimelineView.prototype._showGraphOverlay.addOverlayPoint):
87         (WI.CPUTimelineView.prototype._showGraphOverlay):
88         (WI.CPUTimelineView.prototype._clearOverlayMarkers.clearGraphOverlayElement):
89         (WI.CPUTimelineView.prototype._clearOverlayMarkers):
90         (WI.CPUTimelineView.prototype._hideGraphOverlay):
91         Include graph overlay markers.
92
93 2019-03-11  Devin Rousso  <drousso@apple.com>
94
95         Web Inspector: eliminate manual syncing of numeric constants used by JavaScript and CSS
96         https://bugs.webkit.org/show_bug.cgi?id=194883
97         <rdar://problem/48257785>
98
99         Reviewed by Joseph Pecoraro.
100
101         * UserInterface/Views/CanvasOverviewContentView.js:
102         (WI.CanvasOverviewContentView):
103         (WI.CanvasOverviewContentView.static get recordingAutoCaptureInputMargin): Added.
104         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
105         * UserInterface/Views/CanvasOverviewContentView.css:
106         (.navigation-bar > .item.canvas-recording-auto-capture > label > input):
107
108         * UserInterface/Views/MemoryTimelineView.js:
109         (WI.MemoryTimelineView.static get memoryCategoryViewHeight): Added.
110         (WI.MemoryTimelineView.prototype.initialLayout): Added.
111         (WI.MemoryTimelineView.prototype.layout):
112         * UserInterface/Views/MemoryCategoryView.css:
113         (.memory-category-view):
114
115         * UserInterface/Views/NetworkTableContentView.js:
116         (WI.NetworkTableContentView.static get nodeWaterfallDOMEventSize): Added.
117         (WI.NetworkTableContentView.prototype.initialLayout):
118         * UserInterface/Views/NetworkTableContentView.css:
119         (.content-view.network .network-table): Deleted.
120
121         * UserInterface/Views/TreeOutline.js:
122         (WI.TreeOutline._generateStyleRulesIfNeeded):
123         * UserInterface/Views/TreeOutline.css:
124         (.tree-outline, .tree-outline .children):
125         (.tree-outline .item):
126
127         * UserInterface/Controllers/CanvasManager.js:
128         (WI.CanvasManager.supportsRecordingAutoCapture):
129         Drive-by: fix usage of InspectorBackend.domains.{CanvasAgent => Canvas}
130
131 2019-03-11  Nikita Vasilyev  <nvasilyev@apple.com>
132
133         REGRESSION(r242622): Web Inspector: Fix asserts "Overridden property is missing overridingProperty"
134         https://bugs.webkit.org/show_bug.cgi?id=195515
135         <rdar://problem/48737315>
136
137         Reviewed by Matt Baker.
138
139         * UserInterface/Views/SpreadsheetStyleProperty.js:
140         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
141
142 2019-03-07  Nikita Vasilyev  <nvasilyev@apple.com>
143
144         Web Inspector: Styles: overridden CSS property should have go-to button to jump to effective property
145         https://bugs.webkit.org/show_bug.cgi?id=185930
146         <rdar://problem/40506252>
147
148         Reviewed by Matt Baker.
149
150         Introduce a new experimental jump to effective property button. The button is a small arrow button
151         next to an overridden CSS property. Clicking the button scrolls to the effective CSS property and
152         selects it.
153
154         * Localizations/en.lproj/localizedStrings.js:
155         * UserInterface/Base/Setting.js:
156         * UserInterface/Models/CSSProperty.js:
157         (WI.CSSProperty):
158         (WI.CSSProperty.prototype.update):
159         (WI.CSSProperty.prototype.get overridingProperty):
160         (WI.CSSProperty.prototype.set overridingProperty):
161         * UserInterface/Models/DOMNodeStyles.js:
162         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
163         * UserInterface/Views/SettingsTabContentView.js:
164         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
165         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
166         (.spreadsheet-style-declaration-editor .property.overridden .select-effective-property):
167         (.spreadsheet-style-declaration-editor .property.overridden:hover .select-effective-property,):
168         (.spreadsheet-style-declaration-editor .property.overridden:hover .select-effective-property::after,):
169         (@media (prefers-color-scheme: dark)):
170         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
171         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelectByProperty):
172         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
173         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorSelectProperty):
174         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
175         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionSelectProperty):
176         * UserInterface/Views/SpreadsheetStyleProperty.js:
177         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
178
179 2019-03-07  Devin Rousso  <drousso@apple.com>
180
181         Web Inspector: Protocol: add type checking when commands are called via invoke
182         https://bugs.webkit.org/show_bug.cgi?id=195310
183         <rdar://problem/48588679>
184
185         Reviewed by Joseph Pecoraro.
186
187         * UserInterface/Protocol/InspectorBackend.js:
188         (InspectorBackend.Command.prototype.invoke.deliverFailure): Added.
189         (InspectorBackend.Command.prototype.invoke):
190         (InspectorBackend.Command.prototype._invokeWithArguments):
191
192 2019-03-07  Devin Rousso  <drousso@apple.com>
193
194         Web Inspector: REGRESSION(r242118): WI.ScopeBar missing background
195         https://bugs.webkit.org/show_bug.cgi?id=195299
196
197         Reviewed by Joseph Pecoraro.
198
199         Rework the way `color`, `background-color`, and `border-color` are set for `WI.ScopeBar` to
200         use CSS variables instead. Divides the variables into three categories:
201          - default: these are the values that the `WI.ScopeBar` would use normally
202          - override: these are values that take precidence over the default (e.g. set by other elements)
203             - falls back to default when no value is set
204          - actual: this is the resulting value that will be used when displaying
205             - this way, other elements can "mirror" the styling of the `WI.ScopeBar`
206
207         * UserInterface/Views/ScopeBar.css:
208         (.scope-bar):
209         (.scope-bar > li):
210         (.scope-bar > li::before):
211         (.scope-bar > li:matches(.selected, :hover)):
212         (.scope-bar > li:not(.selected):hover::after):
213         (.scope-bar > li.selected:active::after):
214         (.scope-bar > li.multiple > select):
215         (body[dir=ltr] .scope-bar > li.multiple > select):
216         (body[dir=rtl] .scope-bar > li.multiple > select):
217         (.scope-bar > li.multiple:not(.selected) > select): Added.
218         (.scope-bar > li.multiple > .arrows):
219         (.scope-bar > li::before): Deleted.
220         (.scope-bar.default-item-selected > li.multiple.selected::before): Deleted.
221         (.scope-bar > li:matches(.selected, :hover)::before): Deleted.
222         (.scope-bar > li.selected:active::before): Deleted.
223         (.scope-bar > li.multiple.selected > select): Deleted.
224         (body[dir=ltr] .scope-bar > li.multiple > .arrows): Deleted.
225         (body[dir=rtl] .scope-bar > li.multiple > .arrows): Deleted.
226         (.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows): Deleted.
227         (.scope-bar > li:matches(.selected, :active)): Deleted.
228         (@media (prefers-color-scheme: dark)): Deleted.
229         Switch to using `::after` since `::before` is more commonly used.
230
231         * UserInterface/Views/MultipleScopeBarItem.js:
232         (WI.MultipleScopeBarItem.prototype._handleMouseDown):
233         Drive-by: fix the <select> alignment by re-firing the "mousedown" event on it.
234
235         * UserInterface/Views/AuditTestGroupContentView.js:
236         (WI.AuditTestGroupContentView.prototype.layout):
237         * UserInterface/Views/AuditTestGroupContentView.css:
238         (.content-view.audit-test-group > header > nav > .scope-bar > li):
239         (.content-view.audit-test-group > header > nav > .scope-bar > li:not(:hover, .selected)):
240         (.content-view.audit-test-group > header > nav > .scope-bar > li > img): Added.
241         (.content-view.audit-test-group > header > nav > .scope-bar > li.pass > img): Added.
242         (.content-view.audit-test-group > header > nav > .scope-bar > li.warn > img): Added.
243         (.content-view.audit-test-group > header > nav > .scope-bar > li.fail > img): Added.
244         (.content-view.audit-test-group > header > nav > .scope-bar > li.error > img): Added.
245         (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported > img): Added.
246         (.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.
247         (.content-view.audit-test-group > section > .audit-test-case:not(.filtered) ~ .audit-test-case:not(.filtered)): Added.
248         (.content-view.audit-test-group > header > nav > .scope-bar > li::before): Deleted.
249         (.content-view.audit-test-group > header > nav > .scope-bar > li.pass::before): Deleted.
250         (.content-view.audit-test-group > header > nav > .scope-bar > li.warn::before): Deleted.
251         (.content-view.audit-test-group > header > nav > .scope-bar > li.fail::before): Deleted.
252         (.content-view.audit-test-group > header > nav > .scope-bar > li.error::before): Deleted.
253         (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported::before): Deleted.
254         (.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.
255         Replace the `::before` image with an actual `<img>` now that the `WI.ScopeBar` itself uses
256         a pseudo-element for the background styling.
257
258         * UserInterface/Views/LogContentView.js:
259         (WI.LogContentView):
260         * UserInterface/Views/LogContentView.css:
261         (.log-scope-bar > li:not(.unread) > .indicator): Added.
262         (.log-scope-bar > li.unread > .indicator): Added.
263         (.log-scope-bar > li.unread:hover > .indicator): Added.
264         (.log-scope-bar > li.unread.errors > .indicator): Added.
265         (.log-scope-bar > li.unread.warnings > .indicator): Added.
266         (.log-scope-bar > li.unread.logs > .indicator): Added.
267         (.log-scope-bar > li.unread::before): Deleted.
268         (body[dir=ltr] .log-scope-bar > li.unread::before): Deleted.
269         (body[dir=rtl] .log-scope-bar > li.unread::before): Deleted.
270         (.log-scope-bar > li.unread:hover::before): Deleted.
271         (.log-scope-bar > li.unread.errors::before): Deleted.
272         (.log-scope-bar > li.unread.warnings::before): Deleted.
273         (.log-scope-bar > li.unread.logs::before): Deleted.
274         Replace the `::before` unread indicator with an actual `<div>` now that the `WI.ScopeBar`
275         itself uses a pseudo-element for the background styling.
276
277         * UserInterface/Views/TimelineRecordingContentView.css:
278         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected):
279         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple): Deleted.
280         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows): Deleted.
281
282         * UserInterface/Views/CanvasSidebarPanel.js:
283         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
284         Drive-by: fix typo.
285
286 2019-03-07  Devin Rousso  <drousso@apple.com>
287
288         Web Inspector: CSS: there should be a way to inline-replace a variable with it's value
289         https://bugs.webkit.org/show_bug.cgi?id=195335
290
291         Reviewed by Joseph Pecoraro.
292
293         * UserInterface/Views/InlineSwatch.js:
294         (WI.InlineSwatch):
295         (WI.InlineSwatch.prototype.didDismissPopover):
296         (WI.InlineSwatch.prototype._swatchElementClicked):
297         (WI.InlineSwatch.prototype._swatchElementClicked.optionsForType): Added.
298         Shift-clicking a variable swatch replaces the text with the variable's value.
299         Drive-by: try to create a readonly swatch for the variable's value (e.g. a color indicator).
300
301         * UserInterface/Views/SpreadsheetStyleProperty.js:
302         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
303         If the value of a variable swatch changes, re-render the value.
304
305         * UserInterface/Views/CodeMirrorTextMarkers.js:
306         (createCodeMirrorTextMarkers):
307         (createCodeMirrorColorTextMarkers):
308         (createCodeMirrorGradientTextMarkers):
309         (createCodeMirrorBezierTextMarkers):
310         (createCodeMirrorSpringTextMarkers):
311         Refactor function parameters for more flexibility.
312
313         * Localizations/en.lproj/localizedStrings.js:
314
315 2019-03-06  Devin Rousso  <drousso@apple.com>
316
317         Web Inspector: Elements: highlight the node when hovering event listeners sorted by node
318         https://bugs.webkit.org/show_bug.cgi?id=195368
319
320         Reviewed by Joseph Pecoraro.
321
322         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
323         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
324
325 2019-03-06  Matt Baker  <mattbaker@apple.com>
326
327         Web Inspector: system accent color follow-ups
328         https://bugs.webkit.org/show_bug.cgi?id=195190
329
330         Reviewed by Devin Rousso.
331
332         * UserInterface/Views/ButtonToolbarItem.css:
333         (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
334         (@media (prefers-color-scheme: dark)):
335         (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)): Deleted.
336         Drop pressed toolbar button style. It's extremely subtle and not worth the hassle.
337
338         * UserInterface/Views/LogContentView.css:
339         (.console-messages:focus .console-item.selected::after):
340         (@media (prefers-color-scheme: dark)):
341
342         * UserInterface/Views/ScopeBar.css:
343         (.scope-bar > li.selected:active::before):
344
345         * UserInterface/Views/TimelineRecordBar.css:
346         (.timeline-record-bar.selected > .segment):
347
348 2019-03-06  Matt Baker  <mattbaker@apple.com>
349
350         REGRESSION: Elements tab: Uncaught Exception: No node with given id found
351         https://bugs.webkit.org/show_bug.cgi?id=194299
352         <rdar://problem/47828647>
353
354         Reviewed by Devin Rousso.
355
356         When removing the selection, TreeOutline subclasses should have more
357         control over which item becomes selected after the selection is removed.
358         DOMTreeOutline should track the items that are being removed, and prevent
359         them or their descendants from becoming selected.
360
361         * UserInterface/Views/DOMTreeOutline.js:
362         (WI.DOMTreeOutline):
363         (WI.DOMTreeOutline.prototype.ondelete):
364         (WI.DOMTreeOutline.prototype.canSelectTreeElement):
365
366         * UserInterface/Views/TreeOutline.js:
367         (WI.TreeOutline.prototype.selectionControllerLastSelectableItem):
368         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
369         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
370         (WI.TreeOutline.prototype.canSelectTreeElement):
371
372 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
373
374         Web Inspector: CPU Usage Timeline - Allow clicking a bar in the overview to select a tight time range around it
375         https://bugs.webkit.org/show_bug.cgi?id=195321
376
377         Reviewed by Devin Rousso.
378
379         * UserInterface/Models/Timeline.js:
380         (WI.Timeline.prototype.closestRecordTo):
381         Helper to get the closest record to a timestamp.
382
383         * UserInterface/Views/CPUTimelineOverviewGraph.css:
384         (.timeline-overview-graph.cpu > .stacked-column-chart):
385         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.selected):
386         Style a selected record with the active color.
387
388         * UserInterface/Views/CPUTimelineOverviewGraph.js:
389         (WI.CPUTimelineOverviewGraph):
390         (WI.CPUTimelineOverviewGraph.prototype.get samplingRatePerSecond):
391         (WI.CPUTimelineOverviewGraph.prototype.reset):
392         (WI.CPUTimelineOverviewGraph.prototype.layout):
393         (WI.CPUTimelineOverviewGraph.prototype.updateSelectedRecord):
394         (WI.CPUTimelineOverviewGraph.prototype._graphPositionForMouseEvent):
395         (WI.CPUTimelineOverviewGraph.prototype._handleGraphMouseClick):
396         A click in the overview which hits a rect triggers a selection of
397         the associated timeline record.
398
399         * UserInterface/Views/StackedColumnChart.js:
400         (WI.StackedColumnChart.prototype.addColumnSet):
401         (WI.StackedColumnChart.prototype.layout):
402         Allow setting an additional class name with a column set.
403         It will set the class name on each rect in that column.
404
405         * UserInterface/Views/TimelineOverview.js:
406         (WI.TimelineOverview.prototype._recordSelected):
407         When selecting a CPU record, make a selection range of 2 neighboring
408         columns in each direction.
409
410         * UserInterface/Views/TimelineRuler.js:
411         (WI.TimelineRuler.prototype._handleClick):
412         When a sub-element has handled the click stop further event propagation.
413
414         * UserInterface/Views/TimelineOverviewGraph.js:
415         (WI.TimelineOverviewGraph.prototype.get selected):
416         Drive-by style fix.
417
418 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
419
420         Web Inspector: TimelineOverview clicks do not always behave as expected
421         https://bugs.webkit.org/show_bug.cgi?id=195319
422
423         Reviewed by Devin Rousso.
424
425         * UserInterface/Views/TimelineRuler.js:
426         (WI.TimelineRuler.prototype._shouldIgnoreMicroMovement):
427         (WI.TimelineRuler.prototype._handleMouseDown):
428         (WI.TimelineRuler.prototype._handleMouseMove):
429         Ignore moves that haven't gone more than 4px. Once the threshold is
430         passed allow all moves. This improves the click behavior since
431         previously click would never re-dispatch if there was any movement.
432
433 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
434
435         Web Inspector: CPU Usage Timeline - Statistics and Sources sections
436         https://bugs.webkit.org/show_bug.cgi?id=195202
437
438         Reviewed by Devin Rousso.
439
440         * Localizations/en.lproj/localizedStrings.js:
441         New strings.
442
443         * UserInterface/Base/Utilities.js:
444         (Map.prototype.getOrInitialize):
445         Helper to get and if not found initialize with a value.
446
447         * UserInterface/Views/CPUTimelineView.css:
448         (.timeline-view.cpu > .content > .overview > .chart > .container.stats):
449         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table):
450         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > th):
451         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.number):
452         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.label):
453         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .show-more):
454         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter):
455         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter:hover):
456         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active):
457         (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active + .active):
458         (@media (prefers-color-scheme: dark)):
459         Colors for the statistics sections.
460
461         * UserInterface/Views/CPUTimelineView.js:
462         (WI.CPUTimelineView):
463         (WI.CPUTimelineView.prototype.reset):
464         (WI.CPUTimelineView.prototype.clear):
465         (WI.CPUTimelineView.prototype._clearStatistics):
466         (WI.CPUTimelineView.prototype._clearSources):
467         Updates for additional sections.
468         Include a cache of the statisiticsData so we can relayout parts of the UI and
469         avoid an entire UI update.
470
471         (WI.CPUTimelineView.prototype.initialLayout):
472         (WI.CPUTimelineView.prototype._layoutBreakdownChart):
473         (WI.CPUTimelineView.prototype._layoutStatisticsAndSources):
474         (WI.CPUTimelineView.prototype._layoutStatisticsSection.createEllipsisElement):
475         (WI.CPUTimelineView.prototype._layoutStatisticsSection):
476         (WI.CPUTimelineView.prototype._layoutSourcesSection.firstNonNativeCallFrame):
477         (WI.CPUTimelineView.prototype._layoutSourcesSection.keyForSourceCodeLocation):
478         (WI.CPUTimelineView.prototype._layoutSourcesSection.labelForLocation):
479         (WI.CPUTimelineView.prototype._layoutSourcesSection.createEllipsisElement):
480         (WI.CPUTimelineView.prototype._layoutSourcesSection):
481         Extract layouts into helper methods to avoid an enormous layout method.
482
483         (WI.CPUTimelineView.prototype._computeSamplingData.incrementTypeCount):
484         (WI.CPUTimelineView.prototype._computeSamplingData):
485         Compute additional data when going through script events.
486
487         (WI.CPUTimelineView.prototype._resetSourcesFilters):
488         (WI.CPUTimelineView.prototype._addSourcesFilter):
489         (WI.CPUTimelineView.prototype._removeSourcesFilter):
490         (WI.CPUTimelineView.prototype._updateSourcesFilters):
491         Helpers for updating the source filters.
492
493         (WI.CPUTimelineView.prototype._createTableRow):
494         (WI.CPUTimelineView.prototype._insertTableRow):
495         Helpers for creating rows in the statistics / sources tables.
496
497 2019-03-06  Joseph Pecoraro  <pecoraro@apple.com>
498
499         Web Inspector: Simplify chart <rect>s with x/y attributes instead of transform(x, y)
500         https://bugs.webkit.org/show_bug.cgi?id=195352
501
502         Reviewed by Matt Baker.
503
504         * UserInterface/Views/ColumnChart.js:
505         (WI.ColumnChart.prototype.layout):
506         (WI.ColumnChart):
507         * UserInterface/Views/RangeChart.js:
508         (WI.RangeChart.prototype.layout):
509         (WI.RangeChart):
510         * UserInterface/Views/StackedColumnChart.js:
511         (WI.StackedColumnChart.prototype.layout):
512         (WI.StackedColumnChart):
513
514 2019-03-06  Devin Rousso  <drousso@apple.com>
515
516         Web Inspector: CSS Changes: only show changes for the given node
517         https://bugs.webkit.org/show_bug.cgi?id=194608
518         <rdar://problem/48050206>
519
520         Reviewed by Timothy Hatcher.
521
522         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
523         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
524         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
525         (WI.ChangesDetailsSidebarPanel.prototype.layout):
526         Make this panel a subclass of `WI.DOMDetailsSidebarPanel` so it has access to the selected
527         DOM node in the Elements tab.
528
529         * UserInterface/Base/Setting.js:
530         * UserInterface/Views/SettingsTabContentView.js:
531         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
532         Create new general setting for controlling this change.
533
534         * Localizations/en.lproj/localizedStrings.js:
535
536 2019-03-06  Devin Rousso  <drousso@apple.com>
537
538         Web Inspector: Canvas: color swatches aren't shown for valid inputs with leading/trailing whitespace
539         https://bugs.webkit.org/show_bug.cgi?id=195298
540
541         Reviewed by Timothy Hatcher.
542
543         * UserInterface/Views/RecordingActionTreeElement.js:
544         (WI.RecordingActionTreeElement._generateDOM):
545         (WI.RecordingActionTreeElement._createSwatchForColorParameters):
546         Trim the color string since it can be an arbitrary string, seeing as it is captured before
547         the <canvas> has a chance to parse/fix it.
548
549 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
550
551         Web Inspector: recordsInTimeRange sometimes does not get the expected record when includeRecordBeforeStart
552         https://bugs.webkit.org/show_bug.cgi?id=195317
553
554         Reviewed by Devin Rousso.
555
556         * UserInterface/Models/Timeline.js:
557         (WI.Timeline.prototype.recordsOverlappingTimeRange):
558
559 2019-03-05  Devin Rousso  <drousso@apple.com>
560
561         Web Inspector: Canvas: remove event listeners once a recording is ready
562         https://bugs.webkit.org/show_bug.cgi?id=195324
563
564         Reviewed by Matt Baker.
565
566         * UserInterface/Models/Recording.js:
567         (WI.Recording):
568         (WI.Recording.prototype.async swizzle):
569         (WI.Recording.prototype.async _process):
570
571         * UserInterface/Views/RecordingActionTreeElement.js:
572         (WI.RecordingActionTreeElement):
573         (WI.RecordingActionTreeElement.prototype._handleValidityChanged):
574
575         * UserInterface/Views/CanvasSidebarPanel.js:
576         (WI.CanvasSidebarPanel.prototype.set recording):
577         (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
578
579         * UserInterface/Views/RecordingContentView.js:
580         (WI.RecordingContentView.prototype.initialLayout):
581         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
582
583 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
584
585         Web Inspector: Attempting to select records in the bottom 16px of the timeline overview graph fails
586         https://bugs.webkit.org/show_bug.cgi?id=195318
587
588         Reviewed by Devin Rousso.
589
590         The bottom few pixels of the overview are reserved for the scroll-container
591         which may show a scrollbar if the overview needs to scroll. When the scrollbars
592         are not visible we can allow pointer events to click through the invisible
593         scroll-container and allow record selection.
594
595         * UserInterface/Views/TimelineOverview.css:
596         (.timeline-overview:not(.has-scrollbar) > .scroll-container):
597         * UserInterface/Views/TimelineOverview.js:
598         (WI.TimelineOverview.prototype._handleScrollEvent):
599         (WI.TimelineOverview.prototype._handleWheelEvent):
600         (WI.TimelineOverview._handleGestureStart):
601
602 2019-03-05  Devin Rousso  <drousso@apple.com>
603
604         Web Inspector: iPod user agent UIString should have a lowercase "T"
605         https://bugs.webkit.org/show_bug.cgi?id=195312
606         <rdar://problem/48586853>
607
608         Reviewed by Matt Baker.
609
610         * UserInterface/Base/Main.js:
611         (WI._handleDeviceSettingsToolbarButtonClicked):
612
613 2019-03-05  Joseph Pecoraro  <pecoraro@apple.com>
614
615         Web Inspector: CPU Usage Timeline - Adjust sizes in timeline overview
616         https://bugs.webkit.org/show_bug.cgi?id=195313
617
618         Reviewed by Devin Rousso.
619
620         Reduce the height slightly to save some precious vertical space.
621         Also increase the size of the minimum bar height so that it doesn't
622         look like there are no events when there is low CPU.
623
624         * UserInterface/Views/CPUTimelineOverviewGraph.css:
625         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
626         * UserInterface/Views/CPUTimelineOverviewGraph.js:
627         (WI.CPUTimelineOverviewGraph.prototype.get height):
628         Reduce the CPU overview graph height to 60px.
629
630         (WI.CPUTimelineOverviewGraph.prototype.layout):
631         Increase the minimum size of a column bar to 4px.
632
633 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
634
635         Web Inspector: Reload actions from second level inspector should properly reload the inspected inspector
636         https://bugs.webkit.org/show_bug.cgi?id=195306
637
638         Reviewed by Matt Baker.
639
640         * UserInterface/Base/Main.js:
641         Provide a better reload for a Nth level inspector.
642
643         * UserInterface/Debug/Bootstrap.js:
644         (WI.runBootstrapOperations):
645         Simplify, should not need to check for InspectorFrontendHost.
646
647 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
648
649         Web Inspector: MediaSource logging not initialized properly
650         https://bugs.webkit.org/show_bug.cgi?id=195307
651
652         Reviewed by Matt Baker.
653
654         * UserInterface/Controllers/ConsoleManager.js:
655         (WI.ConsoleManager.prototype.initializeLogChannels):
656         Typo caused undefined to be included and trigger assertions.
657
658 2019-03-04  Devin Rousso  <drousso@apple.com>
659
660         Web Inspector: CSS: class input isn't fully centered
661         https://bugs.webkit.org/show_bug.cgi?id=195297
662
663         Reviewed by Matt Baker.
664
665         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
666         (.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input):
667         (body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): Deleted.
668         (body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input): Deleted.
669
670 2019-03-04  Devin Rousso  <drousso@apple.com>
671
672         Web Inspector: Audit: show the version number in the UI
673         https://bugs.webkit.org/show_bug.cgi?id=195292
674
675         Reviewed by Matt Baker.
676
677         * UserInterface/Views/AuditNavigationSidebarPanel.js:
678         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
679         (WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
680         Fix the logic for showing a placeholder when editing or with only disabled tests.
681
682         * UserInterface/Views/AuditNavigationSidebarPanel.css:
683         (.sidebar > .panel.navigation.audit > .content > .message-text-view): Added.
684         (.audit-version): Added.
685         Don't obstruct the "Edit" button when showing a placeholder.
686
687         * Localizations/en.lproj/localizedStrings.js:
688
689 2019-03-04  Joseph Pecoraro  <pecoraro@apple.com>
690
691         ITMLKit Inspector: Data Bindings / Associated Data for nodes
692         https://bugs.webkit.org/show_bug.cgi?id=195290
693         <rdar://problem/48304019>
694
695         Reviewed by Devin Rousso.
696
697         * Localizations/en.lproj/localizedStrings.js:
698         New title and empty message strings.
699
700         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
701         (.sidebar > .panel.dom-node-details .details-section.dom-node-associated-data > .content .row):
702         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
703         (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
704         (WI.DOMNodeDetailsSidebarPanel.prototype.layout):
705         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshDataBindings):
706         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData):
707         (WI.DOMNodeDetailsSidebarPanel.prototype._attributesChanged):
708         New Node sections only enabled for ITMLKit `WI.sharedApp.hasExtraDomains`.
709
710         * UserInterface/Views/ObjectTreeView.js:
711         (WI.ObjectTreeView):
712         Provide a way, like TreeElement/View to access the ObjectTreeView from an element.
713
714 2019-03-04  Devin Rousso  <drousso@apple.com>
715
716         Web Inspector: Canvas: protocol error on first open
717         https://bugs.webkit.org/show_bug.cgi?id=195059
718         <rdar://problem/48407871>
719
720         Reviewed by Joseph Pecoraro.
721
722         * UserInterface/Controllers/CanvasManager.js:
723         (WI.CanvasManager.prototype.initializeTarget):
724         (WI.CanvasManager.prototype.static supportsRecordingAutoCapture):
725         (WI.CanvasManager.prototype.setRecordingAutoCaptureFrameCount):
726         If targets aren't available, wait until they are and then set the auto-capture frame count.
727
728 2019-03-04  Devin Rousso  <drousso@apple.com>
729
730         Web Inspector: Toggling Timeline "Stop when page loads" to on should stop (immediately or soon) any active recording if already past the load event
731         https://bugs.webkit.org/show_bug.cgi?id=195239
732
733         Reviewed by Joseph Pecoraro.
734
735         * UserInterface/Controllers/TimelineManager.js:
736         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
737
738 2019-03-02  Devin Rousso  <drousso@apple.com>
739
740         Web Inspector: Unexpectedly frequent flashing of DOM node attributes
741         https://bugs.webkit.org/show_bug.cgi?id=148049
742         <rdar://problem/22296830>
743
744         Reviewed by Joseph Pecoraro.
745
746         Save a timestamp of when the CSS animation began, so that if the attribute's node is replaced,
747         we can "resume" the CSS animation at the same point with the attribute's new node.
748
749         * UserInterface/Views/DOMTreeElement.js:
750         (WI.DOMTreeElement):
751         (WI.DOMTreeElement.prototype.attributeDidChange):
752         (WI.DOMTreeElement.prototype._buildAttributeDOM):
753         (WI.DOMTreeElement.prototype._createModifiedAnimation):
754         (WI.DOMTreeElement.prototype._markNodeChanged): Deleted.
755         (WI.DOMTreeElement.prototype._nodeChangedAnimationEnd): Deleted.
756         (WI.DOMTreeElement.prototype._fireDidChange): Deleted.
757
758 2019-03-02  Devin Rousso  <drousso@apple.com>
759
760         Web Inspector: Debugger: DOM, URL, and Event breakpoints don't grey out when all breakpoints are disabled
761         https://bugs.webkit.org/show_bug.cgi?id=195170
762         <rdar://problem/48478193>
763
764         Reviewed by Joseph Pecoraro.
765
766         * UserInterface/Views/DOMBreakpointTreeElement.js:
767         (WI.DOMBreakpointTreeElement):
768         (WI.DOMBreakpointTreeElement.prototype.onattach):
769         (WI.DOMBreakpointTreeElement.prototype.ondetach):
770         (WI.DOMBreakpointTreeElement.prototype._updateStatus):
771         * UserInterface/Views/EventBreakpointTreeElement.js:
772         (WI.EventBreakpointTreeElement):
773         (WI.EventBreakpointTreeElement.prototype.onattach):
774         (WI.EventBreakpointTreeElement.prototype.ondetach):
775         (WI.EventBreakpointTreeElement.prototype._updateStatus):
776         * UserInterface/Views/URLBreakpointTreeElement.js:
777         (WI.URLBreakpointTreeElement):
778         (WI.URLBreakpointTreeElement.prototype.onattach):
779         (WI.URLBreakpointTreeElement.prototype.ondetach):
780         (WI.URLBreakpointTreeElement.prototype._updateStatus):
781         Remove the `"resolved"` class when the global "breakpoints enabled" state is changed.
782
783         * UserInterface/Controllers/DOMDebuggerManager.js:
784         (WI.DOMDebuggerManager):
785         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged): Added.
786         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged): Added.
787         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged): Added.
788         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
789         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
790         (WI.DOMDebuggerManager.prototype._resolveEventBreakpoint):
791         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint):
792         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint.breakpointUpdated): Deleted.
793         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint.breakpointUpdated): Deleted.
794         * UserInterface/Models/DOMBreakpoint.js:
795         (WI.DOMBreakpoint):
796         (WI.DOMBreakpoint.deserialize): Added.
797         (WI.DOMBreakpoint.prototype.set disabled):
798         (WI.DOMBreakpoint.prototype.set domNodeIdentifier):
799         * UserInterface/Models/EventBreakpoint.js:
800         (WI.EventBreakpoint.deserialize): Added.
801         (WI.EventBreakpoint.prototype.set disabled):
802         (WI.EventBreakpoint.fromPayload): Deleted.
803         * UserInterface/Models/URLBreakpoint.js:
804         (WI.URLBreakpoint.deserialize): Added.
805         (WI.URLBreakpoint.prototype.set disabled):
806         * UserInterface/Views/DOMTreeContentView.js:
807         (WI.DOMTreeContentView):
808         (WI.DOMTreeContentView.prototype._handleDOMBreakpointDisabledStateChanged): Added.
809         (WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeChanged): Added.
810         * UserInterface/Views/DebuggerSidebarPanel.js:
811         (WI.DebuggerSidebarPanel.prototype._handleDOMBreakpointResolvedStateChanged): Added.
812         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
813         (WI.SourcesNavigationSidebarPanel):
814         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateChanged): Added.
815         Drive-by: rename all events with the name `*DidChange` to `*Changed`.
816         Drive-by: create static `deserialize` helper functions.
817
818 2019-03-02  Devin Rousso  <drousso@apple.com>
819
820         Web Inspector: Sources: breakpoints should be disabled when an audit is running
821         https://bugs.webkit.org/show_bug.cgi?id=195105
822         <rdar://problem/48441373>
823
824         Reviewed by Joseph Pecoraro.
825
826         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
827         (WI.SourcesNavigationSidebarPanel):
828         (WI.SourcesNavigationSidebarPanel.prototype.closed):
829         (WI.SourcesNavigationSidebarPanel.prototype._updateTemporarilyDisabledBreakpointsButtons): Added.
830         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
831         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
832         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
833         (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
834         (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
835         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
836         (.sidebar > .panel.navigation.sources > .content > .warning-banner + .warning-banner): Added.
837
838         * UserInterface/Views/DebuggerSidebarPanel.js:
839         (WI.DebuggerSidebarPanel):
840
841 2019-03-02  Devin Rousso  <drousso@apple.com>
842
843         Web Inspector: Debugger: don't enable breakpoints when source location changes
844         https://bugs.webkit.org/show_bug.cgi?id=195081
845         <rdar://problem/48422701>
846
847         Reviewed by Joseph Pecoraro.
848
849         * UserInterface/Controllers/DebuggerManager.js:
850         (WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
851         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
852
853 2019-03-01  Joseph Pecoraro  <pecoraro@apple.com>
854
855         Web Inspector: CPU Usage - Energy Impact Section
856         https://bugs.webkit.org/show_bug.cgi?id=195151
857
858         Reviewed by Devin Rousso.
859
860         * Localizations/en.lproj/localizedStrings.js:
861         * UserInterface/Main.html:
862         New strings and resources.
863
864         * UserInterface/Views/CPUTimelineView.css:
865         (.timeline-view.cpu > .content .subtitle > .info):
866         (@media (prefers-color-scheme: dark)):
867         (.energy-info-popover-content):
868         (.timeline-view.cpu > .content > .overview > .divider):
869         (body[dir=ltr] .timeline-view.cpu > .content > .overview > .divider):
870         (body[dir=rtl] .timeline-view.cpu > .content > .overview > .divider):
871         (.timeline-view.cpu :matches(.area-chart, .stacked-area-chart) svg > path):
872         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.low):
873         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.medium):
874         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > path.high):
875         (.timeline-view.cpu .gauge-chart:not(.empty) > svg > polygon.needle):
876         (.timeline-view.cpu .energy):
877         (.timeline-view.cpu .energy .energy-impact):
878         (.timeline-view.cpu .energy .energy-impact.low):
879         (.timeline-view.cpu .energy .energy-impact.medium):
880         (.timeline-view.cpu .energy .energy-impact.high):
881         (.timeline-view.cpu .energy .energy-impact-number):
882         Styling the chart and text for the different energy impact levels.
883
884         * UserInterface/Views/CPUTimelineView.js:
885         (WI.CPUTimelineView.prototype.get lowEnergyValue):
886         (WI.CPUTimelineView.prototype.get highEnergyValue):
887         (WI.CPUTimelineView.prototype.initialLayout):
888         (WI.CPUTimelineView.prototype.layout):
889         (WI.CPUTimelineView.prototype._layoutEnergyChart.mapWithBias):
890         (WI.CPUTimelineView.prototype._layoutEnergyChart.valuesForGauge):
891         (WI.CPUTimelineView.prototype._layoutEnergyChart):
892         (WI.CPUTimelineView.prototype._clearEnergyImpactText):
893         New gauge chart and associated popover.
894         We do a bit of biasing of the data for each of the sections
895         in the gauge chart. Each section biases toward the cap of the
896         section so that:
897           - we encourage lower power usage (sub 3%)
898           - the gauge needle quickly moves past the low value of a range
899
900         * UserInterface/Views/GaugeChart.css: Added.
901         (.gauge-chart):
902         (body[dir=rtl] .gauge-chart):
903         (.gauge-chart > svg > path,):
904         (.gauge-chart > svg > polygon.needle):
905         (.gauge-chart.empty > svg > polygon.needle):
906         (@media (prefers-color-scheme: dark)):
907         * UserInterface/Views/GaugeChart.js: Added.
908         (WI.GaugeChart.prototype.get size):
909         (WI.GaugeChart.prototype.get segments):
910         (WI.GaugeChart.prototype.get value):
911         (WI.GaugeChart.prototype.set value):
912         (WI.GaugeChart.prototype.clear):
913         (WI.GaugeChart.prototype.initialLayout):
914         (WI.GaugeChart.prototype.layout):
915         (WI.GaugeChart.prototype._validateSegments):
916         (WI.GaugeChart.prototype._createSegmentPathData):
917         GaugeChart with variable number of sections and a
918         current value needle. It has a bit of customization
919         when drawing the arc at the start of each segment.
920
921         * UserInterface/Views/Variables.css:
922         (:root):
923         (@media (prefers-color-scheme: dark)):
924         New CPU colors for the different energy impact levels.
925
926 2019-03-01  Nikita Vasilyev  <nvasilyev@apple.com>
927
928         Web Inspector: Data grid border colors don't match accent colors
929         https://bugs.webkit.org/show_bug.cgi?id=195232
930
931         Reviewed by Matt Baker.
932
933         * UserInterface/Views/DataGrid.css:
934         (.data-grid:focus tr.selected td:not(:last-child)):
935         (body[dir=ltr] .data-grid:focus tr.selected td:not(:last-child)):
936         (body[dir=rtl] .data-grid:focus tr.selected td:not(:last-child)):
937
938 2019-02-28  Devin Rousso  <drousso@apple.com>
939
940         Web Inspector: Timelines: don't show the auto-stop UI when not inspecting a page
941         https://bugs.webkit.org/show_bug.cgi?id=195192
942
943         Reviewed by Joseph Pecoraro.
944
945         * UserInterface/Views/TimelineRecordingContentView.js:
946         (WI.TimelineRecordingContentView):
947         (WI.TimelineRecordingContentView.prototype.get navigationItems):
948
949 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
950
951         Web Inspector: CPU Usage: Worker thread that dies might stay at a high value forever
952         https://bugs.webkit.org/show_bug.cgi?id=195148
953
954         Reviewed by Matt Baker.
955
956         * UserInterface/Views/CPUTimelineView.js:
957         (CPUTimelineView.prototype.layout):
958         Handle workers dieing or at least zeroing out between records.
959
960 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
961
962         Web Inspector: CPU Usage Timeline - Make Threads section expandable / collapsable
963         https://bugs.webkit.org/show_bug.cgi?id=195085
964
965         Reviewed by Matt Baker.
966
967         * UserInterface/Base/Setting.js:
968         New setting to save the Threads expanded/collapsed state.
969
970         * UserInterface/Views/CPUTimelineView.css:
971         (.timeline-view.cpu > .content > .details > .subtitle):
972         (.timeline-view.cpu > .content > .details > details > .subtitle.threads):
973         (.timeline-view.cpu > .content > .details > .subtitle): Deleted.
974         (.timeline-view.cpu > .content > .details > .subtitle.threads): Deleted.
975         Ensure subtitle styles apply now that one of the subtitles is inside
976         of a <details> / <summary> element.
977
978         * UserInterface/Views/CPUTimelineView.js:
979         (WI.CPUTimelineView.prototype.initialLayout):
980         Make the Threads group a <details> / <summary> expandable / collapsed element.
981
982         * UserInterface/Views/Main.css:
983         (summary):
984         (summary::-webkit-details-marker):
985         Default styles for <summary>.
986
987 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
988
989         Web Inspector: View.removeSubview not removing the element properly when not parented
990         https://bugs.webkit.org/show_bug.cgi?id=195146
991
992         Reviewed by Matt Baker.
993
994         * UserInterface/Views/View.js:
995         (WI.View.prototype.removeSubview):
996         Since the element may not be a direct child, just use Element.prototype.remove.
997
998 2019-02-28  Matt Baker  <mattbaker@apple.com>
999
1000         Web Inspector: Debugger: disabled breakpoint color is too dark
1001         https://bugs.webkit.org/show_bug.cgi?id=195103
1002         <rdar://problem/48440678>
1003
1004         Reviewed by Devin Rousso.
1005
1006         Increase the disabled breakpoint contrast, as well as the contrast between
1007         disabled and auto-continue breakpoints. Disabled breakpoints stand out by
1008         being somewhat brighter and less saturated. Using the same strategy for
1009         auto-continue breakpoints is too subtle to provide sufficient contrast.
1010
1011         We can adopt the technique used by Xcode, and overlay a white triangle
1012         marker on the breakpoint arrow to indicate an auto-continue breakpoint.
1013
1014         * UserInterface/Views/BreakpointTreeElement.css:
1015         (.item.breakpoint .status > .status-image):
1016         (.item.breakpoint.selected .status > .status-image.resolved):
1017         Add white outline to make selected breakpoint button stand out.
1018         (.item.breakpoint .status > .status-image.auto-continue::after):
1019         (.item.breakpoint .status > .status-image.disabled):
1020         (.item.breakpoint .status > .status-image.auto-continue): Deleted.
1021
1022
1023         * UserInterface/Views/DOMTreeContentView.css:
1024         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
1025         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled):
1026         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
1027         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,): Deleted.
1028
1029         * UserInterface/Views/TextEditor.css:
1030         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
1031         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.execution-line.primary) .CodeMirror-linenumber::after):
1032         (.text-editor > .CodeMirror .breakpoint-disabled .CodeMirror-linenumber::before):
1033         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.breakpoint-disabled) .CodeMirror-linenumber::before): Deleted.
1034
1035         * UserInterface/Views/Variables.css:
1036         (:root):
1037         Add breakpoint color variables to use across all breakpoint controls.
1038         Use system colors if available, otherwise fall back to hard-coded values
1039         based on sampling the default (blue) accent color on Mojave.
1040
1041 2019-02-28  Nikita Vasilyev  <nvasilyev@apple.com>
1042
1043         Web Inspector: Styles: Control-Space should force completion
1044         https://bugs.webkit.org/show_bug.cgi?id=194796
1045         <rdar://problem/48180822>
1046
1047         Reviewed by Matt Baker.
1048
1049         Pressing Control-Space when editing CSS property should show completion popover,
1050         even if the value is empty.
1051
1052         * UserInterface/Models/CSSCompletions.js:
1053         (WI.CSSCompletions.prototype.startsWith):
1054         Performance optimization: exit early when `prefix` is empty.
1055
1056         * UserInterface/Views/SpreadsheetStyleProperty.js:
1057         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
1058         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
1059         * UserInterface/Views/SpreadsheetTextField.js:
1060         (WI.SpreadsheetTextField):
1061         (WI.SpreadsheetTextField.prototype._handleKeyDown):
1062         (WI.SpreadsheetTextField.prototype._updateCompletions):
1063
1064 2019-02-28  Devin Rousso  <drousso@apple.com>
1065
1066         Web Inspector: Canvas: enabling auto-capture if the frame count is empty triggers an assertion
1067         https://bugs.webkit.org/show_bug.cgi?id=195060
1068
1069         Reviewed by Matt Baker.
1070
1071         * UserInterface/Views/CanvasOverviewContentView.js:
1072         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
1073         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
1074         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureCheckedDidChange):
1075
1076 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
1077
1078         Web Inspector: Revert -webkit-border-end changes that are unreliable
1079         https://bugs.webkit.org/show_bug.cgi?id=195149
1080
1081         Reviewed by Matt Baker.
1082
1083         * UserInterface/Views/CPUUsageIndicatorView.css:
1084         (.cpu-usage-indicator-view > .details):
1085         (body[dir=ltr] .cpu-usage-indicator-view > .details):
1086         (body[dir=rtl] .cpu-usage-indicator-view > .details):
1087         * UserInterface/Views/CPUUsageStackedView.css:
1088         (.cpu-usage-stacked-view > .details):
1089         (body[dir=ltr] .cpu-usage-stacked-view > .details):
1090         (body[dir=rtl] .cpu-usage-stacked-view > .details):
1091         * UserInterface/Views/CPUUsageView.css:
1092         (.cpu-usage-view > .details):
1093         (body[dir=ltr] .cpu-usage-view > .details):
1094         (body[dir=rtl] .cpu-usage-view > .details):
1095         * UserInterface/Views/MemoryCategoryView.css:
1096         (.memory-category-view > .details):
1097         (body[dir=ltr] .memory-category-view > .details):
1098         (body[dir=rtl] .memory-category-view > .details):
1099
1100 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
1101
1102         Web Inspector: Cleanup some Chart code
1103         https://bugs.webkit.org/show_bug.cgi?id=195147
1104
1105         Reviewed by Matt Baker.
1106
1107         * UserInterface/Views/RangeChart.js:
1108         (WI.RangeChart.prototype.layout):
1109         (WI.RangeChart):
1110         * UserInterface/Views/StackedColumnChart.js:
1111         (WI.StackedColumnChart.prototype.layout):
1112         (WI.StackedColumnChart):
1113
1114 2019-02-27  Joseph Pecoraro  <pecoraro@apple.com>
1115
1116         Web Inspector: Add a new Scanner TimelineMarker to show up when mousing over TimelineView graphs
1117         https://bugs.webkit.org/show_bug.cgi?id=195079
1118
1119         Reviewed by Devin Rousso.
1120
1121         * UserInterface/Base/Utilities.js:
1122         (Note.prototype.enclosingNodeOrSelfWithClassInArray):
1123         Helper for a set of classes.
1124
1125         * UserInterface/Models/TimelineMarker.js:
1126         Add a new marker type, "Scanner".
1127
1128         * UserInterface/Views/CPUTimelineView.js:
1129         (WI.CPUTimelineView.prototype.initialLayout):
1130         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
1131         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
1132         * UserInterface/Views/MemoryTimelineView.js:
1133         (WI.MemoryTimelineView):
1134         (WI.MemoryTimelineView.prototype._graphPositionForMouseEvent):
1135         (WI.MemoryTimelineView.prototype._handleGraphMouseMove):
1136         Update a scanner time when mousing over various graphs that span the entire time range.
1137         These use the containing graph element because there was a single pixel between
1138         adjacent graphs which would cause the scanner to flicker because the mouse event target
1139         was not an svg element.
1140
1141         * UserInterface/Views/TimelineOverview.js:
1142         (WI.TimelineOverview.prototype.hidden):
1143         (WI.TimelineOverview.prototype.updateScannerTime):
1144         (WI.TimelineOverview.prototype.clearScanner):
1145         * UserInterface/Views/TimelineRecordingContentView.js:
1146         (WI.TimelineRecordingContentView):
1147         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerTimeDidChange):
1148         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerDidClear):
1149         Update the overview's ruler with scanner changes.
1150
1151         * UserInterface/Views/TimelineRuler.css:
1152         (.timeline-ruler > .markers > .marker.scanner):
1153         * UserInterface/Views/TimelineRuler.js:
1154         (WI.TimelineRuler):
1155         (WI.TimelineRuler.prototype.clearMarkers):
1156         (WI.TimelineRuler.prototype.updateScannerTime):
1157         (WI.TimelineRuler.prototype.clearScanner):
1158         (WI.TimelineRuler.prototype._updateMarkers):
1159         Have a special scanner marker that updates.
1160
1161         * UserInterface/Views/TimelineView.js:
1162         New events that a TimelineView can dispatch to update the overview.
1163
1164         * UserInterface/Views/Variables.css:
1165         (:root):
1166         (@media (prefers-color-scheme: dark)):
1167         Scanner marker colors.
1168
1169 2019-02-27  Devin Rousso  <drousso@apple.com>
1170
1171         Web Inspector: Use Element.closest for internal code
1172         https://bugs.webkit.org/show_bug.cgi?id=173747
1173
1174         Reviewed by Joseph Pecoraro.
1175
1176         Replace usage of added utility functions on the `Node` prototype with the built-in
1177         `Element.prototype.closest` as it's more flexible and is capable of doing the same thing.
1178
1179         * UserInterface/Base/Utilities.js:
1180         (Node.prototype.enclosingNodeOrSelfWithClass): Deleted.
1181         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Deleted.
1182         (Node.prototype.enclosingNodeOrSelfWithNodeName): Deleted.
1183         * UserInterface/Base/Main.js:
1184         (WI.handlePossibleLinkClick):
1185         (WI._focusedContentBrowser):
1186         * UserInterface/Views/CPUTimelineView.js:
1187         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
1188         * UserInterface/Views/CompletionSuggestionsView.js:
1189         (WI.CompletionSuggestionsView.prototype.set selectedIndex):
1190         (WI.CompletionSuggestionsView.prototype.update):
1191         (WI.CompletionSuggestionsView.prototype._itemClicked):
1192         * UserInterface/Views/ConsoleGroup.js:
1193         (WI.ConsoleGroup.prototype._titleClicked):
1194         * UserInterface/Views/DOMTreeContentView.js:
1195         (WI.DOMTreeContentView.prototype._mouseWasClicked):
1196         * UserInterface/Views/DOMTreeElement.js:
1197         (WI.DOMTreeElement.prototype._startEditingTarget):
1198         (WI.DOMTreeElement.prototype._populateTagContextMenu):
1199         * UserInterface/Views/DOMTreeOutline.js:
1200         (WI.DOMTreeOutline.prototype.populateContextMenu):
1201         * UserInterface/Views/DataGrid.js:
1202         (WI.DataGrid.prototype._startEditing):
1203         (WI.DataGrid.prototype._editingCancelled):
1204         (WI.DataGrid.prototype.dataGridNodeFromNode):
1205         (WI.DataGrid.prototype.dataGridNodeFromPoint):
1206         (WI.DataGrid.prototype._headerCellClicked):
1207         (WI.DataGrid.prototype._mouseoverColumnCollapser):
1208         (WI.DataGrid.prototype._mouseoutColumnCollapser):
1209         (WI.DataGrid.prototype._clickInColumnCollapser):
1210         (WI.DataGrid.prototype._contextMenuInHeader):
1211         (WI.DataGrid.prototype._contextMenuInDataTable):
1212         * UserInterface/Views/DataGridNode.js:
1213         (WI.DataGridNode.prototype.isEventWithinDisclosureTriangle):
1214         * UserInterface/Views/LegacyTabBar.js:
1215         (WI.LegacyTabBar.prototype._handleMouseDown):
1216         (WI.LegacyTabBar.prototype._handleClick):
1217         * UserInterface/Views/LogContentView.js:
1218         (WI.LogContentView.prototype._handleContextMenuEvent):
1219         (WI.LogContentView.prototype._mousedown):
1220         (WI.LogContentView.prototype._targetInMessageCanBeSelected):
1221         (WI.LogContentView.prototype._mousemove):
1222         (WI.LogContentView.prototype._mouseup):
1223         (WI.LogContentView.prototype._ondragstart):
1224         * UserInterface/Views/NavigationBar.js:
1225         (WI.NavigationBar.prototype._mouseDown):
1226         (WI.NavigationBar.prototype._mouseMoved):
1227         * UserInterface/Views/Popover.js:
1228         (WI.Popover.prototype.handleEvent):
1229         * UserInterface/Views/TabBar.js:
1230         (WI.TabBar.prototype._handleMouseDown):
1231         (WI.TabBar.prototype._handleClick):
1232         * UserInterface/Views/Table.js:
1233         (WI.Table.prototype._handleMouseDown):
1234         (WI.Table.prototype._handleContextMenu):
1235         * UserInterface/Views/TreeOutline.js:
1236         (WI.TreeOutline.prototype.treeElementFromNode):
1237
1238 2019-02-27  Devin Rousso  <drousso@apple.com>
1239
1240         Web Inspector: REGRESSION(r242118): Debugger: event breakpoints have no icon
1241         https://bugs.webkit.org/show_bug.cgi?id=195119
1242
1243         Reviewed by Matt Baker.
1244
1245         * UserInterface/Views/EventBreakpointTreeElement.js:
1246         (WI.EventBreakpointTreeElement):
1247
1248 2019-02-27  Devin Rousso  <drousso@apple.com>
1249
1250         Web Inspector: Dark Mode: unreadable text in bezier curve editor numeric input fields
1251         https://bugs.webkit.org/show_bug.cgi?id=195018
1252         <rdar://problem/48378541>
1253
1254         Reviewed by Matt Baker.
1255
1256         Simplify some styles using `-webkit-*` properties instead of `[dir=ltr]`/`[dir=rtl]` selectors.
1257
1258         * UserInterface/Views/BezierEditor.css:
1259         (.bezier-editor):
1260         (.bezier-editor > .bezier-preview):
1261         (.bezier-editor > .bezier-preview-timing):
1262         (.bezier-editor > .bezier-container .linear-curve):
1263         (.bezier-editor > .bezier-container .bezier-curve):
1264         (.bezier-editor > .bezier-container .control-line):
1265         (.bezier-editor > .bezier-container .control-handle):
1266         (.bezier-editor > .number-input-container):
1267         (.bezier-editor > .number-input-container > input):
1268         (body[dir=ltr] .bezier-editor > .bezier-preview-timing): Deleted.
1269         (body[dir=rtl] .bezier-editor > .bezier-preview-timing): Deleted.
1270         (body[dir=ltr] .bezier-editor > .number-input-container > input): Deleted.
1271         (body[dir=rtl] .bezier-editor > .number-input-container > input): Deleted.
1272         (@media (prefers-color-scheme: dark)): Deleted.
1273         Remove all custom styling on any <input>s, as they look fine with their default styling.
1274
1275         * UserInterface/Views/SpringEditor.css:
1276         (.spring-editor > .spring-preview):
1277         (.spring-editor > .spring-preview > div):
1278         (.spring-editor > .spring-timing > div):
1279
1280 2019-02-27  Devin Rousso  <drousso@apple.com>
1281
1282         Web Inspector: popover colors don't change when transitioning to/from dark mode
1283         https://bugs.webkit.org/show_bug.cgi?id=195113
1284         <rdar://problem/48444188>
1285
1286         Reviewed by Timothy Hatcher.
1287
1288         * UserInterface/Views/Popover.js:
1289         (WI.Popover.prototype.dismiss):
1290         (WI.Popover.prototype._addListenersIfNeeded):
1291
1292 2019-02-26  Matt Baker  <mattbaker@apple.com>
1293
1294         Web Inspector: Use system accent color throughout UI
1295         https://bugs.webkit.org/show_bug.cgi?id=193507
1296         <rdar://problem/47327971>
1297
1298         Reviewed by Timothy Hatcher.
1299
1300         * UserInterface/Images/Breakpoint.png: Removed.
1301         * UserInterface/Images/Breakpoint.svg: Added.
1302         * UserInterface/Images/Breakpoint@2x.png: Removed.
1303         * UserInterface/Images/BreakpointInactive.png: Removed.
1304         * UserInterface/Images/BreakpointInactive@2x.png: Removed.
1305         Replace breakpoint pixel art with an SVG image that can be styled in CSS.
1306
1307         * UserInterface/Images/CSSVariable.svg:
1308         * UserInterface/Images/CubicBezier.svg:
1309         * UserInterface/Images/UserInputPrompt.svg:
1310         Remove fill color since it is now styled in CSS.
1311
1312         * UserInterface/Views/BezierEditor.css:
1313         (.bezier-editor > .bezier-preview > div):
1314         (@media (prefers-color-scheme: dark)):
1315         (.bezier-editor > .bezier-container .control-handle):
1316         (.bezier-editor > .bezier-container .control-line):
1317         Use system accent color for control handles.
1318
1319         * UserInterface/Views/BreakpointTreeElement.css:
1320         (.item.breakpoint .status > .status-image):
1321         (.item.breakpoint .status > .status-image.resolved):
1322         Use system accent color for breakpoint fill, with a dark outline
1323         to match Xcode and make the button stand out against the selection.
1324
1325         * UserInterface/Views/BreakpointTreeElement.js:
1326         (WI.BreakpointTreeElement.prototype._updateStatus):
1327
1328         * UserInterface/Views/ButtonNavigationItem.css:
1329         (.navigation-bar .item.button > .glyph):
1330
1331         * UserInterface/Views/ConsolePrompt.js:
1332         (WI.ConsolePrompt):
1333
1334         * UserInterface/Views/DOMBreakpointTreeElement.js:
1335         * UserInterface/Views/DOMTreeContentView.css:
1336         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
1337         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,):
1338         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
1339         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled): Deleted.
1340         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint): Deleted.
1341         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint.disabled): Deleted.
1342
1343         * UserInterface/Views/DOMTreeOutline.css:
1344         (.tree-outline.dom li.selected .selection-area):
1345         (.tree-outline.dom li.elements-drag-over .selection-area):
1346         (.tree-outline.dom:focus li:matches(.selected, .hovered) .selection-area):
1347         (.tree-outline.dom li.hovered:not(.selected) .selection-area):
1348         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
1349         Use the system accent color for the "pseudo-class enabled" marker.
1350         (@media (prefers-color-scheme: dark)):
1351         (.tree-outline.dom:focus li.selected .selection-area): Deleted.
1352         Use --selected-background-color for selection and hover styles, which is
1353         set to the system highlight color if available.
1354
1355         * UserInterface/Views/InlineSwatch.css:
1356         (.inline-swatch:matches(.bezier, .spring, .variable)):
1357         (.inline-swatch:matches(.bezier, .spring)): Deleted.
1358         (.inline-swatch.variable): Deleted.
1359
1360         * UserInterface/Views/InlineSwatch.js:
1361         (WI.InlineSwatch):
1362
1363         * UserInterface/Views/NetworkDetailView.css:
1364         (.network .network-detail .navigation-bar .item.radio.button.text-only:before):
1365         (.network .network-detail .navigation-bar .item.radio.button.text-only.selected):
1366         (@media (prefers-color-scheme: dark)):
1367         (.network-detail .item.close > .glyph):
1368
1369         * UserInterface/Views/QuickConsole.css:
1370         (.quick-console > .console-prompt > .glyph):
1371         (.quick-console > .console-prompt::before): Deleted.
1372
1373         * UserInterface/Views/RadioButtonNavigationItem.css:
1374         (.navigation-bar .item.radio.button.text-only):
1375         (.navigation-bar .item.radio.button.text-only::before):
1376         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)):
1377         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)::before):
1378         (.navigation-bar .item.radio.button.text-only:not(.selected):hover::before):
1379         (.navigation-bar .item.radio.button.text-only.selected:active::before):
1380         (.navigation-bar .item.radio.button.text-only:hover): Deleted.
1381         (.navigation-bar .item.radio.button.text-only.selected): Deleted.
1382         (.navigation-bar .item.radio.button.text-only:active): Deleted.
1383         (.navigation-bar .item.radio.button.text-only.selected:active): Deleted.
1384         Use system accent color for selection and hover styles. Since it isn't
1385         yet possible to derive new colors from the accent color in CSS, fake it
1386         with a ::before pseudo-element that can have have `filter` or `opacity`
1387         effects applied to it without altering the button text color.
1388
1389         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
1390         (.timeline-overview-graph.rendering-frame > .frame-marker):
1391         Use system accent color for selected frame marker.
1392
1393         * UserInterface/Views/ScopeBar.css:
1394         (.scope-bar > li):
1395         (.scope-bar > li::before):
1396         (.scope-bar.default-item-selected > li.multiple.selected::before):
1397         (.scope-bar > li:matches(.selected, :hover)):
1398         (.scope-bar > li:matches(.selected, :hover)::before):
1399         (.scope-bar > li:not(.selected):hover::before):
1400         (.scope-bar > li.selected:active::before):
1401         (.scope-bar > li:hover): Deleted.
1402         (.scope-bar > li.selected): Deleted.
1403         (.scope-bar > li:active): Deleted.
1404         (.scope-bar > li.selected:active): Deleted.
1405
1406         * UserInterface/Views/SettingsTabContentView.css:
1407         (.content-view.settings .navigation-bar .item.radio.button.text-only:before):
1408
1409         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1410         (.spreadsheet-style-declaration-editor):
1411         (@media (prefers-color-scheme: dark)):
1412
1413         * UserInterface/Views/TextEditor.css:
1414         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
1415         (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
1416         (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber::before):
1417         (@keyframes text-editor-highlight-fadeout):
1418         (@keyframes text-editor-hovered-expression-highlight-fadeout):
1419         Replace breakpoint pixel art with a solid color (the system accent
1420         color) clipped to the shape of a breakpoint.
1421
1422         * UserInterface/Views/TimelineRecordFrame.css:
1423         (.timeline-record-frame.selected):
1424
1425         * UserInterface/Views/URLBreakpointTreeElement.js:
1426
1427         * UserInterface/Views/Variables.css:
1428         (:root):
1429         (body.window-inactive):
1430         (@media (prefers-color-scheme: dark)):
1431         (body.mac-platform:not(.sierra, .high-sierra)):
1432         Add custom property overrides for system colors where supported.
1433
1434 2019-02-26  Devin Rousso  <drousso@apple.com>
1435
1436         Web Inspector: Search: no results when opening to Search tab
1437         https://bugs.webkit.org/show_bug.cgi?id=195058
1438         <rdar://problem/48407699>
1439
1440         Reviewed by Joseph Pecoraro.
1441
1442         * UserInterface/Views/SearchSidebarPanel.js:
1443         (WI.SearchSidebarPanel.prototype.performSearch):
1444         If targets aren't available, wait until they are and then perform the search.
1445
1446         * UserInterface/Base/Main.js:
1447         (WI.targetsAvailable): Added.
1448         Expose getter for indicating whether targets are available.
1449
1450 2019-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1451
1452         Web Inspector: CPU Usage Timeline - Main Thread Indicator
1453         https://bugs.webkit.org/show_bug.cgi?id=194972
1454
1455         Reviewed by Devin Rousso.
1456
1457         * UserInterface/Main.html:
1458         * UserInterface/Base/Utilities.js:
1459         (value):
1460         The existing enclosingNode doesn't work for SVG because its names
1461         are lowercase. Add a simplified version for the svg case.
1462
1463         * UserInterface/Views/RangeChart.js: Added.
1464         (WI.RangeChart):
1465         (WI.RangeChart.prototype.get size):
1466         (WI.RangeChart.prototype.set size):
1467         (WI.RangeChart.prototype.addRange):
1468         (WI.RangeChart.prototype.clear):
1469         (WI.RangeChart.prototype.layout):
1470         A new chart that draws rects for given ranges.
1471
1472         * UserInterface/Models/Timeline.js:
1473         (WI.Timeline.prototype.recordsOverlappingTimeRange):
1474         Helper to specifically get records touching a range. Useful
1475         for when we have a single pixel spanning (startTime -> endTime)
1476         and we want to find records in that pixel.
1477
1478         * UserInterface/Views/CPUTimelineView.css:
1479         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart rect):
1480         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-script):
1481         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-style):
1482         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-layout):
1483         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-paint):
1484         * UserInterface/Views/CPUTimelineView.js:
1485         (WI.CPUTimelineView.prototype.get indicatorViewHeight):
1486         (WI.CPUTimelineView.prototype.clear):
1487         (WI.CPUTimelineView.prototype.get scrollableElements):
1488         (WI.CPUTimelineView.prototype.initialLayout):
1489         (WI.CPUTimelineView.prototype.layout):
1490         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
1491         (WI.CPUTimelineView.prototype._handleIndicatorClick):
1492         (WI.CPUTimelineView.prototype._attemptSelectIndicatatorTimelineRecord):
1493         (WI.CPUTimelineView.prototype._selectTimelineRecord):
1494         Place the Main Thread Indicator view beneath the big graph.
1495         Clicking inside it selects records in the Timeline Overview.
1496
1497         * UserInterface/Views/CPUUsageIndicatorView.css: Added.
1498         (.cpu-usage-indicator-view):
1499         (.cpu-usage-indicator-view > .details):
1500         (body[dir=ltr] .cpu-usage-indicator-view > .details):
1501         (body[dir=rtl] .cpu-usage-indicator-view > .details):
1502         (body[dir=rtl] .cpu-usage-indicator-view > .graph):
1503         (.cpu-usage-indicator-view > .graph):
1504         (.cpu-usage-indicator-view > .graph,):
1505         * UserInterface/Views/CPUUsageIndicatorView.js: Added.
1506         (WI.CPUUsageIndicatorView):
1507         (WI.CPUUsageIndicatorView.prototype.get chart):
1508         (WI.CPUUsageIndicatorView.prototype.clear):
1509         (WI.CPUUsageIndicatorView.prototype.updateChart):
1510         Converts the CPU samples data into a RangeChart. It works to coalesce
1511         many samples of the same type into a single range to reduce total ranges.
1512
1513         * UserInterface/Views/TimelineRecordingContentView.js:
1514         (WI.TimelineRecordingContentView):
1515         (WI.TimelineRecordingContentView.prototype._recordSelected):
1516         (WI.TimelineRecordingContentView.prototype._recordWasSelected):
1517         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineOverview):
1518         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineView):
1519         * UserInterface/Views/TimelineView.js:
1520         Add a path for a TimelineView to dispatch a record selected event and cause
1521         have the TimelineRecordingContentView react to it by updating the timeline
1522         overview and relevent timeline view.
1523
1524 2019-02-26  Devin Rousso  <drousso@apple.com>
1525
1526         Web Inspector: navigation sidebar says "No Search Results" when a slow search is in progress
1527         https://bugs.webkit.org/show_bug.cgi?id=170631
1528         <rdar://problem/29473874>
1529
1530         Reviewed by Joseph Pecoraro.
1531
1532         Keep a count of all the backend commands (increment when firing, decrement when a result is
1533         sent back to the frontend). Once the count comes back to `0`, attempt to show the "No Results"
1534         placeholder, since we will have finished searching at that point. Since commands can be called
1535         as a result of other commands, using `Promise.all` isn't possible.
1536
1537         * UserInterface/Views/SearchSidebarPanel.js:
1538         (WI.SearchSidebarPanel.prototype.performSearch):
1539         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon): Deleted.
1540         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder): Deleted.
1541         Drive-by: replace `bind` calls with arrow functions, and use for-of loops.
1542
1543         * Localizations/en.lproj/localizedStrings.js:
1544
1545 2019-02-26  Devin Rousso  <drousso@apple.com>
1546
1547         Web Inspector: Canvas: if no auto-capture value is specified, don't force the input to have "0" as the value
1548         https://bugs.webkit.org/show_bug.cgi?id=194950
1549         <rdar://problem/48276798>
1550
1551         Reviewed by Joseph Pecoraro.
1552
1553         Create a getter/setter for the value of the auto-capture frame count <input> so that all
1554         code follows the same path.
1555
1556         If the <input> currently has no content and the frame count is 0, only set the placeholder.
1557
1558         * UserInterface/Views/CanvasOverviewContentView.js:
1559         (WI.CanvasOverviewContentView):
1560         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
1561         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
1562         (WI.CanvasOverviewContentView.prototype.get _recordingAutoCaptureFrameCountInputElementValue): Added.
1563         (WI.CanvasOverviewContentView.prototype.set _recordingAutoCaptureFrameCountInputElementValue): Added.
1564         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
1565         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
1566
1567 2019-02-26  Devin Rousso  <drousso@apple.com>
1568
1569         Web Inspector: Console: dragging a selection outside the selected element clears the selection
1570         https://bugs.webkit.org/show_bug.cgi?id=194660
1571         <rdar://problem/46719239>
1572
1573         Reviewed by Joseph Pecoraro.
1574
1575         * UserInterface/Views/LogContentView.js:
1576         (WI.LogContentView.prototype._mousemove):
1577         Don't clear the selection if the target of the "mousemove" is outside of the view.
1578
1579         (WI.LogContentView.prototype._updateMessagesSelection):
1580         Drive-by: clear the saved selected messages when we're just selecting a single message.
1581
1582 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
1583
1584         Web Inspector: Rename LineChart to AreaChart
1585         https://bugs.webkit.org/show_bug.cgi?id=195038
1586
1587         Rubber-stamped by Matt Baker.
1588
1589         * UserInterface/Main.html:
1590         New file names.
1591
1592         * UserInterface/Views/AreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/LineChart.js.
1593         * UserInterface/Views/StackedAreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/StackedLineChart.js.
1594         Renamed.
1595
1596         * UserInterface/Views/CPUTimelineView.css:
1597         * UserInterface/Views/CPUUsageStackedView.css:
1598         * UserInterface/Views/CPUUsageStackedView.js:
1599         * UserInterface/Views/CPUUsageView.css:
1600         * UserInterface/Views/CPUUsageView.js:
1601         * UserInterface/Views/LegacyCPUTimelineView.css:
1602         * UserInterface/Views/MemoryCategoryView.css:
1603         * UserInterface/Views/MemoryCategoryView.js:
1604         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
1605         Update references.
1606
1607 2019-02-25  Devin Rousso  <drousso@apple.com>
1608
1609         Web Inspector: hovering a node inside an object preview should highlight it
1610         https://bugs.webkit.org/show_bug.cgi?id=194862
1611         <rdar://problem/48246433>
1612
1613         Reviewed by Joseph Pecoraro.
1614
1615         * UserInterface/Views/FormattedValue.js:
1616         (WI.FormattedValue.createElementForNodePreview):
1617         When provided a way to access the `WI.RemoteObject` for the given preview, add various mouse
1618         event listeners that highlight the corresponding DOM node.
1619
1620         * UserInterface/Views/ObjectPreviewView.js:
1621         (WI.ObjectPreviewView):
1622         (WI.ObjectPreviewView.prototype._initTitleElement):
1623         (WI.ObjectPreviewView.prototype._appendPropertyPreviews):
1624         (WI.ObjectPreviewView.prototype._appendValuePreview):
1625         Implement various ways of getting the `WI.RemoteObject` for a given preview.
1626          - When the preview is for the actual `WI.RemoteObject`, simply return it
1627          - If the preview is a property of the main object, get the `WI.RemoteObject` for that property
1628
1629         * UserInterface/Views/ObjectTreeView.js:
1630         (WI.ObjectTreeView):
1631         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1632         (WI.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
1633         Pass the `WI.RemoteObject` to the preview so that it can utilize it.
1634
1635         * UserInterface/Controllers/ConsoleManager.js:
1636         (WI.ConsoleManager):
1637         (WI.ConsoleManager.prototype.releaseRemoteObjectWithConsoleClear): Added.
1638         (WI.ConsoleManager.prototype.messagesCleared): Added.
1639
1640 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
1641
1642         Web Inspector: CPU Usage Timeline - Thread Breakdown
1643         https://bugs.webkit.org/show_bug.cgi?id=194788
1644
1645         Reviewed by Devin Rousso.
1646
1647         * Localizations/en.lproj/localizedStrings.js:
1648         * UserInterface/Main.html:
1649         New strings and files.
1650
1651         * UserInterface/Views/Variables.css:
1652         (:root):
1653         New colors for cpu threads / activity breakdown.
1654
1655         * UserInterface/Models/CPUTimelineRecord.js:
1656         (WI.CPUTimelineRecord.prototype.get workers):
1657         (WI.CPUTimelineRecord):
1658         Distinguish the workers in a CPU timeline record.
1659
1660         * UserInterface/Views/CPUTimelineOverviewGraph.js:
1661         (WI.CPUTimelineOverviewGraph):
1662         (WI.CPUTimelineOverviewGraph.prototype.layout):
1663         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1664         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect):
1665         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
1666         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
1667         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
1668         Stacked column chart for CPU in the overview graph.
1669
1670         * UserInterface/Views/CPUTimelineView.css:
1671         (.timeline-view.cpu > .content > .overview):
1672         (.timeline-view.cpu > .content > .details > .subtitle.threads):
1673         (.timeline-view.cpu > .content > .overview > .chart):
1674         (.timeline-view.cpu > .content > .overview > .chart > .subtitle):
1675         (.timeline-view.cpu > .content > .overview > .chart > .container):
1676         (.timeline-view.cpu > .content > .overview .samples,):
1677         (.timeline-view.cpu .legend):
1678         (.timeline-view.cpu .legend .row):
1679         (.timeline-view.cpu .legend .row + .row):
1680         (.timeline-view.cpu .legend .swatch):
1681         (.timeline-view.cpu .legend > .row > .swatch.sample-type-idle):
1682         (.timeline-view.cpu .legend > .row > .swatch.sample-type-script):
1683         (.timeline-view.cpu .legend > .row > .swatch.sample-type-style):
1684         (.timeline-view.cpu .legend > .row > .swatch.sample-type-layout):
1685         (.timeline-view.cpu .legend > .row > .swatch.sample-type-paint):
1686         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-idle):
1687         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script):
1688         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-style):
1689         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-layout):
1690         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-paint):
1691         (.timeline-view.cpu svg > path):
1692         (.timeline-view.cpu .main-thread svg > path,):
1693         (.timeline-view.cpu .worker-thread svg > path,):
1694         (.timeline-view.cpu .cpu-usage-view.empty):
1695         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers):
1696         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div):
1697         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div > .label):
1698         (.timeline-view.cpu > .content): Deleted.
1699         (.cpu-usage-view .line-chart > svg > path): Deleted.
1700         (.timeline-view.cpu .legend > .row > .swatch.current): Deleted.
1701         * UserInterface/Views/CPUTimelineView.js:
1702         (WI.CPUTimelineView):
1703         (WI.CPUTimelineView.displayNameForSampleType):
1704         (WI.CPUTimelineView.prototype.shown):
1705         (WI.CPUTimelineView.prototype.clear.clearUsageView):
1706         (WI.CPUTimelineView.prototype.clear):
1707         (WI.CPUTimelineView.prototype.initialLayout.createChartContainer):
1708         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
1709         (WI.CPUTimelineView.prototype.initialLayout):
1710         (WI.CPUTimelineView.prototype.layout.removeGreaterThan):
1711         (WI.CPUTimelineView.prototype.layout):
1712         (WI.CPUTimelineView.prototype.layout.layoutView):
1713         (WI.CPUTimelineView.prototype.layout.yScale):
1714         (WI.CPUTimelineView.prototype._computeSamplingData.markRecordEntries):
1715         (WI.CPUTimelineView.prototype._computeSamplingData):
1716         (WI.CPUTimelineView.prototype._removeWorkerThreadViews):
1717         (WI.CPUTimelineView.prototype._clearBreakdownLegend):
1718         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
1719         Line charts and Circle Chart for threads and breakdowns.
1720
1721         * UserInterface/Views/CPUUsageStackedView.css:
1722         (.cpu-usage-stacked-view):
1723         (.cpu-usage-stacked-view > .details):
1724         (body[dir=ltr] .cpu-usage-stacked-view > .details):
1725         (body[dir=rtl] .cpu-usage-stacked-view > .details):
1726         (.cpu-usage-stacked-view > .details > .name):
1727         (body[dir=rtl] .cpu-usage-stacked-view > .graph):
1728         (.cpu-usage-stacked-view > .graph):
1729         (.cpu-usage-stacked-view > .graph,):
1730         * UserInterface/Views/CPUUsageStackedView.js:
1731         (WI.CPUUsageStackedView):
1732         (WI.CPUUsageStackedView.prototype.get chart):
1733         (WI.CPUUsageStackedView.prototype.clear):
1734         (WI.CPUUsageStackedView.prototype.updateChart):
1735         (WI.CPUUsageStackedView.prototype._updateDetails):
1736         Same as CPUUsageView except Stacked for the total.
1737
1738         * UserInterface/Views/CPUUsageView.css:
1739         (.cpu-usage-view):
1740         (.cpu-usage-view > .details):
1741         (.cpu-usage-view > .details > .name):
1742         (.cpu-usage-view > .graph):
1743         * UserInterface/Views/CPUUsageView.js:
1744         (WI.CPUUsageView):
1745         (WI.CPUUsageView.prototype.get chart):
1746         (WI.CPUUsageView.prototype.clear):
1747         (WI.CPUUsageView.prototype.updateChart):
1748         (WI.CPUUsageView.prototype._updateDetails):
1749         Slight modifications for the new UI.
1750
1751         * UserInterface/Views/LegacyCPUTimelineView.css:
1752         (.timeline-view.legacy-cpu .cpu-usage-view .line-chart > svg > path):
1753         * UserInterface/Views/LegacyCPUTimelineView.js:
1754         (WI.LegacyCPUTimelineView.prototype.layout):
1755         Update API calls in the legacy view for minor changes.
1756
1757         * UserInterface/Views/MemoryCategoryView.css:
1758         (.memory-category-view > .details):
1759         (.memory-category-view > .details > .name):
1760         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
1761         (WI.MemoryTimelineOverviewGraph.prototype.layout):
1762         * UserInterface/Views/MemoryTimelineView.css:
1763         (body .timeline-view.memory):
1764         (.timeline-view.memory): Deleted.
1765         Improvements ported from the CPU timeline views.
1766
1767         * UserInterface/Views/StackedColumnChart.js: Added.
1768         (WI.StackedColumnChart):
1769         (WI.StackedColumnChart.prototype.get size):
1770         (WI.StackedColumnChart.prototype.set size):
1771         (WI.StackedColumnChart.prototype.initializeSections):
1772         (WI.StackedColumnChart.prototype.addColumnSet):
1773         (WI.StackedColumnChart.prototype.clear):
1774         (WI.StackedColumnChart.prototype.layout):
1775         A stacked column chart implementation.
1776
1777         * UserInterface/Views/View.js:
1778         (WI.View.prototype.removeUnparentedSubview):
1779         Add a way to remove a subview that had its `element` moved
1780         someplace other than a direct child of our element.
1781
1782 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
1783
1784         Web Inspector: Dark Mode: Network Overview Graph segments have distracting white box shadow
1785         https://bugs.webkit.org/show_bug.cgi?id=194966
1786
1787         Reviewed by Devin Rousso.
1788
1789         * UserInterface/Views/Variables.css:
1790         (@media (prefers-color-scheme: dark)):
1791         Make global timeline even/odd colors where odd is the default content background
1792         color and even is slightly different. These were used in multiple places.
1793
1794         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1795         (.timeline-overview-graph.cpu > .legend):
1796         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
1797         (@media (prefers-color-scheme: dark)): Deleted.
1798         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
1799         (.timeline-overview-graph.memory > .legend):
1800         (.timeline-overview-graph.memory:nth-child(even) > .legend):
1801         (@media (prefers-color-scheme: dark)): Deleted.
1802         * UserInterface/Views/NetworkTimelineOverviewGraph.css:
1803         (.timeline-overview-graph.network > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
1804         (.timeline-overview-graph.network:nth-child(even) > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
1805         Use the variable colors now and eliminate dark mode blocks.
1806
1807 2019-02-25  Nikita Vasilyev  <nvasilyev@apple.com>
1808
1809         Web Inspector: Styles: Command-/ should toggle edited property
1810         https://bugs.webkit.org/show_bug.cgi?id=194967
1811         <rdar://problem/48329852>
1812
1813         Reviewed by Devin Rousso.
1814
1815         * UserInterface/Models/CSSProperty.js:
1816         (WI.CSSProperty.prototype.commentOut):
1817         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1818         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelect):
1819         * UserInterface/Views/SpreadsheetStyleProperty.js:
1820         (WI.SpreadsheetStyleProperty.prototype.update):
1821         (WI.SpreadsheetStyleProperty.prototype._toggle):
1822         (WI.SpreadsheetStyleProperty.prototype._select):
1823
1824 2019-02-25  Devin Rousso  <drousso@apple.com>
1825
1826         Web Inspector: REGRESSION(r242018): Timelines shows no results
1827         https://bugs.webkit.org/show_bug.cgi?id=195017
1828
1829         Reviewed by Joseph Pecoraro.
1830
1831         `simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.
1832
1833         * UserInterface/Base/SearchUtilities.js:
1834         (WI.SearchUtilities.prototype.regExpForString):
1835         Add assertions that the provided search query is a valid non-empty string.
1836
1837         * UserInterface/Views/DataGrid.js:
1838         (WI.DataGrid.prototype._updateFilter):
1839         If the search query is empty, don't attempt to create a `RegExp` for it.
1840
1841 2019-02-25  Matt Baker  <mattbaker@apple.com>
1842
1843         Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
1844         https://bugs.webkit.org/show_bug.cgi?id=194918
1845         <rdar://problem/48289314>
1846
1847         Reviewed by Devin Rousso.
1848
1849         * UserInterface/Views/Table.js:
1850         (WI.Table.prototype.selectionControllerSelectionDidChange):
1851
1852         * UserInterface/Views/TreeOutline.js:
1853         (WI.TreeOutline.prototype._treeKeyDown):
1854
1855 2019-02-25  Devin Rousso  <drousso@apple.com>
1856
1857         Web Inspector: [META] Merge Resources and Debugger into a single Sources tab
1858         https://bugs.webkit.org/show_bug.cgi?id=183420
1859
1860         Reviewed by Joseph Pecoraro.
1861
1862         * UserInterface/Views/SourcesNavigationSidebarPanel.js: Added.
1863         (WI.SourcesNavigationSidebarPanel):
1864         (WI.SourcesNavigationSidebarPanel.shouldPlaceResourcesAtTopLevel):
1865         (WI.SourcesNavigationSidebarPanel.prototype.get minimumWidth):
1866         (WI.SourcesNavigationSidebarPanel.prototype.closed):
1867         (WI.SourcesNavigationSidebarPanel.prototype.showDefaultContentView):
1868         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
1869         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
1870         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
1871         (WI.SourcesNavigationSidebarPanel.prototype.resetFilter):
1872         (WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
1873         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
1874         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
1875         (WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
1876         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
1877         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
1878         (WI.SourcesNavigationSidebarPanel.prototype._addTarget):
1879         (WI.SourcesNavigationSidebarPanel.prototype._findCallStackTargetTreeElement):
1880         (WI.SourcesNavigationSidebarPanel.prototype._updateCallStackTreeOutline):
1881         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
1882         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
1883         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
1884         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
1885         (WI.SourcesNavigationSidebarPanel.prototype._addDebuggerTreeElementForSourceCode):
1886         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
1887         (WI.SourcesNavigationSidebarPanel.prototype._compareBreakpointTreeElements):
1888         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
1889         (WI.SourcesNavigationSidebarPanel.prototype._removeBreakpoint):
1890         (WI.SourcesNavigationSidebarPanel.prototype._removeAllBreakpoints):
1891         (WI.SourcesNavigationSidebarPanel.prototype._toggleAllBreakpoints):
1892         (WI.SourcesNavigationSidebarPanel.prototype._breakpointsBeneathTreeElement):
1893         (WI.SourcesNavigationSidebarPanel.prototype._addIssue):
1894         (WI.SourcesNavigationSidebarPanel.prototype._removeDebuggerTreeElement):
1895         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
1896         (WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
1897         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
1898         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
1899         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonGotoArrow):
1900         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
1901         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceTypeScopeBarSelectionChanged):
1902         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
1903         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
1904         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked):
1905         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
1906         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceAdded):
1907         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
1908         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointAdded):
1909         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointRemoved):
1910         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointsEnabledDidChange):
1911         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptAdded):
1912         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptRemoved):
1913         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptsCleared):
1914         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
1915         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
1916         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):
1917         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerActiveCallFrameDidChange):
1918         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerWaitingToPause):
1919         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
1920         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateDidChange):
1921         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleIssueAdded):
1922         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleCleared):
1923         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
1924         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
1925         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
1926         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetAdded):
1927         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetRemoved):
1928         (WI.SourcesNavigationSidebarPanel.prototype._handleExtraDomainsActivated):
1929         * UserInterface/Views/SourcesNavigationSidebarPanel.css: Added.
1930         (.sidebar > .panel.navigation.sources > .content):
1931         (.sidebar > .panel.navigation.sources > .navigation-bar):
1932         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints):
1933         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints.activated):
1934         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume):
1935         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume.activated):
1936         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
1937         (.sidebar > .panel.navigation.sources > .content > .details-section):
1938         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
1939         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
1940         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)):
1941         (.sidebar > .panel.navigation.sources > .content > .navigation-bar):
1942         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread):
1943         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread):
1944         (@media (prefers-dark-interface) .sidebar > > .content > .panel.navigation.sources .warning-banner):
1945
1946         * UserInterface/Views/SourcesTabContentView.js: Added.
1947         (WI.SourcesTabContentView):
1948         (WI.SourcesTabContentView.tabInfo):
1949         (WI.SourcesTabContentView.isTabAllowed):
1950         (WI.SourcesTabContentView.prototype.get type):
1951         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
1952         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
1953         (WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
1954         (WI.SourcesTabContentView.prototype.showScopeChainDetailsSidebarPanel):
1955         (WI.SourcesTabContentView.prototype.revealAndSelectBreakpoint):
1956
1957         * UserInterface/Views/CanvasSidebarPanel.js:
1958         (WI.CanvasSidebarPanel):
1959         * UserInterface/Views/DebuggerSidebarPanel.js:
1960         (WI.DebuggerSidebarPanel):
1961         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
1962         * UserInterface/Views/NavigationSidebarPanel.js:
1963         (WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
1964         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
1965         (WI.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
1966         Rework `createContentTreeOutline` to allow for additional symbols.
1967         Add another symbol to ensure that the `WI.TreeOutline` is not used for cookie restoration.
1968
1969         * UserInterface/Protocol/InspectorFrontendAPI.js:
1970         (InspectorFrontendAPI.showResources):
1971         * UserInterface/Views/ContextMenuUtilities.js:
1972         (WI.appendContextMenuItemsForURL):
1973         * UserInterface/Views/DefaultDashboardView.js:
1974         (WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
1975         * UserInterface/Views/SourceCodeTextEditor.js:
1976         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1977
1978         * UserInterface/Views/TabBrowser.js:
1979         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
1980
1981         * UserInterface/Base/Main.js:
1982         (WI.contentLoaded):
1983         (WI.showSourcesTab): Added.
1984         (WI.isShowingSourcesTab): Added.
1985         (WI.tabContentViewClassForRepresentedObject):
1986         (WI._debuggerDidPause):
1987
1988         * UserInterface/Views/DebuggerTabContentView.js:
1989         (WI.DebuggerTabContentView.isTabAllowed):
1990         * UserInterface/Views/ResourcesTabContentView.js:
1991         (WI.ResourcesTabContentView.isTabAllowed):
1992
1993         * UserInterface/Base/Setting.js:
1994         * UserInterface/Views/SettingsTabContentView.js:
1995         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1996
1997         * UserInterface/Main.html:
1998         * UserInterface/Images/Sources.svg: Added.
1999         * Localizations/en.lproj/localizedStrings.js:
2000
2001 2019-02-24  Devin Rousso  <drousso@apple.com>
2002
2003         Web Inspector: Change the InspectorOverlay to use native rather than canvas
2004         https://bugs.webkit.org/show_bug.cgi?id=105023
2005         <rdar://problem/13443692>
2006
2007         Reviewed by Brian Burg.
2008
2009         * UserInterface/Base/Main.js:
2010         (WI.initializeTarget):
2011
2012         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
2013         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
2014         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
2015         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
2016         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
2017         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
2018         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
2019         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
2020         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
2021         * Versions/Inspector-iOS-10.0.json:
2022         * Versions/Inspector-iOS-10.3.json:
2023         * Versions/Inspector-iOS-11.0.json:
2024         * Versions/Inspector-iOS-11.3.json:
2025         * Versions/Inspector-iOS-12.0.json:
2026         * Versions/Inspector-iOS-12.2.json:
2027         * Versions/Inspector-iOS-8.0.json:
2028         * Versions/Inspector-iOS-9.0.json:
2029         * Versions/Inspector-iOS-9.3.json:
2030         Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.
2031
2032 2019-02-24  Devin Rousso  <drousso@apple.com>
2033
2034         Web Inspector: provide a way to make searches case sensitive or use a regular expression
2035         https://bugs.webkit.org/show_bug.cgi?id=192527
2036
2037         Reviewed by Joseph Pecoraro.
2038
2039         * UserInterface/Base/SearchUtilities.js: Added.
2040         (WI.SearchUtilities.get defaultSettings):
2041         (WI.SearchUtilities.createSettings):
2042         (WI.SearchUtilities.regExpForString):
2043         (WI.SearchUtilities.createSettingsButton):
2044         (WI.SearchUtilities.createSettingsButton.toggleActive):
2045         * UserInterface/Views/Main.css:
2046         (.search-settings): Added.
2047         (.search-settings > .glyph): Added.
2048         (.search-settings:active > .glyph): Added.
2049         (.search-settings.active > .glyph): Added.
2050         (.search-settings:active.active > .glyph): Added.
2051         Create static utility class for handling settings related to searching/filtering.
2052
2053         * UserInterface/Base/Setting.js:
2054         * UserInterface/Views/SettingsTabContentView.js:
2055         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2056         Create default search settings that apply across WebInspector, unless a more specific
2057         setting has been created that overrides it (e.g. the navigation sidebar or Search tab).
2058
2059         * UserInterface/Views/SearchSidebarPanel.js:
2060         (WI.SearchSidebarPanel):
2061         (WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
2062         (WI.SearchSidebarPanel.prototype.performSearch.resourceCallback):
2063         (WI.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
2064         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
2065         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts):
2066         (WI.SearchSidebarPanel.prototype.performSearch.domSearchResults):
2067         (WI.SearchSidebarPanel.prototype.performSearch.domCallback):
2068         (WI.SearchSidebarPanel.prototype.performSearch):
2069         * UserInterface/Views/SearchSidebarPanel.css:
2070         (.sidebar > .panel.navigation.search > .search-bar):
2071         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
2072         Add a (*) settings "gear" after each `<input type="search">` that shows a contextmenu with
2073         checkboxes for each search setting. Any settings changed for each input take precedence over
2074         the default settings, but will match the corresponding default setting if it's changed.
2075
2076         * UserInterface/Views/SearchResultTreeElement.js:
2077         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
2078         Use the length of the found text, rather than the length of the query.
2079
2080         * UserInterface/Views/DOMTreeElement.js:
2081         (WI.DOMTreeElement.prototype._highlightSearchResults):
2082         * UserInterface/Views/DataGrid.js:
2083         (WI.DataGrid.prototype._updateFilter):
2084         * UserInterface/Views/LogContentView.js:
2085         (WI.LogContentView.prototype.performSearch):
2086         * UserInterface/Views/NetworkTableContentView.js:
2087         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
2088         * UserInterface/Views/ResourceHeadersContentView.js:
2089         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
2090         * UserInterface/Views/ResourceSecurityContentView.js:
2091         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
2092         * UserInterface/Views/SourceCodeTextEditor.js:
2093         (WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
2094         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
2095         * UserInterface/Views/TextEditor.js:
2096         (WI.TextEditor.prototype.performSearch):
2097         Use the default search settings when searching/filtering.
2098
2099         * UserInterface/Views/SearchBar.css:
2100         (.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Added.
2101         Drive-by: prevent the (x) from appearing when no text has been entered.
2102
2103         * Localizations/en.lproj/localizedStrings.js:
2104         * UserInterface/Main.html:
2105
2106 2019-02-24  Devin Rousso  <drousso@apple.com>
2107
2108         Web Inspector: make debounce Proxy into its own class
2109         https://bugs.webkit.org/show_bug.cgi?id=194721
2110
2111         Reviewed by Joseph Pecoraro.
2112
2113         The `debounce`/`throttle` functions leveraged a `Proxy` to intercept the function call and
2114         replace it with a "delayed" version. The issue with this is that it set the identifier for
2115         the timer on the function itself, which is shared across all instances of a given class.
2116         When different instances call the same delayed function, they'd clobber eachother's attempts
2117         to delay work.
2118
2119         * UserInterface/Base/Debouncer.js: Added.
2120         (Debouncer):
2121         (Debouncer.prototype.force):
2122         (Debouncer.prototype.delayForTime):
2123         (Debouncer.prototype.delayForFrame):
2124         (Debouncer.prototype.delayForMicrotask):
2125         (Debouncer.prototype.cancel):
2126         (Debouncer.prototype._execute):
2127         * UserInterface/Base/Throttler.js: Added.
2128         (Throttler):
2129         (Throttler.prototype.force):
2130         (Throttler.prototype.fire):
2131         (Throttler.prototype.cancel):
2132         (Throttler.prototype._execute):
2133         * UserInterface/Base/Utilities.js:
2134
2135         * UserInterface/Views/BezierEditor.js:
2136         (WI.BezierEditor):
2137         * UserInterface/Views/ContentBrowser.js:
2138         (WI.ContentBrowser):
2139         (WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
2140         (WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
2141         (WI.ContentBrowser.prototype._currentContentViewDidChange):
2142         (WI.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Deleted.
2143         * UserInterface/Views/DOMTreeUpdater.js:
2144         (WI.DOMTreeUpdater):
2145         (WI.DOMTreeUpdater.prototype._nodeAttributeModified):
2146         (WI.DOMTreeUpdater.prototype._nodeInserted):
2147         (WI.DOMTreeUpdater.prototype._nodeRemoved):
2148         * UserInterface/Views/NavigationSidebarPanel.js:
2149         (WI.NavigationSidebarPanel):
2150         (WI.NavigationSidebarPanel.prototype.closed):
2151         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
2152         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
2153         (WI.NavigationSidebarPanel.prototype.updateFilter):
2154         (WI.NavigationSidebarPanel.prototype.shown):
2155         (WI.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
2156         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
2157         (WI.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
2158         * UserInterface/Views/RecordingContentView.js:
2159         (WI.RecordingContentView):
2160         (WI.RecordingContentView.prototype.updateActionIndex):
2161         (WI.RecordingContentView.prototype.hidden):
2162         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2163         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
2164         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
2165         (WI.ResourceDetailsSidebarPanel):
2166         * UserInterface/Views/ShaderProgramContentView.js:
2167         (WI.ShaderProgramContentView):
2168         * UserInterface/Views/SpringEditor.js:
2169         (WI.SpringEditor.prototype._resetPreviewAnimation):
2170         * UserInterface/Views/TreeElement.js:
2171         (WI.TreeElement.prototype.set hidden):
2172         (WI.TreeElement.prototype.didChange):
2173         (WI.TreeElement.prototype._attach):
2174         (WI.TreeElement.prototype._detach):
2175         (WI.TreeElement.prototype.collapse):
2176         (WI.TreeElement.prototype.expand):
2177         (WI.TreeElement.prototype.reveal):
2178         * UserInterface/Views/TreeOutline.js:
2179         (WI.TreeOutline):
2180         (WI.TreeOutline.prototype.registerScrollVirtualizer):
2181         (WI.TreeOutline.prototype.get updateVirtualizedElementsDebouncer): Added.
2182         (WI.TreeOutline.prototype._updateVirtualizedElements): Added.
2183         (WI.TreeOutline.prototype.updateVirtualizedElements.walk): Deleted.
2184         (WI.TreeOutline.prototype.updateVirtualizedElements): Deleted.
2185         * UserInterface/Views/WebSocketContentView.js:
2186         (WI.WebSocketContentView):
2187         (WI.WebSocketContentView.prototype.shown):
2188         (WI.WebSocketContentView.prototype._updateFramesSoon):
2189         (WI.WebSocketContentView.prototype._updateFrames):
2190
2191         * UserInterface/Main.html:
2192         * UserInterface/Test.html:
2193         * .eslintrc:
2194
2195 2019-02-24  Nikita Vasilyev  <nvasilyev@apple.com>
2196
2197         Unreviewed, fix indentation.
2198
2199         * UserInterface/Models/CSSStyleDeclaration.js:
2200         (WI.CSSStyleDeclaration.prototype.markModified):
2201
2202 2019-02-23  Keith Miller  <keith_miller@apple.com>
2203
2204         Add new mac target numbers
2205         https://bugs.webkit.org/show_bug.cgi?id=194955
2206
2207         Reviewed by Tim Horton.
2208
2209         * Configurations/Base.xcconfig:
2210         * Configurations/DebugRelease.xcconfig:
2211
2212 2019-02-22  Devin Rousso  <drousso@apple.com>
2213
2214         Web Inspector: Timelines: add UI for preventing auto-stop
2215         https://bugs.webkit.org/show_bug.cgi?id=194956
2216
2217         Reviewed by Joseph Pecoraro.
2218
2219         Add a checkbox to the navigation area of the Timelines tab that controls whether recordings
2220         automatically stop (e.g. after "load" or a period of inactivity).
2221
2222         * UserInterface/Views/TimelineRecordingContentView.js:
2223         (WI.TimelineRecordingContentView):
2224         (WI.TimelineRecordingContentView.prototype.get navigationItems):
2225         (WI.TimelineRecordingContentView.prototype._handleAutoStopCheckboxCheckedDidChange): Added.
2226         (WI.TimelineRecordingContentView.prototype._handleTimelinesAutoStopSettingChanged): Added.
2227
2228         * UserInterface/Controllers/TimelineManager.js:
2229         (WI.TimelineManager):
2230         (WI.TimelineManager.prototype.capturingStopped):
2231         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
2232         (WI.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
2233         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
2234         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
2235
2236         * UserInterface/Base/Setting.js:
2237         * Localizations/en.lproj/localizedStrings.js:
2238
2239 2019-02-22  Devin Rousso  <drousso@apple.com>
2240
2241         REGRESSION(r?): Web Inspector: Popovers have inset shadows
2242         https://bugs.webkit.org/show_bug.cgi?id=192963
2243         <rdar://problem/46888679>
2244
2245         Reviewed by Brian Burg.
2246
2247         * UserInterface/Views/Popover.js:
2248         (WI.Popover.prototype._drawBackground):
2249         (WI.Popover.prototype._drawBackground.isolate): Added.
2250         * UserInterface/Views/Popover.css:
2251         (.popover):
2252
2253 2019-02-22  Devin Rousso  <drousso@apple.com>
2254
2255         Web Inspector: Styles Redesign: clicking CSS property or selector should always select its text
2256         https://bugs.webkit.org/show_bug.cgi?id=180791
2257         <rdar://problem/36038366>
2258
2259         Reviewed by Brian Burg.
2260
2261         * UserInterface/Views/SpreadsheetSelectorField.js:
2262         (WI.SpreadsheetSelectorField):
2263         (WI.SpreadsheetSelectorField.prototype.startEditing):
2264         (WI.SpreadsheetSelectorField.prototype.stopEditing):
2265         (WI.SpreadsheetSelectorField.prototype._handleMouseDown): Added.
2266         (WI.SpreadsheetSelectorField.prototype._handleMouseUp): Added.
2267         (WI.SpreadsheetSelectorField.prototype._handleFocus): Deleted.
2268
2269         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2270         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2271         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2272         (.spreadsheet-css-declaration .selector.editing:focus, .spreadsheet-css-declaration .selector > .matched): Added.
2273         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
2274         (.spreadsheet-css-declaration .selector:focus, .spreadsheet-css-declaration .selector > .matched): Deleted.
2275
2276 2019-02-22  Nikita Vasilyev  <nvasilyev@apple.com>
2277
2278         Web Inspector: Dark Mode: DOM Content Loaded blue marker is too dark
2279         https://bugs.webkit.org/show_bug.cgi?id=194970
2280         <rdar://problem/48330126>
2281
2282         Reviewed by Joseph Pecoraro.
2283
2284         * UserInterface/Views/TimelineRuler.css:
2285         (@media (prefers-color-scheme: dark)):
2286         (.timeline-ruler > .markers > .marker.dom-content-event):
2287         Make the marker lighter for the dark mode.
2288
2289 2019-02-22  Joseph Pecoraro  <pecoraro@apple.com>
2290
2291         Web Inspector: Remove unused Timeline record selection code path
2292         https://bugs.webkit.org/show_bug.cgi?id=194931
2293
2294         Reviewed by Devin Rousso.
2295
2296         * UserInterface/Views/TimelineOverview.js:
2297         (WI.TimelineOverview):
2298         (WI.TimelineOverview.prototype.userSelectedRecord): Deleted.
2299         * UserInterface/Views/TimelineRecordingContentView.js:
2300         (WI.TimelineRecordingContentView):
2301         (WI.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord): Deleted.
2302         * UserInterface/Views/TimelineView.js:
2303         (WI.TimelineView.prototype.userSelectedRecordFromOverview): Deleted.
2304
2305 2019-02-21  Darin Adler  <darin@apple.com>
2306
2307         Some refinements for Node and Document
2308         https://bugs.webkit.org/show_bug.cgi?id=194764
2309
2310         Reviewed by Ryosuke Niwa.
2311
2312         * UserInterface/Models/NativeFunctionParameters.js: Removed getOverrideStyle
2313         because this deprecated non-working function is no longer something web authors
2314         should be thinking about or typing.
2315
2316 2019-02-21  Devin Rousso  <drousso@apple.com>
2317
2318         Web Inspector: Canvas: recordings with a single frame sometimes missing TreeElement
2319         https://bugs.webkit.org/show_bug.cgi?id=194687
2320
2321         Reviewed by Joseph Pecoraro.
2322
2323         * UserInterface/Views/CanvasSidebarPanel.js:
2324         (WI.CanvasSidebarPanel):
2325         Wait until the entire `Recording` has been processed before setting the selected action.
2326
2327         * UserInterface/Views/CanvasSidebarPanel.css:
2328         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
2329         Drive-by: ensure that the recording `TreeOutline` container element has the full height to
2330         take advantage of for virtualization.
2331
2332         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
2333         (WI.RecordingStateDetailsSidebarPanel.prototype.set recording):
2334         Drive-by: clear the `DataGrid` list when changing recordings since we removed all subviews.
2335
2336 2019-02-21  Devin Rousso  <drousso@apple.com>
2337
2338         Web Inspector: DOM Debugger: node-specific event breakpoints aren't cleared/recalculated on navigation
2339         https://bugs.webkit.org/show_bug.cgi?id=194874
2340         <rdar://problem/48253415>
2341
2342         Reviewed by Joseph Pecoraro.
2343
2344         * UserInterface/Controllers/DOMManager.js:
2345         (WI.DOMManager.prototype._setDocument):
2346         (WI.DOMManager.prototype.removeBreakpointForEventListener):
2347
2348 2019-02-21  Devin Rousso  <drousso@apple.com>
2349
2350         Web Inspector: macOS user agent option should be available in device settings menu
2351         https://bugs.webkit.org/show_bug.cgi?id=194885
2352         <rdar://problem/48259253>
2353
2354         Reviewed by Joseph Pecoraro.
2355
2356         * UserInterface/Base/Main.js:
2357         (WI._handleDeviceSettingsToolbarButtonClicked):
2358
2359 2019-02-20  Joseph Pecoraro  <pecoraro@apple.com>
2360
2361         Web Inspector: RTL: Scripts Timeline loading indicator has incorrect margins
2362         https://bugs.webkit.org/show_bug.cgi?id=194882
2363
2364         Reviewed by Matt Baker.
2365
2366         * UserInterface/Views/TimelineRecordingContentView.css:
2367         (.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
2368
2369 2019-02-20  Andy Estes  <aestes@apple.com>
2370
2371         [Xcode] Add SDKVariant.xcconfig to various Xcode projects
2372         https://bugs.webkit.org/show_bug.cgi?id=194869
2373
2374         Rubber-stamped by Jer Noble.
2375
2376         * WebInspectorUI.xcodeproj/project.pbxproj:
2377
2378 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2379
2380         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
2381         https://bugs.webkit.org/show_bug.cgi?id=172848
2382         <rdar://problem/25709212>
2383
2384         Reviewed by Mark Lam.
2385
2386         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2387         (HeapSnapshot):
2388         Support the new snapshot version. The only thing that changes are the
2389         node flags, and its actually completely compatible with version 1.
2390
2391         (HeapSnapshot.updateCategoriesAndMetadata):
2392         List the count of object type instances in each class category.
2393
2394         (HeapSnapshot.prototype.serializeNode):
2395         Include whether or not the node is an object type.
2396
2397         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
2398         (WebInspector.HeapSnapshotNodeProxy):
2399         (WebInspector.HeapSnapshotNodeProxy.deserialize):
2400         Add a new Node isObjectType property based on the new data.
2401
2402         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
2403         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
2404         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2405         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
2406         If a class contains 50% or more object type instances then treat it as such
2407         instead of defaulting to native.
2408
2409         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2410         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
2411         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2412         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2413         We can be more specific than the default if the individual instance is
2414         known to be an object type.
2415
2416 2019-02-19  Truitt Savell  <tsavell@apple.com>
2417
2418         Unreviewed, rolling out r241784.
2419
2420         Broke all OpenSource builds.
2421
2422         Reverted changeset:
2423
2424         "Web Inspector: Improve ES6 Class instances in Heap Snapshot
2425         instances view"
2426         https://bugs.webkit.org/show_bug.cgi?id=172848
2427         https://trac.webkit.org/changeset/241784
2428
2429 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2430
2431         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
2432         https://bugs.webkit.org/show_bug.cgi?id=172848
2433         <rdar://problem/25709212>
2434
2435         Reviewed by Mark Lam.
2436
2437         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2438         (HeapSnapshot):
2439         Support the new snapshot version. The only thing that changes are the
2440         node flags, and its actually completely compatible with version 1.
2441
2442         (HeapSnapshot.updateCategoriesAndMetadata):
2443         List the count of object type instances in each class category.
2444
2445         (HeapSnapshot.prototype.serializeNode):
2446         Include whether or not the node is an object type.
2447
2448         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
2449         (WebInspector.HeapSnapshotNodeProxy):
2450         (WebInspector.HeapSnapshotNodeProxy.deserialize):
2451         Add a new Node isObjectType property based on the new data.
2452
2453         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
2454         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
2455         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2456         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
2457         If a class contains 50% or more object type instances then treat it as such
2458         instead of defaulting to native.
2459
2460         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2461         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
2462         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2463         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2464         We can be more specific than the default if the individual instance is
2465         known to be an object type.
2466
2467 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2468
2469         Web Inspector: Scripts timeline on-going-recording text looks poor in dark mode
2470         https://bugs.webkit.org/show_bug.cgi?id=194809
2471
2472         Reviewed by Matt Baker.
2473
2474         * UserInterface/Views/TimelineRecordingContentView.css:
2475         (.content-view.timeline-recording > .content-browser .recording-progress > .status):
2476
2477 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
2478
2479         Web Inspector: Provide a way to avoid a recording auto-stop on reload
2480         https://bugs.webkit.org/show_bug.cgi?id=194793
2481
2482         Reviewed by Matt Baker.
2483
2484         * Localizations/en.lproj/localizedStrings.js:
2485         New tooltip.
2486
2487         * UserInterface/Controllers/TimelineManager.js:
2488         (WI.TimelineManager.prototype.willAutoStop):
2489         (WI.TimelineManager.prototype.relaxAutoStop):
2490         Getter and relaxer for auto stop behavior.
2491
2492         * UserInterface/Views/AuditNavigationSidebarPanel.js:
2493         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
2494         Drive-by fix some whitespace issues.
2495
2496         * UserInterface/Views/TimelineTabContentView.js:
2497         (WI.TimelineTabContentView):
2498         (WI.TimelineTabContentView.prototype._showRecordButton):
2499         (WI.TimelineTabContentView.prototype._showContinueButton):
2500         (WI.TimelineTabContentView.prototype._updateNavigationBarButtons):
2501         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped):
2502         (WI.TimelineTabContentView.prototype._globalModifierKeysDidChange):
2503         (WI.TimelineTabContentView.prototype._continueButtonClicked):
2504         Show a "continue" like icon instead of the usual stop button when
2505         a recording would auto-stop and the alt key is down. When pressed
2506         this button will relax the auto-stop and continue the recording
2507         until explicitly stopped by the user.
2508
2509 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
2510
2511         Web Inspector: Fix a typo causing assertions in ConsoleManager
2512         https://bugs.webkit.org/show_bug.cgi?id=194792
2513
2514         Reviewed by Matt Baker.
2515
2516         * UserInterface/Controllers/ConsoleManager.js:
2517         (WI.ConsoleManager.prototype.initializeLogChannels):
2518         Extra comma produced an undefined value in the list.
2519
2520 2019-02-18  Nikita Vasilyev  <nvasilyev@apple.com>
2521
2522         Web Inspector: Styles: typing ";" shouldn't focus on the next property when there's open parenthesis or comment
2523         https://bugs.webkit.org/show_bug.cgi?id=194789
2524
2525         Reviewed by Matt Baker.
2526
2527         * UserInterface/Views/SpreadsheetStyleProperty.js:
2528         (WI.SpreadsheetStyleProperty.prototype._handleValueBeforeInput):
2529
2530 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
2531
2532         Web Inspector: Better categorize CPU usage per-thread / worker
2533         https://bugs.webkit.org/show_bug.cgi?id=194564
2534
2535         Reviewed by Devin Rousso.
2536
2537         * UserInterface/Controllers/TimelineManager.js:
2538         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
2539         * UserInterface/Models/CPUTimelineRecord.js:
2540         (WI.CPUTimelineRecord.prototype.get mainThreadUsage):
2541         (WI.CPUTimelineRecord.prototype.get webkitThreadUsage):
2542         (WI.CPUTimelineRecord.prototype.get workerThreadUsage):
2543         (WI.CPUTimelineRecord.prototype.get unknownThreadUsage):
2544         Build a better record from the protocol events.
2545
2546 2019-02-18  Devin Rousso  <drousso@apple.com>
2547
2548         Web Inspector: duplicate left double quotation mark (\u201C) in 'Unable to show certificate for ā€œ%sā€œ.'
2549         https://bugs.webkit.org/show_bug.cgi?id=194782
2550         <rdar://problem/48159683>
2551
2552         Reviewed by Joseph Pecoraro.
2553
2554         * UserInterface/Models/Resource.js:
2555         (WI.Resource.prototype.async showCertificate):
2556         * Localizations/en.lproj/localizedStrings.js:
2557
2558 2019-02-18  Eric Carlson  <eric.carlson@apple.com>
2559
2560         Add MSE logging configuration
2561         https://bugs.webkit.org/show_bug.cgi?id=194719
2562         <rdar://problem/48122151>
2563
2564         Reviewed by Joseph Pecoraro.
2565
2566         * Localizations/en.lproj/localizedStrings.js:
2567         * UserInterface/Models/ConsoleMessage.js:
2568         * UserInterface/Models/IssueMessage.js:
2569         (WI.IssueMessage):
2570         * UserInterface/Views/LogContentView.js:
2571         (WI.LogContentView):
2572         * UserInterface/Views/SettingsTabContentView.js:
2573         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2574
2575 2019-02-17  Nikita Vasilyev  <nvasilyev@apple.com>
2576
2577         Web Inspector: Move CSS completion logic from SpreadsheetTextField to SpreadsheetStyleProperty
2578         https://bugs.webkit.org/show_bug.cgi?id=194724
2579
2580         Reviewed by Devin Rousso.
2581
2582         Move CSS value completion logic from SpreadsheetTextField, a generic text field,
2583         to SpreadsheetStyleProperty.
2584
2585         * UserInterface/Views/SpreadsheetStyleProperty.js:
2586         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
2587         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
2588
2589         * UserInterface/Views/SpreadsheetTextField.js:
2590         (WI.SpreadsheetTextField):
2591         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
2592         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
2593         (WI.SpreadsheetTextField.prototype._updateCompletions):
2594         (WI.SpreadsheetTextField.prototype._showSuggestionsView):
2595         (WI.SpreadsheetTextField.prototype._getCompletionPrefix): Deleted.
2596
2597 2019-02-17  Matt Baker  <mattbaker@apple.com>
2598
2599         Web Inspector: Frontend performance is very slow reloading theverge.com - 50% of time in TreeOutline _indexOfTreeElement
2600         https://bugs.webkit.org/show_bug.cgi?id=193605
2601         <rdar://problem/47403986>
2602
2603         Reviewed by Devin Rousso.
2604
2605         SelectionController should track an unordered Set of represented objects
2606         instead of an ordered set of indexes. This eliminates the costly and
2607         error-prone updates needed to keep the selected indexes in sync as items
2608         are added and removed from TreeOutline (and Table, to a far lesser extent).
2609
2610         The SelectionController interface is largely the same. Class and delegate
2611         methods have been renamed to reflect the change from indexes to objects.
2612         SelectionController tracks selected items in selection order. For the
2613         operations that rely on objects being in insertion order, the controller
2614         uses a comparator function provided at construction time.
2615
2616         * UserInterface/Base/IndexSet.js: Removed.
2617         No longer used. SelectionController now uses a plain Set.
2618
2619         * UserInterface/Base/Utilities.js:
2620         (value):
2621         (get return):
2622         Add utilities previously supplied by IndexSet and used by SelectionController.
2623
2624         * UserInterface/Controllers/SelectionController.js:
2625         (WI.SelectionController):
2626         (WI.SelectionController.prototype.get lastSelectedItem):
2627         (WI.SelectionController.prototype.get selectedItems):
2628         (WI.SelectionController.prototype.set allowsMultipleSelection):
2629         (WI.SelectionController.prototype.hasSelectedItem):
2630         (WI.SelectionController.prototype.selectItem):
2631         (WI.SelectionController.prototype.deselectItem):
2632         (WI.SelectionController.prototype.selectAll):
2633         (WI.SelectionController.prototype.deselectAll):
2634         (WI.SelectionController.prototype.removeSelectedItems):
2635         (WI.SelectionController.prototype.reset):
2636         (WI.SelectionController.prototype.didRemoveItems):
2637         (WI.SelectionController.prototype.handleKeyDown):
2638         (WI.SelectionController.prototype.handleItemMouseDown):
2639         (WI.SelectionController.prototype._deselectAllAndSelect):
2640         (WI.SelectionController.prototype._selectItemsFromArrowKey):
2641         (WI.SelectionController.prototype._firstSelectableItem):
2642         (WI.SelectionController.prototype._lastSelectableItem):
2643         (WI.SelectionController.prototype._previousSelectableItem):
2644         (WI.SelectionController.prototype._nextSelectableItem):
2645         (WI.SelectionController.prototype._updateSelectedItems):
2646         (WI.SelectionController.prototype._addRange):
2647         (WI.SelectionController.prototype._deleteRange):
2648         (WI.SelectionController.prototype.get numberOfItems): Deleted.
2649         (WI.SelectionController.prototype.didInsertItem): Deleted.
2650         (WI.SelectionController.prototype.handleItemMouseDown.normalizeRange): Deleted.
2651         (WI.SelectionController.prototype._nextSelectableIndex): Deleted.
2652         (WI.SelectionController.prototype._previousSelectableIndex): Deleted.
2653
2654         * UserInterface/Main.html:
2655         * UserInterface/Test.html:
2656         Remove IndexSet.
2657
2658         * UserInterface/Views/CookieStorageContentView.js:
2659         (WI.CookieStorageContentView.prototype.tableIndexForRepresentedObject):
2660         (WI.CookieStorageContentView.prototype.tableRepresentedObjectForIndex):
2661
2662         * UserInterface/Views/DOMTreeOutline.js:
2663         (WI.DOMTreeOutline.prototype.objectForSelection):
2664
2665         * UserInterface/Views/NetworkTableContentView.js:
2666         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
2667         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
2668
2669         * UserInterface/Views/Table.js:
2670         (WI.Table):
2671         (WI.Table.prototype.get selectedRow):
2672         (WI.Table.prototype.get selectedRows):
2673         (WI.Table.prototype.isRowSelected):
2674         (WI.Table.prototype.selectRow):
2675         (WI.Table.prototype.deselectRow):
2676         (WI.Table.prototype.removeRow):
2677         (WI.Table.prototype.removeSelectedRows):
2678         (WI.Table.prototype.selectionControllerSelectionDidChange):
2679         (WI.Table.prototype.selectionControllerFirstSelectableItem):
2680         (WI.Table.prototype.selectionControllerLastSelectableItem):
2681         (WI.Table.prototype.selectionControllerPreviousSelectableItem):
2682         (WI.Table.prototype.selectionControllerNextSelectableItem):
2683         (WI.Table.prototype._handleMouseDown):
2684         (WI.Table.prototype._removeRows):
2685         (WI.Table.prototype._indexForRepresentedObject):
2686         (WI.Table.prototype._representedObjectForIndex):
2687         (WI.Table.prototype.selectionControllerNumberOfItems): Deleted.
2688         (WI.Table.prototype.selectionControllerNextSelectableIndex): Deleted.
2689         (WI.Table.prototype.selectionControllerPreviousSelectableIndex): Deleted.
2690         (WI.Table.prototype._toggleSelectedRowStyle): Deleted.
2691
2692         * UserInterface/Views/TreeOutline.js:
2693         (WI.TreeOutline.compareSiblings):
2694         (WI.TreeOutline):
2695         (WI.TreeOutline.prototype.get selectedTreeElement):
2696         (WI.TreeOutline.prototype.set selectedTreeElement):
2697         (WI.TreeOutline.prototype.get selectedTreeElements):
2698         (WI.TreeOutline.prototype.removeChildAtIndex):
2699         (WI.TreeOutline.prototype.removeChildren):
2700         (WI.TreeOutline.prototype._rememberTreeElement):
2701         (WI.TreeOutline.prototype.getCachedTreeElement):
2702         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
2703         (WI.TreeOutline.prototype.selectionControllerFirstSelectableItem):
2704         (WI.TreeOutline.prototype.selectionControllerLastSelectableItem):
2705         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
2706         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
2707         (WI.TreeOutline.prototype.objectForSelection):
2708         (WI.TreeOutline._generateStyleRulesIfNeeded):
2709         (WI.TreeOutline.prototype.selectionControllerNextSelectableIndex): Deleted.
2710         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableIndex): Deleted.
2711         (WI.TreeOutline._generateStyleRulesIfNeeded._indexesForSubtree.numberOfElementsInSubtree): Deleted.
2712
2713 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
2714
2715         Web Inspector: Logging a native function to the console, such as `alert`, produces unhandled rejection
2716         https://bugs.webkit.org/show_bug.cgi?id=194740
2717
2718         Reviewed by Matt Baker.
2719
2720         * UserInterface/Protocol/RemoteObject.js:
2721         (WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
2722         In case of a protocol error (common when attempting to get a location
2723         for a native function) produce the NoSourceFound result.
2724
2725         * UserInterface/Views/ConsoleMessageView.js:
2726         (WI.ConsoleMessageView.prototype._appendLocationLink):
2727         Simplify with an arrow function.
2728
2729 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
2730
2731         Web Inspector: Some timelines views work, show Legacy CPU timeline
2732         https://bugs.webkit.org/show_bug.cgi?id=194738
2733
2734         Reviewed by Yusuke Suzuki.
2735
2736         * UserInterface/Views/ContentView.js:
2737         (WI.ContentView.createFromRepresentedObject):
2738
2739 2019-02-15  Aaron Chu  <aaron_chu@apple.com>
2740
2741         AX: Audit tab should have built-in accessibility tests.
2742         https://bugs.webkit.org/show_bug.cgi?id=194005
2743         <rdar://problem/47657503>
2744
2745         Updated built-in accessibility audits test suite.
2746
2747         Reviewed by Devin Rousso.
2748
2749         * Localizations/en.lproj/localizedStrings.js:
2750         * UserInterface/Controllers/AuditManager.js:
2751         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2752         (WI.AuditManager):
2753         (WI.AuditManager.prototype.addDefaultTestsIfNeeded.): Deleted.
2754
2755 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
2756
2757         Web Inspector: Dark Mode: commas in CSS selectors are too dim
2758         https://bugs.webkit.org/show_bug.cgi?id=194729
2759         <rdar://problem/48128592>
2760
2761         Reviewed by Matt Baker.
2762
2763         Use `--text-color-tertiary` for both light and dark modes.
2764
2765         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2766         (.spreadsheet-style-declaration-editor):
2767         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2768         (.spreadsheet-css-declaration):
2769         (.spreadsheet-css-declaration .selector > span):
2770         (@media (prefers-color-scheme: dark)):
2771         * UserInterface/Views/Variables.css:
2772         (:root):
2773
2774 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
2775
2776         Unreviewed, fix intentation.
2777
2778         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
2779         (.sidebar > .panel.details.css-style .rules):
2780         (.sidebar > .panel.details.css-style > .content > .rules .section-header):
2781
2782 2019-02-15  Dean Jackson  <dino@apple.com>
2783
2784         Allow emulation of user gestures from Web Inspector console
2785         https://bugs.webkit.org/show_bug.cgi?id=194725
2786         <rdar://problem/48126604>
2787
2788         Reviewed by Joseph Pecoraro and Devin Rousso.
2789
2790         Add some UI for emulating a User Gesture when evaluating in the console. This
2791         allows the developer to do things that would otherwise require actual interaction
2792         with the page, such as start playback of media on iOS.
2793
2794         * Localizations/en.lproj/localizedStrings.js:
2795         * UserInterface/Base/Setting.js: Add a new setting for this option.
2796         * UserInterface/Controllers/JavaScriptLogViewController.js:
2797         (WI.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
2798         * UserInterface/Controllers/RuntimeManager.js: Call evaluate with this new option.
2799         (WI.RuntimeManager.prototype.evaluateInInspectedWindow):
2800         * UserInterface/Views/LogContentView.js: Add a new checkbox in the upper bar
2801         that allows the user to toggle the setting.
2802         (WI.LogContentView):
2803         (WI.LogContentView.prototype.get navigationItems):
2804         (WI.LogContentView.prototype._handleEmulateInUserGestureSettingChanged):
2805
2806         * UserInterface/Views/NetworkTableContentView.js: Two drive-by typo fixes :)
2807         (WI.NetworkTableContentView): perserve -> preserve
2808         (WI.NetworkTableContentView.prototype.get navigationItems): checkboxs -> checkboxes
2809
2810 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
2811
2812         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
2813         https://bugs.webkit.org/show_bug.cgi?id=194619
2814         <rdar://problem/47917373>
2815
2816         Reviewed by Devin Rousso.
2817
2818         Payload of inline styles may contain `range` that doesn't match
2819         the actual text of the payload - it has an extra empty line at the end.
2820         Mismatching ranges caused data corruption.
2821
2822         * UserInterface/Models/DOMNodeStyles.js:
2823         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
2824
2825 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
2826
2827         Web Inspector: remove unused parameter in _parseStylePropertyPayload
2828         https://bugs.webkit.org/show_bug.cgi?id=194642
2829
2830         Reviewed by Devin Rousso.
2831
2832         * UserInterface/Models/DOMNodeStyles.js:
2833         (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
2834         The `styleText` parameter was never used
2835
2836 2019-02-15  Devin Rousso  <drousso@apple.com>
2837
2838         Web Inspector: Canvas: all actions after an offscreen path modification are marked as offscreen path errors
2839         https://bugs.webkit.org/show_bug.cgi?id=194684
2840
2841         Reviewed by Joseph Pecoraro.
2842
2843         * UserInterface/Models/RecordingAction.js:
2844         (WI.RecordingAction.prototype.process):
2845
2846 2019-02-15  Devin Rousso  <drousso@apple.com>
2847
2848         Web Inspector: Canvas: taking a second recording doesn't select the Initial State by default
2849         https://bugs.webkit.org/show_bug.cgi?id=194685
2850
2851         Reviewed by Matt Baker.
2852
2853         * UserInterface/Views/CanvasSidebarPanel.js:
2854         (WI.CanvasSidebarPanel.prototype._recordingChanged):
2855
2856 2019-02-14  Commit Queue  <commit-queue@webkit.org>
2857
2858         Unreviewed, rolling out r241497.
2859         https://bugs.webkit.org/show_bug.cgi?id=194676
2860
2861         New test times out (Requested by NVI on #webkit).
2862
2863         Reverted changeset:
2864
2865         "Web Inspector: Styles: valid values in style attributes are
2866         reported as unsupported property values"
2867         https://bugs.webkit.org/show_bug.cgi?id=194619
2868         https://trac.webkit.org/changeset/241497
2869
2870 2019-02-13  Nikita Vasilyev  <nvasilyev@apple.com>
2871
2872         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
2873         https://bugs.webkit.org/show_bug.cgi?id=194619
2874         <rdar://problem/47917373>
2875
2876         Reviewed by Devin Rousso.
2877
2878         Payload of inline styles may contain `range` that doesn't match
2879         the actual text of the payload - it has an extra empty line at the end.
2880         Mismatching ranges caused data corruption.
2881
2882         * UserInterface/Models/DOMNodeStyles.js:
2883         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
2884
2885 2019-02-13  Joseph Pecoraro  <pecoraro@apple.com>
2886
2887         Web Inspector: Update combined and minified copyright header for 2018-2019
2888         https://bugs.webkit.org/show_bug.cgi?id=194635
2889
2890         Reviewed by Devin Rousso.
2891
2892         * Scripts/copy-user-interface-resources.pl:
2893
2894 2019-02-13  Chris Dumez  <cdumez@apple.com>
2895
2896         Unreviewed, update localizable strings.
2897
2898         * Localizations/en.lproj/localizedStrings.js:
2899
2900 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2901
2902         Web Inspector: Experimental setting for CPU Usage Timeline improvements
2903         https://bugs.webkit.org/show_bug.cgi?id=194556
2904
2905         Reviewed by Matt Baker.
2906
2907         * UserInterface/Main.html:
2908         * UserInterface/Views/LegacyCPUTimelineView.css: Added.
2909         * UserInterface/Views/LegacyCPUTimelineView.js: Added.
2910         Copy of CPUTimelineView.js/css to be used when the setting is not set.
2911
2912         * UserInterface/Views/ContentView.js:
2913         (WI.ContentView.createFromRepresentedObject):
2914         ContentView to create based on the setting.
2915
2916         * UserInterface/Base/Setting.js:
2917         * UserInterface/Views/SettingsTabContentView.js:
2918         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2919         Experimental switch.
2920
2921 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2922
2923         Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most records do not have
2924         https://bugs.webkit.org/show_bug.cgi?id=194549
2925
2926         Reviewed by Devin Rousso.
2927
2928         * UserInterface/Models/Timeline.js:
2929         (WI.Timeline.prototype.recordsInTimeRange):
2930
2931 2019-02-12  Devin Rousso  <drousso@apple.com>
2932
2933         Web Inspector: Timelines: clicking on an empty space in the overview should deselect any selected record bar
2934         https://bugs.webkit.org/show_bug.cgi?id=194365
2935         <rdar://problem/47868426>
2936
2937         Reviewed by Joseph Pecoraro.
2938
2939         * UserInterface/Views/TimelineRecordBar.js:
2940         (WI.TimelineRecordBar.prototype._handleClick):
2941         Mark the "click" event so that later listeners know it was handled by `WI.TimelineRecordBar`.
2942
2943         * UserInterface/Views/TimelineOverview.js:
2944         (WI.TimelineOverview):
2945         (WI.TimelineOverview.prototype._instrumentAdded):
2946         (WI.TimelineOverview.prototype._instrumentRemoved):
2947         (WI.TimelineOverview.prototype._handleGraphsContainerClick): Added.
2948         (WI.TimelineOverview.prototype._handleOverviewGraphRecordSelected): Added.
2949         (WI.TimelineOverview.prototype._recordSelected):
2950         Listen for "click" on the graph container and deselect all records when fired, unless the
2951         click was marked by a `WI.TimelineRecordBar`.
2952
2953         * UserInterface/Views/TimelineRecordingContentView.js:
2954         (WI.TimelineRecordingContentView.prototype._recordSelected):
2955         Ensure that all `WI.TimelineView` update their selected record whenever it changes for any
2956         other `WI.TimelineView` (or if there is no selected record).
2957
2958         * UserInterface/Views/TimelineOverviewGraph.js:
2959         (WI.TimelineOverviewGraph.prototype.didLayoutSubtree): Added.
2960         Drive-by: since `WI.TimelineRecordBar` are reused when combining, we need to re-determine
2961         which one holds the currently selected record.
2962
2963 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2964
2965         Web Inspector: Remove unused maxUsage in CPUTimelineView
2966         https://bugs.webkit.org/show_bug.cgi?id=194526
2967
2968         Reviewed by Devin Rousso.
2969
2970         * UserInterface/Views/CPUTimelineView.js:
2971         (WI.CPUTimelineView):
2972         (WI.CPUTimelineView.prototype.shown):
2973
2974 2019-02-11  Devin Rousso  <drousso@apple.com>
2975
2976         Web Inspector: add context menu items to copy a resource's HTTP request/response data
2977         https://bugs.webkit.org/show_bug.cgi?id=194261
2978         <rdar://problem/21693696>
2979
2980         Reviewed by Joseph Pecoraro.
2981
2982         * UserInterface/Models/Resource.js:
2983         (WI.Resource.prototype.stringifyHTTPRequest): Added.
2984         (WI.Resource.prototype.stringifyHTTPResponse): Added.
2985         Don't include the request/response data, as that can be very large, and can easily be
2986         accessed by actually selecting the resource in the Resources/Network tab.
2987
2988         * UserInterface/Views/ContextMenuUtilities.js:
2989         (WI.appendContextMenuItemsForSourceCode):
2990
2991         * Localizations/en.lproj/localizedStrings.js:
2992
2993 2019-02-08  Devin Rousso  <drousso@apple.com>
2994
2995         Web Inspector: Audit: show keyboard shortcut in export tooltip
2996         https://bugs.webkit.org/show_bug.cgi?id=194454
2997
2998         Reviewed by Matt Baker.
2999
3000         * UserInterface/Views/AuditTestContentView.js:
3001         (WI.AuditTestContentView):
3002         (WI.AuditTestContentView.prototype.get saveData):
3003         (WI.AuditTestContentView.prototype._exportResult): Added.
3004         (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
3005         (WI.AuditTestContentView.prototype._exportAudit): Deleted.
3006
3007         * Localizations/en.lproj/localizedStrings.js:
3008
3009 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
3010
3011         Web Inspector: Styles: easier way to select a single line
3012         https://bugs.webkit.org/show_bug.cgi?id=193305
3013
3014         Reviewed by Devin Rousso.
3015
3016         Start property selection after mousedown when mouse cursor moves 8px,
3017         which is ~1.5 times the width of a text character in the style editor.
3018
3019         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3020         (WI.SpreadsheetCSSStyleDeclarationSection):
3021         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
3022         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
3023         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
3024
3025 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
3026
3027         Web Inspector: Debugger Popover should work with value in template string `${identifier}`
3028         https://bugs.webkit.org/show_bug.cgi?id=194459
3029         <rdar://problem/47932564>
3030
3031         Reviewed by Devin Rousso.
3032
3033         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
3034         (WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
3035         When walking backwards to get the full expression we were walking outside
3036         of the interpolation group `outside ${inside}`. Stop walking backwards once
3037         we cross the boundary.
3038
3039 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
3040
3041         Web Inspector: Import / Export Heap Snapshots
3042         https://bugs.webkit.org/show_bug.cgi?id=194448
3043         <rdar://problem/47928093>
3044
3045         Reviewed by Devin Rousso.
3046
3047         * Localizations/en.lproj/localizedStrings.js:
3048         New strings.
3049
3050         * UserInterface/Proxies/HeapSnapshotProxy.js:
3051         (WI.HeapSnapshotProxy):
3052         (WI.HeapSnapshotProxy.deserialize):
3053         (WI.HeapSnapshotProxy.prototype.get imported):
3054         (WI.HeapSnapshotProxy.prototype.get snapshotStringData):
3055         (WI.HeapSnapshotProxy.prototype.set snapshotStringData):
3056         Include an "imported" state on the HeapSnapshot and allow for
3057         stashing the snapshotStringData on the main thread side.
3058
3059         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
3060         (WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):
3061         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
3062         (HeapSnapshotWorker.prototype.clearSnapshots):
3063         (HeapSnapshotWorker.prototype.createSnapshot):
3064         Provide a specialized way to create an imported HeapSnapshot.
3065         Track imported snapshots separately since they won't want to
3066         be searched for live/dead objects due to active recording GCs.
3067
3068         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
3069         (HeapSnapshot):
3070         (HeapSnapshot.updateCategoriesAndMetadata):
3071         (HeapSnapshot.allocationBucketCounts):
3072         (HeapSnapshot.instancesWithClassName):
3073         (HeapSnapshot.prototype.nodeWithIdentifier):
3074         (HeapSnapshot.prototype.dominatedNodes):
3075         (HeapSnapshot.prototype.retainedNodes):
3076         (HeapSnapshot.prototype.retainers):
3077         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
3078         (HeapSnapshot.prototype.serialize):
3079         (HeapSnapshot.prototype.serializeNode):
3080         (HeapSnapshot.prototype._buildPostOrderIndexes):
3081         (HeapSnapshot.prototype._buildDominatorIndexes):
3082         (HeapSnapshot.prototype._buildRetainedSizes):
3083         (HeapSnapshot.prototype._gcRootPathes.visitNode):
3084         (HeapSnapshot.prototype._gcRootPathes):
3085         Construct a HeapSnapshot knowinng whether or not it is imported.
3086         Imported snapshots may be the "GCDebugging" snapshot type which
3087         differs from "Inspector" by the number of node fields. So keep
3088         the node field count a member instead of a global constant
3089         in order to work with both snapshot types.
3090
3091         * UserInterface/Models/HeapAllocationsInstrument.js:
3092         (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
3093         * UserInterface/Protocol/ConsoleObserver.js:
3094         (WI.ConsoleObserver.prototype.heapSnapshot):
3095         * UserInterface/Protocol/HeapObserver.js:
3096         (WI.HeapObserver.prototype.trackingStart):
3097         (WI.HeapObserver.prototype.trackingComplete):
3098         Stash the original string JSON data on the main thread side
3099         where we already have the data.
3100
3101         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
3102         (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
3103         Don't show [S] icons for imported snapshots with no timestamp.
3104
3105         * UserInterface/Views/HeapAllocationsTimelineView.js:
3106         (WI.HeapAllocationsTimelineView):
3107         (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
3108         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
3109         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
3110         Import button that just creates a new snapshot.
3111
3112         * UserInterface/Views/HeapSnapshotContentView.js:
3113         (WI.HeapSnapshotContentView):
3114         (WI.HeapSnapshotContentView.prototype.get navigationItems):
3115         (WI.HeapSnapshotContentView.prototype.get supportsSave):
3116         (WI.HeapSnapshotContentView.prototype.get saveData):
3117         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
3118         Export button that saves the original data.
3119
3120         * UserInterface/Views/TimelineTabContentView.js:
3121         (WI.TimelineTabContentView.displayNameForRecord):
3122         Specialized display string for imported snapshots.
3123
3124 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
3125
3126         Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
3127         https://bugs.webkit.org/show_bug.cgi?id=194445
3128
3129         Reviewed by Devin Rousso.
3130
3131         * UserInterface/Base/Setting.js:
3132         * UserInterface/Views/HeapSnapshotDataGridTree.js:
3133         (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
3134         * UserInterface/Views/SettingsTabContentView.js:
3135         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
3136
3137 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
3138
3139         Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
3140         https://bugs.webkit.org/show_bug.cgi?id=182523
3141         <rdar://problem/37260209>
3142
3143         Reviewed by Devin Rousso.
3144
3145         Close CSS comments, append missing closed quotes and right parenthesis.
3146
3147         * UserInterface/Models/CSSCompletions.js:
3148         (WI.CSSCompletions.completeUnbalancedValue):
3149         * UserInterface/Models/CSSProperty.js:
3150         (WI.CSSProperty.prototype.set rawValue):
3151
3152 2019-02-07  Joseph Pecoraro  <pecoraro@apple.com>
3153
3154         Web Inspector: Make Timeline markers light gray instead of black in dark mode
3155         https://bugs.webkit.org/show_bug.cgi?id=194417
3156
3157         Reviewed by Devin Rousso.
3158
3159         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
3160         (.timeline-overview-graph.rendering-frame > .divider):
3161         * UserInterface/Views/TimelineRuler.css:
3162         (.timeline-ruler > .markers > .divider):
3163
3164 2019-02-06  Devin Rousso  <drousso@apple.com>
3165
3166         Web Inspector: DOM: don't send the entire function string with each event listener
3167         https://bugs.webkit.org/show_bug.cgi?id=194293
3168         <rdar://problem/47822809>
3169
3170         Reviewed by Joseph Pecoraro.
3171
3172         * UserInterface/Views/EventListenerSectionGroup.js:
3173         (WI.EventListenerSectionGroup.prototype._functionTextOrLink):
3174
3175 2019-02-06  Joseph Pecoraro  <pecoraro@apple.com>
3176
3177         Web Inspector: "Worker not found" uncaught protocol errors
3178         https://bugs.webkit.org/show_bug.cgi?id=194319
3179
3180         Reviewed by Matt Baker.
3181
3182         * UserInterface/Base/Main.js:
3183         (WI.terminatePageTarget):
3184         Remove Worker targets associated with the Page on navigation.
3185         Eventually we will have to associate Workers with their parent
3186         frame, but for now a transition can only happen at the Page
3187         level, so we can eliminate all workers on the page.
3188
3189         * UserInterface/Controllers/WorkerManager.js:
3190         (WI.WorkerManager.prototype.workerCreated):
3191         * UserInterface/Protocol/Connection.js:
3192         (InspectorBackend.WorkerConnection.sendMessageToBackend):
3193         Allow any WorkerAgent domain message to fail silently. This can
3194         happen if a Worker is created and destroyed before the frontend
3195         hears about it and sends messages to the backend for that Worker.
3196
3197 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
3198
3199         Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty
3200         https://bugs.webkit.org/show_bug.cgi?id=194318
3201
3202         Reviewed by Devin Rousso.
3203
3204         Previously, WI.CSSStyleDeclaration.Event.PropertiesChanged fired when
3205         old text and new text were empty strings.
3206
3207         * UserInterface/Models/CSSStyleDeclaration.js:
3208
3209 2019-02-05  Devin Rousso  <drousso@apple.com>
3210
3211         Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
3212         https://bugs.webkit.org/show_bug.cgi?id=159577
3213         <rdar://problem/27251461>
3214
3215         Reviewed by Joseph Pecoraro.
3216
3217         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
3218         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
3219         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
3220
3221 2019-02-05  Matt Baker  <mattbaker@apple.com>
3222
3223         Web Inspector: Elements tab: selection is broken after deleting the selected node
3224         https://bugs.webkit.org/show_bug.cgi?id=194300
3225         <rdar://problem/47829275>
3226
3227         Reviewed by Devin Rousso.
3228
3229         Deleting a TreeElement can cause an IndexSet including indexes
3230         outside the deleted range to be passed to SelectionController,
3231         corrupting the internal selection state.
3232
3233         * UserInterface/Views/TreeOutline.js:
3234         (WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added.
3235         (WI.TreeOutline.prototype._indexesForSubtree):
3236         Finding the last (rightmost leaf) TreeElement in the subtree used
3237         TreeElement.prototype.traverseNextElement to do a depth first traversal.
3238         This method did not stay within the subtree rooted at `treeElement`.
3239
3240 2019-02-05  Matt Baker  <mattbaker@apple.com>
3241
3242         Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
3243         https://bugs.webkit.org/show_bug.cgi?id=194254
3244         <rdar://problem/47805023>
3245
3246         Reviewed by Devin Rousso.
3247
3248         * UserInterface/Views/TreeOutline.js:
3249         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3250         TreeOutline should always call the TreeElement `select` and `deselect`
3251         methods while processing selection changes. Having notifications
3252         suppressed by `this._suppressNextSelectionDidChangeEvent` should only
3253         affect the dispatching of TreeOutline events.
3254
3255 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
3256
3257         Web Inspector: Styles: remove harmless "property was unlocked" asserts
3258         https://bugs.webkit.org/show_bug.cgi?id=194262
3259
3260         Reviewed by Matt Baker.
3261
3262         * UserInterface/Views/SpreadsheetStyleProperty.js:
3263         (WI.SpreadsheetStyleProperty.prototype.remove):
3264         (WI.SpreadsheetStyleProperty.prototype.update):
3265         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
3266         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
3267
3268 2019-02-04  Devin Rousso  <drousso@apple.com>
3269
3270         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
3271         https://bugs.webkit.org/show_bug.cgi?id=194280
3272         <rdar://problem/47811159>
3273
3274         Reviewed by Matt Baker.
3275
3276         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
3277         (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
3278         Add a fallback value in case the `class` attribute isn't specified for the selected node.
3279
3280 2019-02-04  Devin Rousso  <drousso@apple.com>
3281
3282         Web Inspector: Resources: missing resource data for document on reload
3283         https://bugs.webkit.org/show_bug.cgi?id=194243
3284         <rdar://problem/47559021>
3285
3286         Reviewed by Joseph Pecoraro.
3287
3288         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
3289         (WI.ResourceDetailsSidebarPanel.prototype.set resource):
3290         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
3291
3292         * UserInterface/Base/Object.js:
3293         (WI.Object.removeEventListener):
3294         Drive-by: there's no need to iterate over the entire table to check if `thisObject` exists,
3295         as that is handled for us by `ListMultimap`, which we later call anyways.
3296
3297 2019-02-04  Matt Baker  <mattbaker@apple.com>
3298
3299         Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
3300         https://bugs.webkit.org/show_bug.cgi?id=194242
3301         <rdar://problem/47802027>
3302
3303         Reviewed by Joseph Pecoraro.
3304
3305         * UserInterface/Views/FolderizedTreeElement.js:
3306         (WI.FolderizedTreeElement.prototype.removeChildren):
3307         FolderTreeElements are removed by the base class call to removeChildren.
3308         Calling `removeChildren` for detached TreeElements is unnecessary.
3309
3310 2019-02-04  Matt Baker  <mattbaker@apple.com>
3311
3312         Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
3313         https://bugs.webkit.org/show_bug.cgi?id=194169
3314         <rdar://problem/47743864>
3315
3316         Reviewed by Devin Rousso.
3317
3318         * UserInterface/Views/TreeOutline.js:
3319         (WI.TreeOutline.prototype._handleMouseDown):
3320         Add a special case for a single-selection TreeOutline with
3321         allowsRepeatSelection enabled. Since the element is already
3322         selected, bypass the SelectionCongroller and dispatch an
3323         event with event.data.selectedByUser set to true.
3324
3325 2019-02-04  Nikita Vasilyev  <nvasilyev@apple.com>
3326
3327         Web Inspector: Styles: fix race conditions when editing
3328         https://bugs.webkit.org/show_bug.cgi?id=192739
3329         <rdar://problem/46752925>
3330
3331         Reviewed by Devin Rousso.
3332
3333         Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
3334         and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
3335         on the backend, CSSStyleDeclaration (on the front-end) gets updated.
3336
3337         Unsure there's no race conditions by introducing `_updatesInProgressCount`:
3338
3339           - Increment it before calling CSSAgent.setStyleText.
3340           - Decrement it after CSSAgent.setStyleText is finished.
3341
3342         Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.
3343
3344         * UserInterface/Models/CSSProperty.js:
3345         (WI.CSSProperty.prototype._updateOwnerStyleText):