964298fe61ad42b81e29ce5fdb0e8ae7bc98aedb
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-01-30  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Memory Timeline View should be responsive / resizable
4         https://bugs.webkit.org/show_bug.cgi?id=153758
5         <rdar://problem/24444320>
6
7         Reviewed by Joseph Pecoraro.
8
9         Leverage the SVG `viewBox` (which was misspelled) to scale the graphs when the width of the
10         container changes. The `viewBox` used is equal to the total amount of time that is visible.
11
12         Make `WI.LineChart` (and its container classes) into subclasses of `WI.View` to leverage the
13         existing layout system.
14
15         Prevent any work from being done when resizing, as this is now handled by CSS/SVG.
16
17         * UserInterface/Views/LineChart.js:
18         (WI.LineChart):
19         (WI.LineChart.prototype.set size):
20         (WI.LineChart.prototype.addPoint):
21         (WI.LineChart.prototype.clear):
22         (WI.LineChart.prototype.layout):
23         (WI.LineChart.prototype.get element): Deleted.
24         (WI.LineChart.prototype.get points): Deleted.
25         (WI.LineChart.prototype.needsLayout): Deleted.
26         (WI.LineChart.prototype.updateLayout): Deleted.
27
28         * UserInterface/Views/CPUUsageView.js:
29         (WI.CPUUsageView):
30         (WI.CPUUsageView.prototype.clear):
31         (WI.CPUUsageView.prototype.updateChart): Added.
32         (WI.CPUUsageView.prototype.get element): Deleted.
33         (WI.CPUUsageView.prototype.layoutWithDataPoints): Deleted.
34         * UserInterface/Views/CPUUsageView.css:
35         (.cpu-usage-view):
36         (.cpu-usage-view > .details):
37         (.cpu-usage-view > .graph, .cpu-usage-view > .graph > .line-chart, .cpu-usage-view > .graph > .line-chart > svg): Added.
38         (.cpu-usage-view > .graph): Deleted.
39
40         * UserInterface/Views/CPUTimelineView.js:
41         (WI.CPUTimelineView):
42         (WI.CPUTimelineView.prototype.layout):
43         (WI.CPUTimelineView.prototype.layout.layoutView):
44         (WI.CPUTimelineView.prototype.layout.layoutView.xScale):
45         (WI.CPUTimelineView.prototype.layout.layoutView.yScale):
46         * UserInterface/Views/CPUTimelineView.css:
47         (body .timeline-view.cpu): Added.
48         (.timeline-view.cpu > .content):
49         (.timeline-view.cpu): Deleted.
50
51         * UserInterface/Views/MemoryCategoryView.js:
52         (WI.MemoryCategoryView):
53         (WI.MemoryCategoryView.prototype.clear):
54         (WI.MemoryCategoryView.prototype.updateChart): Added.
55         (WI.MemoryCategoryView.prototype.get element): Deleted.
56         (WI.MemoryCategoryView.prototype.layoutWithDataPoints): Deleted.
57         * UserInterface/Views/MemoryCategoryView.css:
58         (.memory-category-view):
59         (.memory-category-view > .details):
60         (.memory-category-view > .graph, .memory-category-view > .graph > .line-chart, .memory-category-view > .graph > .line-chart > svg): Added.
61         (.memory-category-view > .graph): Deleted.
62
63         * UserInterface/Views/MemoryTimelineView.js:
64         (WI.MemoryTimelineView.prototype.layout):
65         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView):
66         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.xScale):
67         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.yScale):
68         (WI.MemoryTimelineView.prototype._initializeCategoryViews):
69         (WI.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow):
70         * UserInterface/Views/MemoryTimelineView.css:
71         (.timeline-view.memory > .content > .overview):
72         (.timeline-view.memory > .content > .overview > .divider):
73         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage, .timeline-view.memory > .content > .overview .legend .size): Added.
74         (.timeline-view.memory .legend):
75         (.timeline-view.memory .legend .row): Added.
76         (.timeline-view.memory .legend .row + .row): Added.
77         (.timeline-view.memory .legend .swatch): Addd.
78         (.timeline-view.memory .legend .swatch.javascript): Addd.
79         (.timeline-view.memory .legend .swatch.images): Addd.
80         (.timeline-view.memory .legend .swatch.layers): Addd.
81         (.timeline-view.memory .legend .swatch.page): Addd.
82         (.timeline-view.memory .legend .swatch.current): Addd.
83         (.timeline-view.memory > .content): Deleted.
84         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage):
85         (body[dir=ltr] .timeline-view.memory .legend): Deleted.
86         (body[dir=rtl] .timeline-view.memory .legend): Deleted.
87         (.timeline-view.memory .legend > .row): Deleted.
88         (.timeline-view.memory .legend > .row > .swatch): Deleted.
89         (body[dir=ltr] .timeline-view.memory .legend > .row > .swatch): Deleted.
90         (body[dir=rtl] .timeline-view.memory .legend > .row > .swatch): Deleted.
91         (.timeline-view.memory .legend > .row > p): Deleted.
92         (body[dir=ltr] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
93         (body[dir=rtl] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
94         (.timeline-view.memory .legend > .row > .label): Deleted.
95         (.timeline-view.memory .legend > .row > .size): Deleted.
96         (.timeline-view.memory .legend > .row > .swatch.javascript): Deleted.
97         (.timeline-view.memory .legend > .row > .swatch.images): Deleted.
98         (.timeline-view.memory .legend > .row > .swatch.layers): Deleted.
99         (.timeline-view.memory .legend > .row > .swatch.page): Deleted.
100         (.timeline-view.memory .legend > .row > .swatch.current): Deleted.
101
102 2019-01-30  Nikita Vasilyev  <nvasilyev@apple.com>
103
104         Web Inspector: Changes: group CSS rules by resource
105         https://bugs.webkit.org/show_bug.cgi?id=193940
106         <rdar://problem/47617785>
107
108         Reviewed by Matt Baker.
109
110         Create resource sections with source links in their headers.
111
112         Also:
113         - Use read-only WI.SpreadsheetStyleProperty to display inline swatches for colors;
114         - Make the red and green background span the entire width of the panel.
115
116         * Localizations/en.lproj/localizedStrings.js:
117         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
118         (.sidebar > .panel.changes-panel):
119         (.sidebar > .panel.changes-panel .css-rule):
120         (.sidebar > .panel.selected.changes-panel.empty):
121         (.changes-panel .resource-section):
122         (.changes-panel .resource-section > .header):
123         (.changes-panel .resource-section > .header > a:hover):
124         (.sidebar > .panel.changes-panel .selector-line,):
125         (.changes-panel .css-property-line > .property):
126         (.changes-panel .css-property-line.unchanged):
127         (.changes-panel .css-property-line.added):
128         (.changes-panel .css-property-line.removed):
129         (.changes-panel .css-property-line.removed::before):
130         (.changes-panel .css-property-line.added::before):
131         (@media (prefers-color-scheme: dark)):
132
133         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
134         (WI.ChangesDetailsSidebarPanel.prototype.layout):
135         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
136         (WI.ChangesDetailsSidebarPanel.prototype._createLocationLink):
137
138         * UserInterface/Views/SpreadsheetStyleProperty.js:
139         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
140         Allow passing `null` as a delegate.
141
142 2019-01-30  Devin Rousso  <drousso@apple.com>
143
144         Web Inspector: change style of device settings override popover content
145         https://bugs.webkit.org/show_bug.cgi?id=194049
146
147         Reviewed by Joseph Pecoraro.
148
149         * UserInterface/Base/Main.js:
150         (WI._handleDeviceSettingsToolbarButtonClicked):
151         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
152         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer): Deleted.
153         * UserInterface/Views/Main.css:
154         (.device-settings-content):
155         (.device-settings-content > tr > td:first-child): Added.
156         (.device-settings-content .container):
157         (.device-settings-content .container > * + *): Added.
158         (.device-settings-content .column): Added.
159         (.device-settings-content .user-agent select): Added.
160         (.device-settings-content .user-agent input): Added.
161         (.device-settings-content label + label): Added.
162         (.device-settings-content label > input): Added.
163         (.device-settings-content .columns): Deleted.
164         (.device-settings-content .columns > .column): Deleted.
165         (.device-settings-content .columns > .column + .column): Deleted.
166         (.device-settings-content .user-agent-value): Deleted.
167         (.device-settings-content .user-agent-value > select): Deleted.
168         (.device-settings-content .user-agent-value > input): Deleted.
169         (body[dir=ltr] .device-settings-content .user-agent-value > input): Deleted.
170         (body[dir=rtl] .device-settings-content .user-agent-value > input): Deleted.
171
172 2019-01-30  Devin Rousso  <drousso@apple.com>
173
174         Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith')
175         https://bugs.webkit.org/show_bug.cgi?id=194029
176
177         Reviewed by Matt Baker.
178
179         * UserInterface/Views/ConsoleMessageView.js:
180         (WI.ConsoleMessageView.prototype._appendLocationLink):
181
182 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
183
184         Web Inspector: Enabled Changes panel in Elements tab by default
185         https://bugs.webkit.org/show_bug.cgi?id=193986
186         <rdar://problem/47647683>
187
188         Reviewed by Matt Baker.
189
190         * UserInterface/Base/Setting.js:
191         * UserInterface/Views/ElementsTabContentView.js:
192         (WI.ElementsTabContentView):
193         * UserInterface/Views/SettingsTabContentView.js:
194         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
195
196 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
197
198         Web Inspector: Styles: enable computed style cascades by default
199         https://bugs.webkit.org/show_bug.cgi?id=193983
200         <rdar://problem/47645821>
201
202         Reviewed by Matt Baker.
203
204         * Localizations/en.lproj/localizedStrings.js:
205         * UserInterface/Base/Setting.js:
206         * UserInterface/Views/ComputedStyleDetailsPanel.css:
207         (.computed-style-properties):
208         (.computed-style-properties .property .go-to-arrow):
209         (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
210         (.details-section.computed-style-properties > .content):
211         (@media (prefers-color-scheme: dark)):
212         (.computed-with-traces .computed-style-properties): Deleted.
213         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
214         (.computed-with-traces .details-section.computed-style-properties > .content): Deleted.
215         (.computed-with-traces .computed-style-properties .property .go-to-arrow): Deleted.
216         * UserInterface/Views/ComputedStyleDetailsPanel.js:
217         (WI.ComputedStyleDetailsPanel.prototype.refresh):
218         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
219         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
220         (WI.ComputedStyleDetailsSidebarPanel):
221         * UserInterface/Views/SettingsTabContentView.js:
222         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
223
224 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
225
226         Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler
227         https://bugs.webkit.org/show_bug.cgi?id=193921
228
229         Reviewed by Devin Rousso.
230
231         * UserInterface/Base/Utilities.js:
232         * UserInterface/Debug/UncaughtExceptionReporter.js:
233         * UserInterface/Views/NetworkTableContentView.js:
234         (WI.NetworkTableContentView.prototype._exportHAR):
235         * UserInterface/Views/TextEditor.js:
236         (WI.TextEditor.prototype.updateFormattedState):
237
238 2019-01-28  Devin Rousso  <drousso@apple.com>
239
240         Web Inspector: provide a way to edit page WebRTC settings on a remote target
241         https://bugs.webkit.org/show_bug.cgi?id=193863
242         <rdar://problem/47572764>
243
244         Reviewed by Joseph Pecoraro.
245
246         * UserInterface/Base/Main.js:
247         (WI.loaded):
248         (WI.initializeTarget):
249         (WI._handleDeviceSettingsToolbarButtonClicked):
250         (WI._handleDeviceSettingsToolbarButtonClicked.createCheckbox):
251         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns): Deleted.
252         * UserInterface/Views/Main.css:
253         (.device-settings-content .container): Added.
254
255         * Localizations/en.lproj/localizedStrings.js:
256
257 2019-01-28  Matt Baker  <mattbaker@apple.com>
258
259         Web Inspector: Elements tab should toggle visibility for all selected nodes
260         https://bugs.webkit.org/show_bug.cgi?id=193089
261         <rdar://problem/47009256>
262
263         Reviewed by Devin Rousso.
264
265         Update "Toggle Visibility" command in DOM tree for multiple selection.
266         When both visible and hidden elements are selected in the DOM tree,
267         the toggle command behaves contextually. If one or more elements are
268         visible, they are hidden, otherwise they are shown. The context menu
269         shows "Hide Elements" or "Show Elements", respectively.
270
271         When only one element is selected, or the context menu target element
272         is not selected, the command continues to be "Toggle Visibility".
273
274         * Localizations/en.lproj/localizedStrings.js:
275
276         * UserInterface/Views/DOMTreeElement.js:
277         (WI.DOMTreeElement.prototype.get isNodeHidden): Added.
278         (WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
279         (WI.DOMTreeElement.prototype.toggleElementVisibility):
280         (WI.DOMTreeElement.prototype._populateTagContextMenu):
281
282         * UserInterface/Views/DOMTreeOutline.js:
283         (WI.DOMTreeOutline):
284         (WI.DOMTreeOutline.prototype.toggleSelectedElementsVisibility):  Added.
285         Provide a public method for toggling the visibility of selected DOM nodes.
286         Used by the "H" keyboard shortcut and DOMTreeElement context menu.
287
288         (WI.DOMTreeOutline.prototype._hideElements):
289         (WI.DOMTreeOutline.prototype._hideElement): Deleted.
290         Rename for multiple selection.
291
292 2019-01-28  Commit Queue  <commit-queue@webkit.org>
293
294         Unreviewed, rolling out r240351.
295         https://bugs.webkit.org/show_bug.cgi?id=193918
296
297         Causes overlapping Timeline records, as some record types
298         don't have an endTime (Requested by drousso on #webkit).
299
300         Reverted changeset:
301
302         "WebInspector: Confusingly nested events in the timeline for
303         Mutation Observers"
304         https://bugs.webkit.org/show_bug.cgi?id=192884
305         https://trac.webkit.org/changeset/240351
306
307 2019-01-28  Matt Baker  <mattbaker@apple.com>
308
309         REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
310         https://bugs.webkit.org/show_bug.cgi?id=193808
311         <rdar://problem/47537734>
312
313         Reviewed by Devin Rousso.
314
315         * UserInterface/Controllers/SelectionController.js:
316         (WI.SelectionController.prototype.didRemoveItems):
317
318         * UserInterface/Views/TreeOutline.js:
319         (WI.TreeOutline.prototype._indexesForSubtree):
320         Fix a bug where no IndexSet was returned when passed a TreeElement with
321         no children. This caused the Timelines tree selection to be corrupted when
322         entering and exiting edit mode, as TreeElements are inserted and removed.
323
324 2019-01-28  Nikita Vasilyev  <nvasilyev@apple.com>
325
326         Web Inspector: Add Changes panel to Elements tab
327         https://bugs.webkit.org/show_bug.cgi?id=193803
328
329         Reviewed by Devin Rousso.
330
331         Introduce the new experimental Changes Panel. It shows a list of CSS changes
332         made via Web Inspector, so the changes could be copied to the source files.
333
334         * Localizations/en.lproj/localizedStrings.js:
335         * UserInterface/Base/Setting.js:
336         * UserInterface/Base/Utilities.js:
337         (Array.diffArrays): Added.
338
339         * UserInterface/Controllers/CSSManager.js:
340         (WI.CSSManager):
341         (WI.CSSManager.prototype.get modifiedCSSRules):
342         (WI.CSSManager.prototype.addModifiedCSSRule):
343         (WI.CSSManager.prototype.removeModifiedCSSRule):
344         (WI.CSSManager.prototype._mainResourceDidChange):
345
346         * UserInterface/Main.html:
347         * UserInterface/Models/CSSProperty.js:
348         (WI.CSSProperty):
349         (WI.CSSProperty.prototype.remove):
350         (WI.CSSProperty.prototype.replaceWithText):
351         (WI.CSSProperty.prototype.commentOut):
352         (WI.CSSProperty.prototype.set text):
353         (WI.CSSProperty.prototype.get modified):
354         (WI.CSSProperty.prototype.set name):
355         (WI.CSSProperty.prototype.set rawValue):
356         (WI.CSSProperty.prototype.get initialState):
357         (WI.CSSProperty.prototype._updateOwnerStyleText):
358         (WI.CSSProperty.prototype._markModified):
359         Mark CSSProperty modified *before* making any changes to copy its initial state.
360
361         * UserInterface/Models/CSSRule.js:
362         (WI.CSSRule):
363         (WI.CSSRule.prototype.get id):
364         (WI.CSSRule.prototype.get initialState):
365         (WI.CSSRule.prototype.get stringId):
366         (WI.CSSRule.prototype.markModified):
367
368         * UserInterface/Models/CSSStyleDeclaration.js:
369         (WI.CSSStyleDeclaration):
370         (WI.CSSStyleDeclaration.prototype.get initialState):
371         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
372         (WI.CSSStyleDeclaration.prototype.get properties):
373         (WI.CSSStyleDeclaration.prototype.set properties):
374         (WI.CSSStyleDeclaration.prototype.propertyForName):
375         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
376         (WI.CSSStyleDeclaration.prototype.markModified):
377
378         * UserInterface/Views/ChangesDetailsSidebarPanel.css: Added.
379         (.sidebar > .panel.changes-panel):
380         (.sidebar > .panel.changes-panel:not(.empty)):
381         (.sidebar > .panel.changes-panel.empty):
382         (.changes-panel ins):
383         (.changes-panel del):
384         (.changes-panel del.css-property::before):
385         (.changes-panel ins.css-property::before):
386         (@media (prefers-color-scheme: dark)):
387
388         * UserInterface/Views/ChangesDetailsSidebarPanel.js: Added.
389         (WI.ChangesDetailsSidebarPanel):
390         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
391         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
392         (WI.ChangesDetailsSidebarPanel.prototype.shown):
393         (WI.ChangesDetailsSidebarPanel.prototype.detached):
394         (WI.ChangesDetailsSidebarPanel.prototype.layout):
395         (WI.ChangesDetailsSidebarPanel.prototype._mainResourceDidChange):
396
397         * UserInterface/Views/ElementsTabContentView.js:
398         (WI.ElementsTabContentView):
399
400         * UserInterface/Views/SettingsTabContentView.js:
401         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
402
403         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
404         (.spreadsheet-style-declaration-editor .property):
405         (.spreadsheet-style-declaration-editor .property.modified):
406         (.spreadsheet-style-declaration-editor .property.modified:not(.selected)):
407         (@media (prefers-color-scheme: dark)):
408
409         * UserInterface/Views/SpreadsheetStyleProperty.js:
410         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
411
412 2019-01-26  Devin Rousso  <drousso@apple.com>
413
414         Web Inspector: handle CSS Color 4 color syntaxes
415         https://bugs.webkit.org/show_bug.cgi?id=193166
416         <rdar://problem/47062403>
417
418         Reviewed by Simon Fraser.
419
420         * UserInterface/Models/Color.js:
421         (WI.Color.fromString):
422         (WI.Color.fromString.splitFunctionString): Added.
423         (WI.Color.fromString.parseFunctionAlpha): Added.
424         (WI.Color.fromString.parseFunctionComponent): Added.
425         (WI.Color.fromString.parseHueComponent): Added.
426         (WI.Color.fromString.parsePercentageComponent): Added.
427
428 2019-01-26  Devin Rousso  <drousso@apple.com>
429
430         Web Inspector: provide a way to edit the user agent of a remote target
431         https://bugs.webkit.org/show_bug.cgi?id=193862
432         <rdar://problem/47359292>
433
434         Reviewed by Joseph Pecoraro.
435
436         * UserInterface/Base/Main.js:
437         (WI.loaded):
438         (WI.contentLoaded):
439         (WI.initializeTarget):
440         (WI._handleDeviceSettingsToolbarButtonClicked):
441         (WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
442         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
443         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
444         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
445         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
446         (WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
447         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
448
449         * UserInterface/Views/Main.css:
450         (.device-settings-content):
451         (.device-settings-content .user-agent-value): Added.
452         (.device-settings-content .user-agent-value > select): Added.
453         (.device-settings-content .user-agent-value > input): Added.
454         (body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
455         (body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
456         (.device-settings-content label > input): Added.
457         (body[dir=ltr] .device-settings-content label > input): Deleted.
458         (body[dir=rtl] .device-settings-content label > input): Deleted.
459
460         * Localizations/en.lproj/localizedStrings.js:
461
462 2019-01-25  Devin Rousso  <drousso@apple.com>
463
464         Web Inspector: provide a way to edit page settings on a remote target
465         https://bugs.webkit.org/show_bug.cgi?id=193813
466         <rdar://problem/47359510>
467
468         Reviewed by Joseph Pecoraro.
469
470         Add toolbar button that shows a popover with the target's (page's) settings when clicked.
471
472         * UserInterface/Base/Main.js:
473         (WI.loaded):
474         (WI.contentLoaded):
475         (WI.initializeTarget): Added.
476         (WI._handleDeviceSettingsToolbarButtonClicked): Added.
477         (WI.didDismissPopover): Added.
478         * UserInterface/Views/Main.css:
479         (.device-settings-content): Added.
480         (.device-settings-content .columns): Added.
481         (.device-settings-content .columns > .column): Added.
482         (.device-settings-content .columns > .column + .column): Added.
483         (body[dir=ltr] .device-settings-content label > input): Added.
484         (body[dir=rtl] .device-settings-content label > input): Added.
485
486         * UserInterface/Views/Popover.js:
487         (WI.Popover.prototype._update.area):
488         (WI.Popover.prototype._update):
489         (WI.Popover.prototype._drawBackground):
490         (WI.Popover.prototype._bestMetricsForEdge):
491         (WI.Popover.prototype._drawFrame):
492         If the best area is negative, treat it as the worst area.
493         Allow areas to be clamped so long as the clamped edge is not the preferred edge.
494
495         * UserInterface/Base/Test.js:
496         (WI.initializeTarget): Added.
497
498         * UserInterface/Images/Device.svg: Added.
499         * Localizations/en.lproj/localizedStrings.js:
500
501 2019-01-25  Devin Rousso  <drousso@apple.com>
502
503         Web Inspector: Audit: unable to import audits
504         https://bugs.webkit.org/show_bug.cgi?id=193861
505
506         Reviewed by Joseph Pecoraro.
507
508         * UserInterface/Controllers/AuditManager.js:
509         (WI.AuditManager.prototype.async processJSON):
510
511 2019-01-25  Devin Rousso  <drousso@apple.com>
512
513         Web Inspector: Uncaught Exception: No node with given id found
514         https://bugs.webkit.org/show_bug.cgi?id=193833
515
516         Reviewed by Joseph Pecoraro.
517
518         * UserInterface/Views/CanvasContentView.js:
519         (WI.CanvasContentView):
520         (WI.CanvasContentView.prototype.initialLayout):
521         (WI.CanvasContentView.prototype.layout):
522         (WI.CanvasContentView.prototype._refreshPixelSize):
523         Drive-by: show the refresh button when viewing a specific canvas.
524
525         * UserInterface/Views/CanvasTabContentView.js:
526         (WI.CanvasTabContentView.prototype._removeCanvas):
527         Reset to the overview if the canvas is removed.
528
529 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
530
531         Web Inspector: Improve Dark Mode appearance within Memory timeline
532         https://bugs.webkit.org/show_bug.cgi?id=193804
533
534         Reviewed by Matt Baker.
535
536         * UserInterface/Views/TimelineOverview.css:
537         (.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
538         (.timeline-overview > .tree-outline.timelines .item.selected + .item,):
539         (@media (prefers-color-scheme: dark)):
540         (.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
541         (body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
542         Fix some colors for Timelines edit mode.
543
544         * UserInterface/Views/CPUTimelineOverviewGraph.css:
545         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
546         (@media (prefers-color-scheme: dark)):
547         (.timeline-overview-graph.cpu > .legend):
548         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
549         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
550         (.timeline-overview-graph.memory:nth-child(even) > .legend):
551         (@media (prefers-color-scheme: dark)):
552         (.timeline-overview-graph.memory > .legend):
553         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
554         Improved colors in CPU / Memory overview graph legends.
555
556         * UserInterface/Views/CPUUsageView.css:
557         (.cpu-usage-view > .details):
558         * UserInterface/Views/CircleChart.css:
559         (.circle-chart > svg > path.background):
560         * UserInterface/Views/MemoryCategoryView.css:
561         (.memory-category-view > .details):
562         (.memory-category-view > .details > .name):
563         * UserInterface/Views/MemoryTimelineView.css:
564         (.timeline-view.memory > .content > .overview .total-usage,):
565         (.timeline-view.memory .legend > .row > .size):
566         Improved colors in CPU / Memory detail views.
567
568         * UserInterface/Views/Variables.css:
569         (:root):
570         Add a default --text-secondary-color which will end up slightly
571         lighter in dark mode where it was already implemented.
572
573         (@media (prefers-color-scheme: dark)):
574         Improved max-comparison colors.
575
576 2019-01-25  Devin Rousso  <drousso@apple.com>
577
578         Web Inspector: Timelines: DOMContentLoaded and load event lines need to be more obvious
579         https://bugs.webkit.org/show_bug.cgi?id=193186
580         <rdar://problem/45100694>
581
582         Reviewed by Joseph Pecoraro.
583
584         Shift around z-index values to make Timelines markers appear behind record bars. Widen the
585         marker hit region to make it easier to see the tooltip.
586
587         * UserInterface/Views/Variables.css:
588         (:root):
589
590         * UserInterface/Views/TimelineRuler.css:
591         (.timeline-ruler):
592         (.timeline-ruler > .markers):
593         (.timeline-ruler > .markers > .marker):
594         (body[dir=ltr] .timeline-ruler > .markers > .marker):
595         (body[dir=rtl] .timeline-ruler > .markers > .marker):
596         (.timeline-ruler > .markers > .marker::before):
597         (body[dir=ltr] .timeline-ruler > .markers > .marker::before):
598         (body[dir=rtl] .timeline-ruler > .markers > .marker::before):
599         (.timeline-ruler > .markers > .marker::after): Added.
600         (body[dir=ltr] .timeline-ruler > .markers > .marker::after): Added.
601         (body[dir=rtl] .timeline-ruler > .markers > .marker::after): Added.
602         (.timeline-ruler > .markers > .marker.current-time):
603         (.timeline-ruler > .markers > .marker.current-time::after): Added.
604         (.timeline-ruler > .markers > .marker.load-event):
605         (.timeline-ruler > .markers > .marker.dom-content-event):
606         (.timeline-ruler > .markers > .marker.timestamp):
607         (.timeline-ruler > .selection-handle):
608         (.timeline-ruler.both-handles-clamped > .selection-handle):
609         (.timeline-ruler > .shaded-area):
610         (.timeline-ruler > .markers > .marker.current-time::before): Deleted.
611
612         * UserInterface/Views/TimelineRecordBar.css:
613         (.timeline-record-bar):
614         (.timeline-record-bar > .segment):
615
616         * UserInterface/Views/CPUTimelineOverviewGraph.css:
617         (.timeline-overview-graph.cpu > .legend):
618         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
619         (.timeline-overview-graph.memory > .legend):
620
621 2019-01-25  Devin Rousso  <drousso@apple.com>
622
623         Web Inspector: Audit: remove experimental setting
624         https://bugs.webkit.org/show_bug.cgi?id=193743
625         <rdar://problem/28234022>
626
627         Reviewed by Joseph Pecoraro.
628
629         * UserInterface/Base/Setting.js:
630         (WI.Setting):
631         (WI.Setting.localStorageKey): Added.
632         (WI.Setting.migrateValue):
633         Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
634
635         * UserInterface/Base/Main.js:
636         (WI.loaded):
637
638         * UserInterface/Views/AuditTabContentView.js:
639         (WI.AuditTabContentView.isTabAllowed):
640
641         * UserInterface/Views/SettingsTabContentView.js:
642         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
643
644         * Localizations/en.lproj/localizedStrings.js:
645
646 2019-01-25  Devin Rousso  <drousso@apple.com>
647
648         Web Inspector: show uncaught exception view for unhandled promise rejections
649         https://bugs.webkit.org/show_bug.cgi?id=193832
650
651         Reviewed by Matt Baker.
652
653         * UserInterface/Debug/UncaughtExceptionReporter.js:
654         (handleUnhandledPromiseRejection): Added.
655
656 2019-01-25  Devin Rousso  <drousso@apple.com>
657
658         Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
659         https://bugs.webkit.org/show_bug.cgi?id=193830
660
661         Reviewed by Matt Baker.
662
663         * UserInterface/Models/RecordingAction.js:
664         (WI.RecordingAction.prototype.process):
665
666 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
667
668         Web Inspector: Add another Protocol Version (iOS 12.2)
669         https://bugs.webkit.org/show_bug.cgi?id=193810
670         <rdar://problem/42981838>
671
672         Reviewed by Matt Baker.
673
674         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js: Added.
675         * Versions/Inspector-iOS-12.2.json: Added.
676
677 2019-01-25  Devin Rousso  <drousso@apple.com>
678
679         Web Inspector: `WI.Setting.migrateValue` doesn't take into account the key prefix
680         https://bugs.webkit.org/show_bug.cgi?id=193814
681
682         Reviewed by Matt Baker.
683
684         * UserInterface/Base/Setting.js:
685         (WI.Setting):
686         (WI.Setting.migrateValue):
687         (WI.Setting._localStorageKey): Added.
688
689 2019-01-25  Devin Rousso  <drousso@apple.com>
690
691         Web Inspector: improve invalid Audit/Recording JSON error messages
692         https://bugs.webkit.org/show_bug.cgi?id=193476
693         <rdar://problem/47303659>
694
695         Reviewed by Joseph Pecoraro.
696
697         * UserInterface/Models/AuditTestBase.js:
698         (WI.AuditTestBase):
699         * UserInterface/Models/AuditTestCase.js:
700         (WI.AuditTestCase.async fromPayload):
701         * UserInterface/Models/AuditTestGroup.js:
702         (WI.AuditTestGroup.async fromPayload):
703         * UserInterface/Models/AuditTestCaseResult.js:
704         (WI.AuditTestCaseResult.async fromPayload.checkArray):
705         (WI.AuditTestCaseResult.async fromPayload):
706         * UserInterface/Models/AuditTestGroupResult.js:
707         (WI.AuditTestGroupResult.async fromPayload):
708         * UserInterface/Controllers/AuditManager.js:
709         (WI.AuditManager.synthesizeWarning): Added.
710         (WI.AuditManager.synthesizeError):
711         (WI.AuditManager.prototype.async processJSON):
712
713         * UserInterface/Models/Recording.js:
714         (WI.Recording.fromPayload):
715         (WI.Recording.synthesizeWarning): Added.
716         (WI.Recording.synthesizeError):
717         * UserInterface/Models/RecordingFrame.js:
718         (WI.RecordingFrame.fromPayload):
719         * UserInterface/Models/RecordingAction.js:
720         (WI.RecordingAction.fromPayload):
721         (WI.RecordingAction.prototype.async swizzle):
722         (WI.RecordingAction.prototype.apply):
723         * UserInterface/Controllers/CanvasManager.js:
724         (WI.CanvasManager.prototype.processJSON):
725
726         * Localizations/en.lproj/localizedStrings.js:
727
728 2019-01-24  Devin Rousso  <drousso@apple.com>
729
730         Web Inspector: Audit: add supports key to test/group for compatibility
731         https://bugs.webkit.org/show_bug.cgi?id=193686
732         <rdar://problem/47460872>
733
734         Reviewed by Joseph Pecoraro.
735
736         * UserInterface/Models/AuditTestBase.js:
737         (WI.AuditTestBase):
738         (WI.AuditTestBase.prototype.get supported): Added.
739         (WI.AuditTestBase.prototype.set supported): Added.
740         (WI.AuditTestBase.prototype.set disabled):
741         (WI.AuditTestBase.prototype.async start):
742         (WI.AuditTestBase.prototype.stop):
743         (WI.AuditTestBase.toJSON):
744         * UserInterface/Models/AuditTestCase.js:
745         (WI.AuditTestCase.async fromPayload):
746         * UserInterface/Models/AuditTestGroup.js:
747         (WI.AuditTestGroup):
748         (WI.AuditTestGroup.async fromPayload):
749         (WI.AuditTestGroup.prototype.get supported): Added.
750         (WI.AuditTestGroup.prototype.set supported): Added.
751         Add support for a "supports" key in the test JSON that prevents the test from being run if
752         it's value is lower than the frontend/backend version.
753
754         * UserInterface/Views/AuditTreeElement.js:
755         (WI.AuditTreeElement.prototype.onattach):
756         (WI.AuditTreeElement.prototype.ondelete):
757         (WI.AuditTreeElement.prototype.populateContextMenu):
758         (WI.AuditTreeElement.prototype._updateStatus): Added.
759         (WI.AuditTreeElement.prototype._showRunningSpinner):
760         (WI.AuditTreeElement.prototype._showRunningProgress):
761         (WI.AuditTreeElement.prototype._updateTestGroupDisabled):
762         (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
763         (WI.AuditTreeElement.prototype._handleTestResultCleared):
764         (WI.AuditTreeElement.prototype._handleTestGroupCompleted):
765         (WI.AuditTreeElement.prototype._handleManagerEditingChanged):
766         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Deleted.
767         (WI.AuditTreeElement.prototype._updateLevel): Deleted.
768         * UserInterface/Views/AuditTreeElement.css:
769         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active) > .status:hover > img): Added.
770         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits) > .status:not(:hover)): Added.
771         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported  > .status > img): Added.
772         (.tree-outline .item.audit.unsupported:not(.selected) > :matches(.icon, .titles)): Added.
773         (.tree-outline .item.audit.unsupported > .status > img): Added.
774         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Deleted.
775         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Deleted.
776         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
777         Hide unsupported tests unless in edit mode, where they are greyed out and cannot be enabled.
778         Drive-by: only allow tests to be deleted when in edit mode.
779
780         * UserInterface/Views/AuditNavigationSidebarPanel.js:
781         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
782
783         * Localizations/en.lproj/localizedStrings.js:
784
785 2019-01-24  Joseph Pecoraro  <pecoraro@apple.com>
786
787         Web Inspector: CPU Usage Timeline
788         https://bugs.webkit.org/show_bug.cgi?id=193730
789         <rdar://problem/46797201>
790
791         Reviewed by Devin Rousso.
792
793         CPU Usage is gathered in the backend twice a second, the frequency of the
794         ResourceUsageThread in WebCore. The frontend displays cpu usage in a few
795         ways in the Timeline.
796
797         We use a column chart in the timeline overview to display the frequency and
798         relative distance of samples. This helps show if the samples were close
799         together or far apart, which indicates how meaningful they will be at a
800         particular scale.
801
802         We use a line chart in the timeline detail view which will be easier to see
803         the changes over a particular time range selection.
804
805         * Localizations/en.lproj/localizedStrings.js:
806         New strings.
807
808         * UserInterface/Main.html:
809         * UserInterface/Base/Main.js:
810         (WI.loaded):
811         * UserInterface/Test.html:
812         * UserInterface/Test/Test.js:
813         (WI.loaded):
814         * UserInterface/Protocol/CPUProfilerObserver.js:
815         (WI.CPUProfilerObserver.prototype.trackingStart):
816         (WI.CPUProfilerObserver.prototype.trackingUpdate):
817         (WI.CPUProfilerObserver.prototype.trackingComplete):
818         (WI.CPUProfilerObserver):
819         New files and default registration.
820
821         * UserInterface/Protocol/Target.js:
822         (WI.Target.prototype.get CPUProfilerAgent):
823         New Agent.
824
825         * UserInterface/Controllers/TimelineManager.js:
826         (WI.TimelineManager.availableTimelineTypes):
827         (WI.TimelineManager.prototype.cpuProfilerTrackingStarted):
828         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
829         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
830         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
831         (WI.TimelineManager.prototype.memoryTrackingStart): Renamed.
832         (WI.TimelineManager.prototype.memoryTrackingUpdate): Renamed.
833         (WI.TimelineManager.prototype.memoryTrackingComplete): Renamed.
834         * UserInterface/Models/CPUInstrument.js:
835         (WI.CPUInstrument):
836         (WI.CPUInstrument.supported):
837         (WI.CPUInstrument.prototype.get timelineRecordType):
838         (WI.CPUInstrument.prototype.startInstrumentation):
839         (WI.CPUInstrument.prototype.stopInstrumentation):
840         * UserInterface/Models/CPUTimelineRecord.js:
841         (WI.CPUTimelineRecord):
842         (WI.CPUTimelineRecord.prototype.get timestamp):
843         (WI.CPUTimelineRecord.prototype.get usage):
844         * UserInterface/Models/Instrument.js:
845         (WI.Instrument.createForTimelineType):
846         * UserInterface/Models/TimelineRecord.js:
847         * UserInterface/Models/TimelineRecording.js:
848         (WI.TimelineRecording.prototype.addRecord):
849         Expose a new CPU instrument and timeline.
850
851         * UserInterface/Views/ColumnChart.js: Added.
852         (WI.ColumnChart):
853         (WI.ColumnChart.prototype.get element):
854         (WI.ColumnChart.prototype.get bars):
855         (WI.ColumnChart.prototype.get size):
856         (WI.ColumnChart.prototype.set size):
857         (WI.ColumnChart.prototype.addBar):
858         (WI.ColumnChart.prototype.clear):
859         (WI.ColumnChart.prototype.needsLayout):
860         (WI.ColumnChart.prototype.updateLayout):
861         View that will draw vertical bars with independent widths.
862         This is meant to be used similiar to WI.LineChart.
863
864         * UserInterface/Images/CPUInstrument.svg: Added.
865         * UserInterface/Views/Variables.css:
866         (:root):
867         CPU timeline colors and icon.
868
869         * UserInterface/Views/CPUTimelineOverviewGraph.css:
870         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
871         (.timeline-overview-graph.cpu):
872         (.timeline-overview-graph.cpu > .legend):
873         (body[dir=ltr] .timeline-overview-graph.cpu > .legend):
874         (body[dir=rtl] .timeline-overview-graph.cpu > .legend):
875         (.timeline-overview-graph:nth-child(even) > .legend):
876         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart):
877         (.timeline-overview-graph.cpu > .bar-chart > svg > g > rect):
878         * UserInterface/Views/CPUTimelineOverviewGraph.js: Added.
879         (WI.CPUTimelineOverviewGraph):
880         (WI.CPUTimelineOverviewGraph.prototype.get height):
881         (WI.CPUTimelineOverviewGraph.prototype.reset):
882         (WI.CPUTimelineOverviewGraph.prototype.layout.xScale):
883         (WI.CPUTimelineOverviewGraph.prototype.layout.yScale):
884         (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord):
885         (WI.CPUTimelineOverviewGraph.prototype.layout):
886         (WI.CPUTimelineOverviewGraph.prototype._updateLegend):
887         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
888         * UserInterface/Views/CPUTimelineView.css:
889         (.timeline-view.cpu):
890         (.timeline-view.cpu > .content):
891         (.timeline-view.cpu > .content .subtitle):
892         (.timeline-view.cpu > .content > .details):
893         (.timeline-view.cpu > .content > .details > .timeline-ruler):
894         (body[dir=ltr] .timeline-view.cpu > .content > .details > .timeline-ruler):
895         (body[dir=rtl] .timeline-view.cpu > .content > .details > .timeline-ruler):
896         (.timeline-view.cpu > .content > .details > .subtitle):
897         (.cpu-usage-view .line-chart > svg > path):
898         (.timeline-view.cpu .legend > .row > .swatch.current):
899         * UserInterface/Views/CPUTimelineView.js: Added.
900         (WI.CPUTimelineView):
901         (WI.CPUTimelineView.prototype.shown):
902         (WI.CPUTimelineView.prototype.hidden):
903         (WI.CPUTimelineView.prototype.closed):
904         (WI.CPUTimelineView.prototype.reset):
905         (WI.CPUTimelineView.prototype.get scrollableElements):
906         (WI.CPUTimelineView.prototype.get showsFilterBar):
907         (WI.CPUTimelineView.prototype.layout.layoutView):
908         (WI.CPUTimelineView.prototype.layout.xScale):
909         (WI.CPUTimelineView.prototype.layout.yScale):
910         (WI.CPUTimelineView.prototype.layout):
911         (WI.CPUTimelineView.prototype._cpuTimelineRecordAdded):
912         * UserInterface/Views/CPUUsageView.css:
913         (.cpu-usage-view):
914         (.cpu-usage-view > .details):
915         (body[dir=ltr] .cpu-usage-view > .details):
916         (body[dir=rtl] .cpu-usage-view > .details):
917         (.cpu-usage-view > .graph):
918         (body[dir=rtl] .cpu-usage-view > .graph):
919         * UserInterface/Views/CPUUsageView.js:
920         (WI.CPUUsageView):
921         (WI.CPUUsageView.prototype.get element):
922         (WI.CPUUsageView.prototype.clear):
923         (WI.CPUUsageView.prototype.layoutWithDataPoints):
924         (WI.CPUUsageView.prototype._updateDetails):
925         * UserInterface/Views/ContentView.js:
926         (WI.ContentView.createFromRepresentedObject):
927         * UserInterface/Views/TimelineIcons.css:
928         (.cpu-icon .icon):
929         * UserInterface/Views/TimelineOverviewGraph.js:
930         (WI.TimelineOverviewGraph.createForTimeline):
931         * UserInterface/Views/TimelineTabContentView.js:
932         (WI.TimelineTabContentView.displayNameForTimelineType):
933         (WI.TimelineTabContentView.iconClassNameForTimelineType):
934         (WI.TimelineTabContentView.genericClassNameForTimelineType):
935         (WI.TimelineTabContentView.iconClassNameForRecord):
936         (WI.TimelineTabContentView.displayNameForRecord):
937         Timeline views for CPU usage.
938
939         * UserInterface/Views/MemoryCategoryView.js:
940         (WI.MemoryCategoryView):
941         * UserInterface/Views/MemoryTimelineView.js:
942         (WI.MemoryTimelineView.createChartContainer):
943         (WI.MemoryTimelineView):
944         (WI.MemoryTimelineView.prototype._clearMaxComparisonLegend):
945         Minor updates to style and comments.
946
947 2019-01-23  Nikita Vasilyev  <nvasilyev@apple.com>
948
949         Web Inspector: Refactor WI.CSSStyleDeclaration.prototype.update
950         https://bugs.webkit.org/show_bug.cgi?id=193737
951
952         Reviewed by Matt Baker.
953
954         Remove unused event data from the WI.CSSStyleDeclaration.Event.PropertiesChanged event.
955
956         * UserInterface/Models/CSSStyleDeclaration.js:
957         (WI.CSSStyleDeclaration.prototype.update):
958
959 2019-01-23  Devin Rousso  <drousso@apple.com>
960
961         WebInspector: Confusingly nested events in the timeline for Mutation Observers
962         https://bugs.webkit.org/show_bug.cgi?id=192884
963         <rdar://problem/46854178>
964
965         Reviewed by Joseph Pecoraro.
966
967         If a microtask event (e.g. `ObserverCallback`) is contained within a `EvaluatedScript`
968         event, move that microtask event to be a sibling of the `EvaluateScript`, subtracting the
969         microtask's time taken from the `EvaluateScript`'s time. If there are no other children
970         after this move, then remove the `EvaluateScript` altogether.
971
972         * UserInterface/Controllers/TimelineManager.js:
973         (WI.TimelineManager.prototype.eventRecorded.fixMicrotaskPlacement): Added.
974         (WI.TimelineManager.prototype.eventRecorded):
975         (WI.TimelineManager.prototype._mergeScriptProfileRecords):
976
977 2019-01-23  Joseph Pecoraro  <pecoraro@apple.com>
978
979         Web Inspector: Network Waterfall column should redraw when adding/removing new columns
980         https://bugs.webkit.org/show_bug.cgi?id=193696
981         <rdar://problem/47464149>
982
983         Reviewed by Devin Rousso.
984
985         * UserInterface/Views/TableColumn.js:
986         (WI.TableColumn.prototype.get needsReloadOnResize):
987         * UserInterface/Views/NetworkTableContentView.js:
988         (WI.NetworkTableContentView.prototype.initialLayout):
989         Mark the waterfall column as sensitive to any resizes.
990
991         * UserInterface/Views/Table.js:
992         (WI.Table.prototype.showColumn):
993         (WI.Table.prototype.hideColumn):
994         Update column widths and reload any columns that may be sensitive to resizes.
995
996 2019-01-22  Devin Rousso  <drousso@apple.com>
997
998         Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
999         https://bugs.webkit.org/show_bug.cgi?id=116191
1000         <rdar://problem/13905910>
1001
1002         Reviewed by Joseph Pecoraro.
1003
1004         * UserInterface/Controllers/TimelineManager.js:
1005         (WI.TimelineManager.prototype._processRecord):
1006
1007 2019-01-22  Devin Rousso  <drousso@apple.com>
1008
1009         Web Inspector: expose Audit and Recording versions to the frontend
1010         https://bugs.webkit.org/show_bug.cgi?id=193262
1011         <rdar://problem/47130684>
1012
1013         Reviewed by Joseph Pecoraro.
1014
1015         * UserInterface/Protocol/InspectorBackend.js:
1016         (InspectorBackendClass.prototype.registerVersion): Added.
1017
1018         * UserInterface/Models/AuditTestCase.js:
1019         * UserInterface/Models/Recording.js:
1020         (WI.Recording.fromPayload):
1021         Add Interface version values.
1022
1023 2019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
1024
1025         Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
1026         https://bugs.webkit.org/show_bug.cgi?id=193615
1027
1028         Reviewed by Devin Rousso.
1029
1030         Remove unused visibleProperties.
1031
1032         Rename:
1033         - properties to enabledProperties;
1034         - allProperties to properties;
1035         - allVisibleProperties to visibleProperties.
1036
1037         * UserInterface/Models/CSSProperty.js:
1038         (WI.CSSProperty.prototype._prependSemicolonIfNeeded):
1039         (WI.CSSProperty):
1040         * UserInterface/Models/CSSStyleDeclaration.js:
1041         (WI.CSSStyleDeclaration):
1042         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
1043         (WI.CSSStyleDeclaration.prototype.get properties):
1044         (WI.CSSStyleDeclaration.prototype.propertyForName):
1045         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
1046         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
1047         (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
1048         * UserInterface/Models/DOMNodeStyles.js:
1049         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1050         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
1051         (WI.DOMNodeStyles.prototype._associateRelatedProperties):
1052         (WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
1053         (WI.DOMNodeStyles):
1054         * UserInterface/Views/BoxModelDetailsSectionRow.js:
1055         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
1056         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1057         (WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
1058         * UserInterface/Views/ComputedStyleSection.js:
1059         (WI.ComputedStyleSection.prototype.get propertiesToRender):
1060         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1061         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
1062         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1063         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
1064         * UserInterface/Views/SpreadsheetStyleProperty.js:
1065         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1066
1067 2019-01-22  Joseph Pecoraro  <pecoraro@apple.com>
1068
1069         Web Inspector: Network Table appears broken after filter - rows look collapsed
1070         https://bugs.webkit.org/show_bug.cgi?id=192730
1071         <rdar://problem/46853158>
1072
1073         Reviewed by Devin Rousso.
1074
1075         * UserInterface/Views/Table.js:
1076         (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
1077         Affect the filler row like the other applyColumnWidths calls since this
1078         now may be the initial call to size visible columns.
1079
1080 2019-01-22  Devin Rousso  <drousso@apple.com>
1081
1082         Web Inspector: Audit: use plural strings for Passed, Failed, and Unsupported
1083         https://bugs.webkit.org/show_bug.cgi?id=193675
1084         <rdar://problem/46628680>
1085
1086         Reviewed by Joseph Pecoraro.
1087
1088         * UserInterface/Views/AuditTestGroupContentView.js:
1089         (WI.AuditTestGroupContentView.prototype.layout):
1090
1091         * Localizations/en.lproj/localizedStrings.js:
1092
1093 2019-01-18  Jer Noble  <jer.noble@apple.com>
1094
1095         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
1096         https://bugs.webkit.org/show_bug.cgi?id=189553
1097
1098         Reviewed by Tim Horton.
1099
1100         * Configurations/Base.xcconfig:
1101         * Configurations/SDKVariant.xcconfig: Added.
1102
1103 2019-01-18  Devin Rousso  <drousso@apple.com>
1104
1105         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'resource.finished')
1106         https://bugs.webkit.org/show_bug.cgi?id=193589
1107
1108         Reviewed by Joseph Pecoraro.
1109
1110         * UserInterface/Views/NetworkTableContentView.js:
1111         (WI.NetworkTableContentView.prototype.get supportsSave):
1112         (WI.NetworkTableContentView.prototype._HARResources):
1113
1114 2019-01-17  Truitt Savell  <tsavell@apple.com>
1115
1116         Unreviewed, rolling out r240124.
1117
1118         This commit broke an internal build.
1119
1120         Reverted changeset:
1121
1122         "SDK_VARIANT build destinations should be separate from non-
1123         SDK_VARIANT builds"
1124         https://bugs.webkit.org/show_bug.cgi?id=189553
1125         https://trac.webkit.org/changeset/240124
1126
1127 2019-01-17  Jer Noble  <jer.noble@apple.com>
1128
1129         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
1130         https://bugs.webkit.org/show_bug.cgi?id=189553
1131
1132         Reviewed by Tim Horton.
1133
1134         * Configurations/Base.xcconfig:
1135         * Configurations/SDKVariant.xcconfig: Added.
1136
1137 2019-01-16  Matt Baker  <mattbaker@apple.com>
1138
1139         Web Inspector: Fix TreeOutline TypeError:​ this._indexesForSubtree is not a function
1140         https://bugs.webkit.org/show_bug.cgi?id=193501
1141         <rdar://problem/47323967>
1142
1143         Reviewed by Joseph Pecoraro.
1144
1145         * UserInterface/Views/TreeOutline.js:
1146         (WI.TreeOutline.prototype.removeChildAtIndex):
1147
1148 2019-01-15  Devin Rousso  <drousso@apple.com>
1149
1150         Web Inspector: Audit: create new IDL type for exposing special functionality in test context
1151         https://bugs.webkit.org/show_bug.cgi?id=193149
1152         <rdar://problem/46801218>
1153
1154         Reviewed by Joseph Pecoraro.
1155
1156         Add `AuditAgent` getters and plumbing.
1157
1158         * UserInterface/Protocol/Target.js:
1159         (WI.Target.prototype.get AuditAgent): Added.
1160
1161         * UserInterface/Models/AuditTestCase.js:
1162         (WI.AuditTestCase.prototype.async run):
1163
1164         * UserInterface/Controllers/AuditManager.js:
1165         (WI.AuditManager.prototype.async start):
1166
1167         * .eslintrc:
1168
1169 2019-01-14  Devin Rousso  <drousso@apple.com>
1170
1171         Web Inspector: Event breakpoints: typing uppercase "DOM" doesn't show completions for events that start with "DOM"
1172         https://bugs.webkit.org/show_bug.cgi?id=193384
1173
1174         Reviewed by Joseph Pecoraro.
1175
1176         * UserInterface/Views/EventBreakpointPopover.js:
1177         (WI.EventBreakpointPopover.prototype.show):
1178
1179 2019-01-14  Devin Rousso  <drousso@apple.com>
1180
1181         Web Inspector: Event breakpoints: text field and completion popover fonts should match
1182         https://bugs.webkit.org/show_bug.cgi?id=193249
1183
1184         Reviewed by Matt Baker.
1185
1186         * UserInterface/Views/EventBreakpointPopover.css:
1187         (.popover .event-breakpoint-content > .event-type > input): Added.
1188         (.popover .event-breakpoint-content > .event-type > input::placeholder): Added.
1189         * UserInterface/Views/EventBreakpointPopover.js:
1190         (WI.EventBreakpointPopover.prototype.show):
1191         (WI.EventBreakpointPopover.prototype._showSuggestionsView):
1192         Subtract the <input> border and padding from the bounds position so the <input> text lines
1193         up with the `WI.CompletionSuggestionsView` text.
1194
1195         * UserInterface/Views/CompletionSuggestionsView.js:
1196         (WI.CompletionSuggestionsView):
1197         Drive-by: force `dir=ltr` to match the `text-align: left;` CSS styling.
1198
1199 2019-01-14  Nikita Vasilyev  <nvasilyev@apple.com>
1200
1201         Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
1202         https://bugs.webkit.org/show_bug.cgi?id=193098
1203         <rdar://problem/47016036>
1204
1205         Reviewed by Devin Rousso.
1206
1207         Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
1208         Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
1209         move from wrapping text.
1210
1211         * UserInterface/Views/CompletionSuggestionsView.js:
1212         (WI.CompletionSuggestionsView.prototype.hide):
1213         (WI.CompletionSuggestionsView.prototype.show):
1214         (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed.
1215         (WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added.
1216         (WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added.
1217         (WI.CompletionSuggestionsView):
1218
1219         * UserInterface/Views/SpreadsheetTextField.js:
1220         (WI.SpreadsheetTextField.prototype.set suggestionHint):
1221         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
1222         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
1223         (WI.SpreadsheetTextField.prototype._updateCompletions):
1224         (WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.
1225
1226         (WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
1227         Drive-by: abstract out repeating code into a private method.
1228
1229 2019-01-14  Devin Rousso  <drousso@apple.com>
1230
1231         Web Inspector: Settings: group titles should vertically align with the first editor
1232         https://bugs.webkit.org/show_bug.cgi?id=193391
1233
1234         Reviewed by Dean Jackson.
1235
1236         * UserInterface/Views/SettingsTabContentView.css:
1237         (.content-view.settings > .settings-view > .container):
1238         (.content-view.settings > .settings-view > .container > .editor-group > .editor): Added.
1239         (.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added.
1240         (.content-view.settings > .settings-view > .container > .editor-group > .editor select):
1241         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]):
1242
1243 2019-01-11  Matt Baker  <mattbaker@apple.com>
1244
1245         Web Inspector: REGRESSION: deleting an audit puts selection in a selected but invisible state
1246         https://bugs.webkit.org/show_bug.cgi?id=192917
1247         <rdar://problem/46875285>
1248
1249         Reviewed by Devin Rousso.
1250
1251         SelectionController should not be notified of removed children until the
1252         child items have been removed from the TreeOutline. Doing so at this stage
1253         is unsafe, since this method checks `this.selectedTreeElement`, which could
1254         return the adjusted index from the SelectionController before anything has
1255         actually been removed from the TreeOutline.
1256
1257         The number of calls to SelectionController.prototype.didRemoveItems is also
1258         reduced somewhat, since we're no longer calling it for every TreeElement.
1259
1260         * UserInterface/Views/TreeOutline.js:
1261         (WI.TreeOutline.prototype.removeChildAtIndex):
1262         (WI.TreeOutline.prototype.removeChildren):
1263         (WI.TreeOutline.prototype._forgetTreeElement):
1264         (WI.TreeOutline.prototype._indexesForSubtree): Added.        
1265
1266 2019-01-10  Devin Rousso  <drousso@apple.com>
1267
1268         Web Inspector: Audit: allow audits to be enabled/disabled
1269         https://bugs.webkit.org/show_bug.cgi?id=192210
1270         <rdar://problem/46423583>
1271
1272         Reviewed by Joseph Pecoraro.
1273
1274         * UserInterface/Controllers/AuditManager.js:
1275         (WI.AuditManager.prototype.get editing): Added.
1276         (WI.AuditManager.prototype.set editing): Added.
1277         (WI.AuditManager.prototype.stop):
1278         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
1279         Since default audits aren't stored, keep a list of disabled default tests in a `WI.Setting`.
1280
1281         * UserInterface/Models/AuditTestBase.js:
1282         (WI.AuditTestBase):
1283         (WI.AuditTestBase.prototype.get disabled): Added.
1284         (WI.AuditTestBase.prototype.set disabled): Added.
1285         (WI.AuditTestBase.prototype.async start):
1286         (WI.AuditTestBase.prototype.stop):
1287         (WI.AuditTestBase.toJSON):
1288
1289         * UserInterface/Models/AuditTestCase.js:
1290         (WI.AuditTestCase):
1291         (WI.AuditTestCase.async fromPayload):
1292         (WI.AuditTestCase.prototype.toJSON):
1293
1294         * UserInterface/Models/AuditTestGroup.js:
1295         (WI.AuditTestGroup):
1296         (WI.AuditTestGroup.async fromPayload):
1297         (WI.AuditTestGroup.prototype.get disabled): Added.
1298         (WI.AuditTestGroup.prototype.set disabled): Added.
1299         (WI.AuditTestGroup.prototype.toJSON):
1300         (WI.AuditTestGroup.prototype.async run):
1301         (WI.AuditTestGroup.prototype._handleTestDisabledChanged): Added.
1302         (WI.AuditTestGroup.prototype._handleTestProgress):
1303         Propagate `disabled` changes to all sub-tests, unless the change was caused by one of the
1304         sub-tests, in which case we are now in an intermediate state.
1305
1306         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1307         (WI.AuditNavigationSidebarPanel):
1308         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
1309         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
1310         (WI.AuditNavigationSidebarPanel.prototype.hasCustomFilters): Added.
1311         (WI.AuditNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): Added.
1312         (WI.AuditNavigationSidebarPanel.prototype._addTest):
1313         (WI.AuditNavigationSidebarPanel.prototype._addResult):
1314         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
1315         (WI.AuditNavigationSidebarPanel.prototype._updateEditButtonNavigationItemState): Added.
1316         (WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged): Added.
1317         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
1318         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
1319         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
1320         (WI.AuditNavigationSidebarPanel.prototype._handleEditButtonNavigationItemClicked): Added.
1321         * UserInterface/Views/AuditNavigationSidebarPanel.css:
1322         (.sidebar > .panel.navigation.audit > .content):
1323         (.sidebar > .panel.navigation.audit > .content > .tree-outline): Added.
1324         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled):active): Added.
1325         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated): Added.
1326         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated:active): Added.
1327         (.sidebar > .panel.navigation.audit > .content .edit-audits.disabled): Added.
1328         (.finish-editing-audits-placeholder.message-text-view .navigation-item-help .navigation-bar): Added.
1329         Leverage custom filters to ensure that disabled audits arent shown when not editing and that
1330         result tree elements aren't shown while editing.
1331
1332         * UserInterface/Views/AuditTestGroupContentView.js:
1333         (WI.AuditTestGroupContentView.prototype.shown):
1334
1335         * UserInterface/Views/AuditTreeElement.js:
1336         (WI.AuditTreeElement.prototype.onattach):
1337         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Added.
1338         (WI.AuditTreeElement.prototype._updateTestGroupDisabled): Added.
1339         (WI.AuditTreeElement.prototype._handleTestDisabledChanged): Added.
1340         (WI.AuditTreeElement.prototype._handleManagerEditingChanged): Added.
1341         * UserInterface/Views/AuditTreeElement.css:
1342         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Added.
1343         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
1344         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:not(:hover)): Deleted.
1345         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
1346         Prevent selection and running when editing.
1347
1348         * UserInterface/Views/TreeOutline.css:
1349         (.tree-outline .children.expanded:not([hidden])): Added.
1350         (.tree-outline .children.expanded): Deleted.
1351
1352         * UserInterface/Base/ObjectStore.js:
1353         (WI.ObjectStore._open):
1354         Batch operations together to help avoid multiple simultaneous `indexedDB.open` calls. This
1355         should also help preserve the order of operations, as once the database is open, operations
1356         are executed in the order they were enqueued.
1357
1358         (WI.ObjectStore.prototype.async.addObject):
1359         Pass a unique `Symbol` to the `toJSON` call on the given object so that the object can save
1360         additional values that wouldn't normally be saved. This doesn't conflict with normal usage
1361         of `toJSON` (e.g. `JSON.stringify`) because that case also passes in a value:
1362          - `undefined`, if it was called directly on the object
1363          - the key for this object in the containing object
1364          - the index of this object in the containing array
1365         In any case, the value can never equal the unique `Symbol`, so it's guaranteed that the code
1366         will only run for `WI.ObjectStore` operations.
1367
1368         (WI.ObjectStore.prototype.async.clear): Added.
1369
1370         * Localizations/en.lproj/localizedStrings.js:
1371
1372 2019-01-09  Devin Rousso  <drousso@apple.com>
1373
1374         Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open
1375         https://bugs.webkit.org/show_bug.cgi?id=193284
1376
1377         Reviewed by Joseph Pecoraro.
1378
1379         If inspector^2 is closed, stringify all messages.
1380         If inspector^2 is open, log each message JSON object without modifying it.
1381
1382         * UserInterface/Protocol/LoggingProtocolTracer.js:
1383         (WI.LoggingProtocolTracer.prototype._processEntry):
1384
1385 2019-01-09  Nikita Vasilyev  <nvasilyev@apple.com>
1386
1387         Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
1388         https://bugs.webkit.org/show_bug.cgi?id=193218
1389         <rdar://problem/47098303>
1390
1391         Reviewed by Devin Rousso.
1392
1393         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1394         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
1395         A style property may get removed on blur event, so propertyElement may get removed from the DOM right when mousedown event happens.
1396
1397         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick):
1398         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
1399         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
1400
1401 2019-01-08  Nikita Vasilyev  <nvasilyev@apple.com>
1402
1403         Web Inspector: Styles: Undo reverts all changes at once
1404         https://bugs.webkit.org/show_bug.cgi?id=177676
1405         <rdar://problem/34745031>
1406
1407         Reviewed by Devin Rousso.
1408
1409         Command-Z used to revert all changes at once because Web Inspector never
1410         set any history checkpoints in the style editor.
1411
1412         * UserInterface/Views/SpreadsheetStyleProperty.js:
1413         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
1414         * UserInterface/Views/SpreadsheetTextField.js:
1415         (WI.SpreadsheetTextField.prototype._handleBlur):
1416
1417 2019-01-08  Nikita Vasilyev  <nvasilyev@apple.com>
1418
1419         Web Inspector: Use prefers-color-scheme instead of prefers-dark-interface
1420         https://bugs.webkit.org/show_bug.cgi?id=193265
1421
1422         Reviewed by Timothy Hatcher.
1423
1424         * UserInterface/Views/AuditTestContentView.css:
1425         (@media (prefers-color-scheme: dark)):
1426         * UserInterface/Views/AuditTestGroupContentView.css:
1427         (@media (prefers-color-scheme: dark)):
1428         * UserInterface/Views/BezierEditor.css:
1429         (@media (prefers-color-scheme: dark)):
1430         * UserInterface/Views/BoxModelDetailsSectionRow.css:
1431         (@media (prefers-color-scheme: dark)):
1432         * UserInterface/Views/BreakpointActionView.css:
1433         (@media (prefers-color-scheme: dark)):
1434         * UserInterface/Views/BreakpointPopoverController.css:
1435         (@media (prefers-color-scheme: dark)):
1436         * UserInterface/Views/ButtonNavigationItem.css:
1437         (@media (prefers-color-scheme: dark)):
1438         * UserInterface/Views/ButtonToolbarItem.css:
1439         (@media (prefers-color-scheme: dark)):
1440         * UserInterface/Views/CallFrameView.css:
1441         (@media (prefers-color-scheme: dark)):
1442         * UserInterface/Views/CanvasContentView.css:
1443         (@media (prefers-color-scheme: dark)):
1444         * UserInterface/Views/CanvasOverviewContentView.css:
1445         (@media (prefers-color-scheme: dark)):
1446         * UserInterface/Views/CanvasSidebarPanel.css:
1447         (@media (prefers-color-scheme: dark)):
1448         * UserInterface/Views/CanvasTabContentView.css:
1449         (@media (prefers-color-scheme: dark)):
1450         * UserInterface/Views/CodeMirrorOverrides.css:
1451         (@media (prefers-color-scheme: dark)):
1452         * UserInterface/Views/CompletionSuggestionsView.css:
1453         (@media (prefers-color-scheme: dark)):
1454         * UserInterface/Views/ComputedStyleDetailsPanel.css:
1455         (@media (prefers-color-scheme: dark)):
1456         * UserInterface/Views/ComputedStyleSection.css:
1457         (@media (prefers-color-scheme: dark)):
1458         * UserInterface/Views/ConsoleMessageView.css:
1459         (@media (prefers-color-scheme: dark)):
1460         * UserInterface/Views/ConsolePrompt.css:
1461         (@media (prefers-color-scheme: dark)):
1462         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
1463         (@media (prefers-color-scheme: dark)):
1464         * UserInterface/Views/DOMTreeOutline.css:
1465         (@media (prefers-color-scheme: dark)):
1466         * UserInterface/Views/DataGrid.css:
1467         (@media (prefers-color-scheme: dark)):
1468         * UserInterface/Views/DebuggerDashboardView.css:
1469         (@media (prefers-color-scheme: dark)):
1470         * UserInterface/Views/DebuggerSidebarPanel.css:
1471         (@media (prefers-color-scheme: dark)):
1472         * UserInterface/Views/DefaultDashboardView.css:
1473         (@media (prefers-color-scheme: dark)):
1474         * UserInterface/Views/DetailsSection.css:
1475         (@media (prefers-color-scheme: dark)):
1476         * UserInterface/Views/DividerNavigationItem.css:
1477         (@media (prefers-color-scheme: dark)):
1478         * UserInterface/Views/Editing.css:
1479         (@media (prefers-color-scheme: dark)):
1480         * UserInterface/Views/FindBanner.css:
1481         (@media (prefers-color-scheme: dark)):
1482         * UserInterface/Views/FontResourceContentView.css:
1483         (@media (prefers-color-scheme: dark)):
1484         * UserInterface/Views/FormattedValue.css:
1485         (@media (prefers-color-scheme: dark)):
1486         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
1487         (@media (prefers-color-scheme: dark)):
1488         * UserInterface/Views/HoverMenu.css:
1489         (@media (prefers-color-scheme: dark)):
1490         * UserInterface/Views/ImageResourceContentView.css:
1491         (@media (prefers-color-scheme: dark)):
1492         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
1493         (@media (prefers-color-scheme: dark)):
1494         * UserInterface/Views/LogContentView.css:
1495         (@media (prefers-color-scheme: dark)):
1496
1497         * UserInterface/Views/Main.css:
1498         (:root):
1499
1500         (@media (prefers-color-scheme: dark)):
1501         * UserInterface/Views/NetworkDetailView.css:
1502         (@media (prefers-color-scheme: dark)):
1503         * UserInterface/Views/NetworkTableContentView.css:
1504         (@media (prefers-color-scheme: dark)):
1505         * UserInterface/Views/NewTabContentView.css:
1506         (@media (prefers-color-scheme: dark)):
1507         * UserInterface/Views/ObjectPreviewView.css:
1508         (@media (prefers-color-scheme: dark)):
1509         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
1510         (@media (prefers-color-scheme: dark)):
1511         * UserInterface/Views/OpenResourceDialog.css:
1512         (@media (prefers-color-scheme: dark)):
1513         * UserInterface/Views/ProgressView.css:
1514         (@media (prefers-color-scheme: dark)):
1515         * UserInterface/Views/QuickConsole.css:
1516         (@media (prefers-color-scheme: dark)):
1517         * UserInterface/Views/RecordingActionTreeElement.css:
1518         (@media (prefers-color-scheme: dark)):
1519         * UserInterface/Views/RecordingContentView.css:
1520         (@media (prefers-color-scheme: dark)):
1521         * UserInterface/Views/RecordingStateDetailsSidebarPanel.css:
1522         (@media (prefers-color-scheme: dark)):
1523         * UserInterface/Views/ResourceSecurityContentView.css:
1524         (@media (prefers-color-scheme: dark)):
1525         * UserInterface/Views/ResourceSizesContentView.css:
1526         (@media (prefers-color-scheme: dark)):
1527         * UserInterface/Views/ResourceTimingBreakdownView.css:
1528         (@media (prefers-color-scheme: dark)):
1529         * UserInterface/Views/ScopeBar.css:
1530         (@media (prefers-color-scheme: dark)):
1531         * UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
1532         (@media (prefers-color-scheme: dark)):
1533         * UserInterface/Views/SearchBar.css:
1534         (@media (prefers-color-scheme: dark)):
1535         * UserInterface/Views/SearchSidebarPanel.css:
1536         (@media (prefers-color-scheme: dark)):
1537         * UserInterface/Views/SettingsTabContentView.css:
1538         (@media (prefers-color-scheme: dark)):
1539         * UserInterface/Views/ShaderProgramContentView.css:
1540         (@media (prefers-color-scheme: dark)):
1541         * UserInterface/Views/ShaderProgramTreeElement.css:
1542         (@media (prefers-color-scheme: dark)):
1543         * UserInterface/Views/SourceCodeTextEditor.css:
1544         (@media (prefers-color-scheme: dark)):
1545         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1546         (@media (prefers-color-scheme: dark)):
1547         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1548         (@media (prefers-color-scheme: dark)):
1549         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
1550         (@media (prefers-color-scheme: dark)):
1551         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
1552         (@media (prefers-color-scheme: dark)):
1553         * UserInterface/Views/TabBar.css:
1554         (@media (prefers-color-scheme: dark)):
1555         * UserInterface/Views/Table.css:
1556         (@media (prefers-color-scheme: dark)):
1557         * UserInterface/Views/TextEditor.css:
1558         (@media (prefers-color-scheme: dark)):
1559         * UserInterface/Views/TimelineDataGrid.css:
1560         (@media (prefers-color-scheme: dark)):
1561         * UserInterface/Views/TimelineIcons.css:
1562         (@media (prefers-color-scheme: dark)):
1563         * UserInterface/Views/TimelineOverview.css:
1564         (@media (prefers-color-scheme: dark)):
1565         * UserInterface/Views/Toolbar.css:
1566         (@media (prefers-color-scheme: dark)):
1567         * UserInterface/Views/TreeOutline.css:
1568         (@media (prefers-color-scheme: dark)):
1569         * UserInterface/Views/URLBreakpointPopover.css:
1570         (@media (prefers-color-scheme: dark)):
1571         * UserInterface/Views/Variables.css:
1572         (@media (prefers-color-scheme: dark)):
1573         * UserInterface/Views/WebSocketContentView.css:
1574         (@media (prefers-color-scheme: dark)):
1575
1576 2019-01-07  Devin Rousso  <drousso@apple.com>
1577
1578         Web Inspector: Audit: run arrow shouldn't be visible when running tests
1579         https://bugs.webkit.org/show_bug.cgi?id=192209
1580         <rdar://problem/46423615>
1581
1582         Reviewed by Brian Burg.
1583
1584         * UserInterface/Views/AuditTreeElement.js:
1585         (WI.AuditTreeElement.prototype.onattach):
1586         (WI.AuditTreeElement.prototype.ondetach):
1587         (WI.AuditTreeElement.prototype._updateLevel):
1588         (WI.AuditTreeElement.prototype._handleAuditManagerTestScheduled): Added.
1589         (WI.AuditTreeElement.prototype._handleAuditManagerTestCompleted): Added.
1590         * UserInterface/Views/AuditTreeElement.css: Added.
1591         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Added.
1592         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
1593         (.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img): Deleted.
1594         (.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
1595
1596 2019-01-07  Devin Rousso  <drousso@apple.com>
1597
1598         Web Inspector: extend XHR breakpoints to work with fetch
1599         https://bugs.webkit.org/show_bug.cgi?id=185843
1600         <rdar://problem/40431027>
1601
1602         Reviewed by Matt Baker.
1603
1604         * UserInterface/Controllers/DOMDebuggerManager.js:
1605         (WI.DOMDebuggerManager):
1606         (WI.DOMDebuggerManager.supportsURLBreakpoints): Added.
1607         (WI.DOMDebuggerManager.prototype.get urlBreakpoints): Added.
1608         (WI.DOMDebuggerManager.prototype.urlBreakpointForURL): Added.
1609         (WI.DOMDebuggerManager.prototype.addURLBreakpoint): Added.
1610         (WI.DOMDebuggerManager.prototype.removeURLBreakpoint): Added.
1611         (WI.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
1612         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint): Added.
1613         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint): Added.
1614         (WI.DOMDebuggerManager.prototype._saveURLBreakpoints): Added.
1615         (WI.DOMDebuggerManager.prototype._urlBreakpointDisabledStateDidChange): Added.
1616         (WI.DOMDebuggerManager.prototype.get xhrBreakpoints): Deleted.
1617         (WI.DOMDebuggerManager.prototype.xhrBreakpointForURL): Deleted.
1618         (WI.DOMDebuggerManager.prototype.addXHRBreakpoint): Deleted.
1619         (WI.DOMDebuggerManager.prototype.removeXHRBreakpoint): Deleted.
1620         (WI.DOMDebuggerManager.prototype._updateXHRBreakpoint.breakpointUpdated): Deleted.
1621         (WI.DOMDebuggerManager.prototype._updateXHRBreakpoint): Deleted.
1622         (WI.DOMDebuggerManager.prototype._resolveXHRBreakpoint): Deleted.
1623         (WI.DOMDebuggerManager.prototype._saveXHRBreakpoints): Deleted.
1624         (WI.DOMDebuggerManager.prototype._xhrBreakpointDisabledStateDidChange): Deleted.
1625
1626         * UserInterface/Controllers/DebuggerManager.js:
1627         (WI.DebuggerManager.prototype._pauseReasonFromPayload):
1628
1629         * UserInterface/Views/DebuggerSidebarPanel.js:
1630         (WI.DebuggerSidebarPanel):
1631         (WI.DebuggerSidebarPanel.prototype.willDismissPopover):
1632         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
1633         (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
1634         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
1635         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
1636         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked):
1637
1638         * UserInterface/Views/NavigationSidebarPanel.js:
1639         (WI.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
1640
1641         * UserInterface/Models/URLBreakpoint.js: Renamed from Source/WebInspectorUI/UserInterface/Models/XHRBreakpoint.js.
1642         * UserInterface/Views/URLBreakpointPopover.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.css.
1643         * UserInterface/Views/URLBreakpointPopover.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.js.
1644         * UserInterface/Views/URLBreakpointTreeElement.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.css.
1645         * UserInterface/Views/URLBreakpointTreeElement.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.js.
1646
1647         * UserInterface/Base/Setting.js:
1648         (WI.Setting.migrateValue): Added.
1649
1650         * UserInterface/Main.html:
1651         * UserInterface/Test.html:
1652
1653         * Localizations/en.lproj/localizedStrings.js:
1654
1655 2019-01-07  Devin Rousso  <drousso@apple.com>
1656
1657         Web Inspector: Network: show secure connection details per-request
1658         https://bugs.webkit.org/show_bug.cgi?id=191539
1659         <rdar://problem/45979891>
1660
1661         Reviewed by Joseph Pecoraro.
1662
1663         * UserInterface/Models/Resource.js:
1664         (WI.Resource):
1665         (WI.Resource.prototype.get security): Added.
1666         (WI.Resource.prototype.updateForResponse):
1667         (WI.Resource.prototype.updateWithMetrics):
1668         (WI.Resource.prototype.get responseSecurity): Deleted.
1669
1670         * UserInterface/Views/ResourceSecurityContentView.js:
1671         (WI.ResourceSecurityContentView):
1672         (WI.ResourceSecurityContentView.prototype.initialLayout):
1673         (WI.ResourceSecurityContentView.prototype.layout):
1674         (WI.ResourceSecurityContentView.prototype._refreshConnectionSection): Added.
1675         (WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
1676         (WI.ResourceSecurityContentView.prototype._handleResourceMetricsDidChange): Added.
1677         * UserInterface/Views/ResourceSecurityContentView.css:
1678         (body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
1679         (@media (prefers-dark-interface) body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
1680         (body[dir] .resource-security > section.certificate > .details): Deleted.
1681         (@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details): Deleted.
1682
1683         * Localizations/en.lproj/localizedStrings.js:
1684
1685 2019-01-07  Nikita Vasilyev  <nvasilyev@apple.com>
1686
1687         Web Inspector: "white" isn't recognized as a color keyword
1688         https://bugs.webkit.org/show_bug.cgi?id=193173
1689         <rdar://problem/47068595>
1690
1691         Reviewed by Joseph Pecoraro.
1692
1693         Attempt to parse "atom" token types as colors.
1694
1695         Display color picker only for color-aware properties. For instance,
1696         display it for "color: white" but not for "-apple-pay-button-style: white".
1697
1698         * UserInterface/Models/CSSKeywordCompletions.js:
1699         (addKeywordsForName):
1700         (WI.CSSKeywordCompletions.forProperty):
1701         (WI.CSSKeywordCompletions.isColorAwareProperty):
1702         * UserInterface/Views/SpreadsheetStyleProperty.js:
1703         (WI.SpreadsheetStyleProperty.prototype._renderValue):
1704         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
1705
1706 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
1707
1708         Web Inspector: subclasses of WI.ClusterContentView don't save/restore content views after the initial view
1709         https://bugs.webkit.org/show_bug.cgi?id=192451
1710         <rdar://problem/46800958>
1711
1712         Reviewed by Devin Rousso.
1713
1714         * UserInterface/Models/BackForwardEntry.js:
1715         (WI.BackForwardEntry.prototype.prepareToHide):
1716         * UserInterface/Views/ClusterContentView.js:
1717         (WI.ClusterContentView.prototype.get shouldSaveStateOnHide):
1718         * UserInterface/Views/ContentView.js:
1719         (WI.ContentView.prototype.get shouldSaveStateOnHide):
1720         Allow ClusterContentViews to save its state whenever its hidden,
1721         this means it can be properly restored to the last state it had
1722         instead of the initial state it was shown with.
1723
1724 2019-01-04  Devin Rousso  <drousso@apple.com>
1725
1726         Web Inspector: Audit: disable breakpoints when running Audit
1727         https://bugs.webkit.org/show_bug.cgi?id=193158
1728         <rdar://problem/47057083>
1729
1730         Reviewed by Joseph Pecoraro.
1731
1732         * UserInterface/Controllers/DebuggerManager.js:
1733         (WI.DebuggerManager):
1734         (WI.DebuggerManager.prototype._startDisablingBreakpointsTemporarily):
1735         (WI.DebuggerManager.prototype._stopDisablingBreakpointsTemporarily):
1736         (WI.DebuggerManager.prototype._handleAuditManagerTestScheduled): Added.
1737         (WI.DebuggerManager.prototype._handleAuditManagerTestCompleted): Added.
1738
1739         * UserInterface/Views/DebuggerSidebarPanel.js:
1740         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
1741         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
1742         (WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
1743         (WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
1744         (WI.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):
1745         * UserInterface/Views/DebuggerSidebarPanel.css:
1746         (.sidebar > .panel.navigation.debugger .warning-banner + .warning-banner): Added.
1747
1748         * UserInterface/Base/Main.js:
1749         (WI.loaded):
1750         * UserInterface/Test/Test.js:
1751         (WI.loaded):
1752         Move `WI.auditManager` higher in the managers list so that it can be used in
1753         `WI.DebuggerManager`'s constructor.
1754
1755         * Localizations/en.lproj/localizedStrings.js:
1756
1757 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
1758
1759         Web Inspector: Add a Setting Toggle for Source Maps
1760         https://bugs.webkit.org/show_bug.cgi?id=193148
1761
1762         Reviewed by Devin Rousso.
1763
1764         * UserInterface/Controllers/NetworkManager.js:
1765         (WI.NetworkManager.prototype.downloadSourceMap):
1766         Don't download source maps if the setting is disabled.
1767
1768         * UserInterface/Base/Setting.js:
1769         * UserInterface/Views/SettingsTabContentView.js:
1770         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1771         Settings toggle for source maps. Enabled by default.
1772
1773         * Localizations/en.lproj/localizedStrings.js:
1774
1775 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
1776
1777         Web Inspector: Include `globalThis` in default JavaScript completions
1778         https://bugs.webkit.org/show_bug.cgi?id=193147
1779
1780         Reviewed by Devin Rousso.
1781
1782         * UserInterface/Controllers/CodeMirrorCompletionController.js:
1783         Add `globalThis` which is a new global value.
1784
1785 2019-01-03  Devin Rousso  <drousso@apple.com>
1786
1787         Web Inspector: conic-gradient color picker doesn't accurately show color when saturation value is not 100%
1788         https://bugs.webkit.org/show_bug.cgi?id=192729
1789         <rdar://problem/46746815>
1790
1791         Reviewed by Joseph Pecoraro.
1792
1793         Rework `WI.ColorWheel` to use similar canvas drawing logic as `WI.LegacyColorWheel` so that
1794         it's able to adjust the saturation value as the pixels gets closer to the center.
1795
1796         * UserInterface/Models/Color.js:
1797         (WI.Color.rgb2hsl): Added.
1798         (WI.Color.hsl2rgb): Added.
1799         (WI.Color.cmyk2rgb):
1800         (WI.Color.prototype.isKeyword):
1801         (WI.Color.prototype._toRGBString):
1802         (WI.Color.prototype._toRGBAString):
1803         (WI.Color.prototype._toHSLString):
1804         (WI.Color.prototype._toHSLAString):
1805         (WI.Color.prototype._rgbaToHSLA):
1806         (WI.Color.prototype._hslaToRGBA):
1807         (WI.Color.rgb2hsv): Deleted.
1808         (WI.Color.hsv2rgb): Deleted.
1809         (WI.Color.prototype._rgbToHSL): Deleted.
1810         (WI.Color.prototype._hslToRGB): Deleted.
1811         Adjust the conversion functions of `WI.Color` to be more accurate.
1812
1813         * UserInterface/Views/ColorWheel.js:
1814         (WI.ColorWheel):
1815         (WI.ColorWheel.prototype.set dimension):
1816         (WI.ColorWheel.prototype.set brightness):
1817         (WI.ColorWheel.prototype.get tintedColor):
1818         (WI.ColorWheel.prototype.set tintedColor):
1819         (WI.ColorWheel.prototype._updateColorForMouseEvent):
1820         (WI.ColorWheel.prototype._updateCanvas): Added.
1821         (WI.ColorWheel.prototype._updateGradient): Deleted.
1822         * UserInterface/Views/ColorWheel.css:
1823         (.color-wheel > canvas): Added.
1824         (.color-wheel > .gradient): Deleted.
1825
1826         * UserInterface/Views/ColorPicker.js:
1827         (WI.ColorPicker):
1828         (WI.ColorPicker.prototype.set color):
1829         (WI.ColorPicker.prototype.sliderValueDidChange):
1830         (WI.ColorPicker.prototype._updateSliders):
1831         (WI.ColorPicker.prototype._showColorComponentInputs):
1832         (WI.ColorPicker.supportsConicGradient): Deleted.
1833
1834         * UserInterface/Main.html:
1835
1836         * UserInterface/Views/LegacyColorWheel.js: Removed.
1837
1838 2019-01-02  Nikita Vasilyev  <nvasilyev@apple.com>
1839
1840         Web Inspector: Styles: selection lost when inspector is blurred
1841         https://bugs.webkit.org/show_bug.cgi?id=192124
1842         <rdar://problem/46800965>
1843
1844         Reviewed by Devin Rousso.
1845
1846         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1847         (body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor .property.selected):
1848         Selection should be gray when Web Inspector window isn't focused.
1849
1850         * UserInterface/Views/SpreadsheetStyleProperty.js:
1851
1852 2019-01-02  Nikita Vasilyev  <nvasilyev@apple.com>
1853
1854         Web Inspector: Styles: it shouldn't be possible to delete read-only properties
1855         https://bugs.webkit.org/show_bug.cgi?id=193099
1856         <rdar://problem/47016335>
1857
1858         Reviewed by Devin Rousso.
1859
1860         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1861         (WI.SpreadsheetCSSStyleDeclarationEditor):
1862         Drive-by: Forward Delete should work the same way as Delete (Backspace).
1863
1864 2019-01-02  Devin Rousso  <webkit@devinrousso.com>
1865
1866         Web Inspector: Implement `queryObjects` Command Line API
1867         https://bugs.webkit.org/show_bug.cgi?id=176766
1868         <rdar://problem/34890689>
1869
1870         Reviewed by Joseph Pecoraro.
1871
1872         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1873         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
1874         Add `queryObjects` to the list of command line functions.
1875
1876 2018-12-21  Devin Rousso  <drousso@apple.com>
1877
1878         Web Inspector: Styles Redesign: remove unused CSS style icons
1879         https://bugs.webkit.org/show_bug.cgi?id=192999
1880         <rdar://problem/46912094>
1881
1882         Reviewed by Matt Baker.
1883
1884         * UserInterface/Main.html:
1885         * UserInterface/Views/StyleRuleIcons.css: Removed.
1886         * UserInterface/Images/StyleRule.svg: Removed.
1887         * UserInterface/Images/StyleRuleInheritedElement.svg: Removed.
1888         * UserInterface/Images/StyleRulePseudoElement.svg: Removed.
1889
1890         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
1891         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
1892
1893 2018-12-21  Nikita Vasilyev  <nvasilyev@apple.com>
1894
1895         Web Inspector: Styles: editing focus lost when inspector is blurred
1896         https://bugs.webkit.org/show_bug.cgi?id=192123
1897         <rdar://problem/46800966>
1898
1899         Reviewed by Devin Rousso.
1900
1901         * UserInterface/Views/SpreadsheetSelectorField.js:
1902         (WI.SpreadsheetSelectorField.prototype._handleBlur):
1903         * UserInterface/Views/SpreadsheetTextField.js:
1904         (WI.SpreadsheetTextField.prototype._handleBlur):
1905
1906 2018-12-21  Devin Rousso  <drousso@apple.com>
1907
1908         Web Inspector: Settings: experimental setting editors are misaligned in other locales
1909         https://bugs.webkit.org/show_bug.cgi?id=192971
1910         <rdar://problem/46718451>
1911
1912         Reviewed by Joseph Pecoraro.
1913
1914         * UserInterface/Views/SettingsTabContentView.css:
1915         (.content-view.settings > .settings-view > .container):
1916         (.content-view.settings > .settings-view > .container > .title):
1917
1918 2018-12-21  Devin Rousso  <drousso@apple.com>
1919
1920         Web Inspector: update scroll position when revealing a virtualized WI.DataGridNode
1921         https://bugs.webkit.org/show_bug.cgi?id=192992
1922         <rdar://problem/46886427>
1923
1924         Reviewed by Joseph Pecoraro.
1925
1926         When `reveal`ing a `WI.DataGridNode`, if it is not currently in the DOM tree (e.g. it's been
1927         virtualized by it's owner `WI.DataGrid`), we need to scroll to it's position so that it gets
1928         added to the DOM tree before it can be revealed/selected.
1929
1930         * UserInterface/Views/DataGrid.js:
1931         (WI.DataGrid.prototype.layout):
1932         (WI.DataGrid.prototype.updateVisibleRows):
1933         (WI.DataGrid.prototype._updateVisibleRows): Deleted.
1934
1935         * UserInterface/Views/DataGridNode.js:
1936         (WI.DataGridNode.prototype.reveal):
1937
1938 2018-12-20  Nikita Vasilyev  <nvasilyev@apple.com>
1939
1940         Web Inspector: Dark Mode: Type profiler popovers have black text on dark background
1941         https://bugs.webkit.org/show_bug.cgi?id=192916
1942         <rdar://problem/46863518>
1943
1944         Reviewed by Devin Rousso.
1945
1946         * UserInterface/Views/SourceCodeTextEditor.css:
1947         (.popover .debugger-popover-content > .body):
1948         * UserInterface/Views/TypeTreeElement.css:
1949         (.item.type-tree-element.prototype):
1950         (.item.type-tree-element.prototype:hover,):
1951         * UserInterface/Views/TypeTreeView.css:
1952         (.type-tree):
1953         * UserInterface/Views/Variables.css:
1954         (:root):
1955
1956 2018-12-20  Nikita Vasilyev  <nvasilyev@apple.com>
1957
1958         Web Inspector: Styles: Pressing Esc when editing name/value should select entire property
1959         https://bugs.webkit.org/show_bug.cgi?id=192919
1960
1961         Reviewed by Devin Rousso.
1962
1963         - Esc still hides the completion popover.
1964         - Esc still discards changes.
1965         - When there's no completion popover, Esc selects outer scope.
1966           I.e., it goes from editing name/value to selecting the entire property.
1967         - Pressing Esc for newly added properties discards those properties.
1968
1969         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1970         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
1971         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyDidPressEsc):
1972         * UserInterface/Views/SpreadsheetStyleProperty.js:
1973         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidPressEsc):
1974         * UserInterface/Views/SpreadsheetTextField.js:
1975         (WI.SpreadsheetTextField.prototype._discardChange):
1976         (WI.SpreadsheetTextField.prototype._handleKeyDown):
1977
1978 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
1979
1980         Web Inspector: Charles Proxy errors opening har files exported from Safari (invalid startedDateTime)
1981         https://bugs.webkit.org/show_bug.cgi?id=192959
1982         <rdar://problem/46863411>
1983
1984         Reviewed by Brian Burg.
1985
1986         * UserInterface/Views/NetworkTableContentView.js:
1987         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
1988         (WI.NetworkTableContentView.prototype._updateExportButton):
1989         (WI.NetworkTableContentView.prototype._canExportHAR):
1990         Disallow HAR export if we don't have load data, such as the requestSentDate for
1991         the main resource or sub-resources.
1992
1993         (WI.NetworkTableContentView.prototype._HARResources):
1994         Only export resources that have load data.
1995
1996 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
1997
1998         Web Inspector: Autoformat doesn't work on icloud.com (javascript-packed.js)
1999         https://bugs.webkit.org/show_bug.cgi?id=192946
2000         <rdar://problem/42546126>
2001
2002         Rubber-stamped by Devin Rousso.
2003
2004         * UserInterface/Base/Utilities.js:
2005         (whitespaceRatio):
2006         (isTextLikelyMinified):
2007         Check the first 2500 and the last 2500 characters whitespace ratio.
2008         If either is below 20% then treat as minified.
2009
2010 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2011
2012         ITMLKit Inspector: Elements tab does not show DOM Tree
2013         https://bugs.webkit.org/show_bug.cgi?id=192910
2014         <rdar://problem/46680585>
2015
2016         Reviewed by Brian Burg.
2017
2018         * UserInterface/Protocol/Connection.js:
2019         (InspectorBackend.Connection.prototype._dispatchEvent):
2020         Better logging for errors.
2021
2022         * UserInterface/Base/Main.js:
2023         * UserInterface/Controllers/AppController.js:
2024         (WI.AppController.prototype.activateExtraDomains):
2025         Let Targets get a chance to activate extra domains.
2026         Perform a little more work in these cases.
2027
2028         * UserInterface/Protocol/Target.js:
2029         (WI.Target):
2030         (WI.Target.prototype.activateExtraDomain):
2031         Expose agents for domains that are active.
2032         Expose agents for extra domains when they are activated.
2033
2034 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2035
2036         ITMLKit Inspector: Computed Style Box Model section throws exceptions
2037         https://bugs.webkit.org/show_bug.cgi?id=192911
2038         <rdar://problem/46861112>
2039
2040         Reviewed by Matt Baker.
2041
2042         * UserInterface/Views/BoxModelDetailsSectionRow.js:
2043         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
2044         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
2045         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
2046         ITMLKit doesn't always provide a display/position/width/height etc properties.
2047         Protect against this, and just show an empty message in the box model section
2048         if those properties do not exist.
2049
2050 2018-12-20  Devin Rousso  <drousso@apple.com>
2051
2052         Web Inspector: UIString should take an optional key and description to aid localization
2053         https://bugs.webkit.org/show_bug.cgi?id=153962
2054         <rdar://problem/24542505>
2055
2056         Reviewed by Brian Burg.
2057
2058         * UserInterface/Base/LoadLocalizedStrings.js:
2059         (WI.UIString):
2060
2061         * UserInterface/Test/Test.js:
2062         (WI.UIString):
2063
2064         * UserInterface/Views/AuditTestGroupContentView.js:
2065         (WI.AuditTestGroupContentView.prototype.initialLayout):
2066
2067 2018-12-20  Devin Rousso  <drousso@apple.com>
2068
2069         Web Inspector: Audits: don't cache default audits
2070         https://bugs.webkit.org/show_bug.cgi?id=192918
2071         <rdar://problem/46626543>
2072
2073         Reviewed by Brian Burg.
2074
2075         Instead of adding the default audits to the "audits" `WI.ObjectStore`, which preserves them
2076         across WebInspector sessions, load them every time WebInspector is opened (unless there are
2077         existing audits) so that the localized strings are able to respond to locale changes.
2078
2079         * UserInterface/Controllers/AuditManager.js:
2080         (WI.AuditManager.prototype.removeTest):
2081         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2082
2083 2018-12-20  Devin Rousso  <drousso@apple.com>
2084
2085         Web Inspector: Dark Mode: unreadable background color for tables containing object previews
2086         https://bugs.webkit.org/show_bug.cgi?id=192887
2087         <rdar://problem/46855270>
2088
2089         Reviewed by Brian Burg.
2090
2091         * UserInterface/Views/LogContentView.css:
2092         (.console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
2093         (@media (prefers-dark-interface) .console-item .data-grid tr.selected): Added.
2094         (@media (prefers-dark-interface) .console-messages:focus .console-item.selected .data-grid tr.selected): Added.
2095         (@media (prefers-dark-interface) .console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
2096
2097         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
2098         (.content-view.indexed-database-object-store > .data-grid tr.selected):
2099         (.content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
2100         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid tr.selected): Added.
2101         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
2102         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected td:not(:last-child)): Added.
2103
2104 2018-12-19  Devin Rousso  <drousso@apple.com>
2105
2106         Web Inspector: Audit: fix descriptions for default tests
2107         https://bugs.webkit.org/show_bug.cgi?id=192764
2108         <rdar://problem/46729437>
2109
2110         Reviewed by Matt Baker.
2111
2112         * UserInterface/Controllers/AuditManager.js:
2113         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2114
2115         * Localizations/en.lproj/localizedStrings.js:
2116
2117 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2118
2119         Web Inspector: "E" icon on debugger dashboard is too close to current function name
2120         https://bugs.webkit.org/show_bug.cgi?id=192915
2121
2122         Reviewed by Matt Baker.
2123
2124         * UserInterface/Views/DebuggerDashboardView.css:
2125         (.dashboard.debugger > .location):
2126         (body[dir=ltr] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
2127         (body[dir=rtl] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
2128         (.dashboard.debugger > .location .function-icon): Deleted.
2129         (body[dir=ltr] .dashboard.debugger > .location .function-icon): Deleted.
2130         (body[dir=rtl] .dashboard.debugger > .location .function-icon): Deleted.
2131
2132 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2133
2134         Web Inspector: Dark Mode: ThreadTreeElement status icon is hard to see when hovered
2135         https://bugs.webkit.org/show_bug.cgi?id=192097
2136         <rdar://problem/46318421>
2137
2138         Reviewed by Matt Baker.
2139
2140         * UserInterface/Views/ThreadTreeElement.css:
2141         (.tree-outline > .item.thread .status-button.resume):
2142         (.tree-outline > .item.thread .status-button.resume:active):
2143
2144 2018-12-19  Devin Rousso  <drousso@apple.com>
2145
2146         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'effectiveDOMNode.enabledPseudoClasses')
2147         https://bugs.webkit.org/show_bug.cgi?id=192783
2148
2149         Reviewed by Joseph Pecoraro.
2150
2151         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
2152         (WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
2153         (WI.GeneralStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):
2154
2155 2018-12-19  Devin Rousso  <drousso@apple.com>
2156
2157         Web Inspector: REGRESSION (r237195): Timelines: selecting a rendering frame row moves the time selection
2158         https://bugs.webkit.org/show_bug.cgi?id=192773
2159         <rdar://problem/46782446>
2160
2161         Reviewed by Joseph Pecoraro.
2162
2163         * UserInterface/Views/TimelineOverview.js:
2164         (WI.TimelineOverview.prototype._recordSelected):
2165         The Frames timeline uses `frameIndex` instead of `startTime`/`endTime`, so when trying to
2166         ensure that the selected record is within the filtered range, use `frameIndex` instead.
2167         The associated `WI.TimelineRuler` will already be using an index-based approach for
2168         selection, so this will match.
2169
2170 2018-12-19  Devin Rousso  <drousso@apple.com>
2171
2172         Web Inspector: Canvas: the recording auto-capture input shouldn't start focused
2173         https://bugs.webkit.org/show_bug.cgi?id=192454
2174
2175         Reviewed by Joseph Pecoraro.
2176
2177         * UserInterface/Views/CanvasOverviewContentView.js:
2178         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
2179         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
2180
2181 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2182
2183         Web Inspector: Styles: shift-clicking a color-swatch to change formats starts editing the color
2184         https://bugs.webkit.org/show_bug.cgi?id=192784
2185         <rdar://problem/46801028>
2186
2187         Reviewed by Devin Rousso.
2188
2189         * UserInterface/Views/SpreadsheetStyleProperty.js:
2190         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
2191
2192 2018-12-19  Matt Baker  <mattbaker@apple.com>
2193
2194         Web Inspector: Elements tab: arrow key after undoing a DOM node delete selects the wrong element
2195         https://bugs.webkit.org/show_bug.cgi?id=192871
2196         <rdar://problem/46849060>
2197
2198         Reviewed by Devin Rousso.
2199
2200         Undoing a DOM node removal reinserts the node into the DOMTreeOutline.
2201         When the reinserted node precedes the selected node in the tree, the
2202         SelectionController should update `_lastSelectedIndex`.
2203
2204         * UserInterface/Controllers/SelectionController.js:
2205         (WI.SelectionController.prototype.didInsertItem):
2206
2207 2018-12-19  Devin Rousso  <drousso@apple.com>
2208
2209         Web Inspector: Audit: provide localization support for % pass display
2210         https://bugs.webkit.org/show_bug.cgi?id=192870
2211         <rdar://problem/46779245>
2212
2213         Reviewed by Brian Burg.
2214
2215         * UserInterface/Views/AuditTestGroupContentView.js:
2216         (WI.AuditTestGroupContentView.prototype.initialLayout):
2217         (WI.AuditTestGroupContentView.prototype.layout):
2218         * UserInterface/Views/AuditTestGroupContentView.css:
2219         (.content-view.audit-test-group > header > .percentage-pass):
2220         (.content-view.audit-test-group > header > .percentage-pass > span): Added.
2221         (@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass): Added.
2222         (@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass > span): Added.
2223         (.content-view.audit-test-group > header > .percentage-pass:not(:empty)::after): Deleted.
2224
2225         * Localizations/en.lproj/localizedStrings.js:
2226
2227 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2228
2229         Web Inspector: Computed: make UI more usable when the panel is narrow
2230         https://bugs.webkit.org/show_bug.cgi?id=192578
2231         <rdar://problem/46615753>
2232
2233         Reviewed by Devin Rousso.
2234
2235         * UserInterface/Views/ComputedStyleSection.css:
2236         (.computed-style-section .computed-property-item .property-traces):
2237         (.computed-style-section .computed-property-item.expanded .disclosure-button):
2238         (.computed-style-section .computed-property-item .property-trace-item):
2239         (.computed-style-section .computed-property-item .property-trace-item::before):
2240         (.computed-style-section .computed-property-item .property):
2241         (.computed-style-section .computed-property-item .property-trace-item .selector):
2242         Allow CSS property values and selectors to take more than one line.
2243
2244         (.computed-style-section .property-trace-item .property .name,):
2245         * UserInterface/Views/ComputedStyleSection.js:
2246         (WI.ComputedStyleSection.prototype._createTrace):
2247         * UserInterface/Views/SpreadsheetStyleProperty.js:
2248         (WI.SpreadsheetStyleProperty.prototype.update):
2249
2250 2018-12-18  Simon Fraser  <simon.fraser@apple.com>
2251
2252         Web Inspector: Timelines: correctly label Intersection Observer callbacks
2253         https://bugs.webkit.org/show_bug.cgi?id=192669
2254         <rdar://problem/46702490>
2255
2256         Reviewed by Joseph Pecoraro.
2257
2258         Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
2259         to Intersection Observer, Performance Observer and Mutation Observer callbacks so 
2260         that they get correctly labeled in the Inspector timeline.
2261
2262         * Localizations/en.lproj/localizedStrings.js:
2263         * UserInterface/Controllers/TimelineManager.js:
2264         (WI.TimelineManager.prototype._processRecord):
2265         * UserInterface/Models/ScriptTimelineRecord.js:
2266         (WI.ScriptTimelineRecord.EventType.displayName):
2267         * UserInterface/Views/TimelineTabContentView.js:
2268         (WI.TimelineTabContentView.iconClassNameForRecord):
2269
2270 2018-12-19  Devin Rousso  <drousso@apple.com>
2271
2272         Web Inspector: Audit: "Clear Filters" button gets clipped when window is vertically small
2273         https://bugs.webkit.org/show_bug.cgi?id=192868
2274         <rdar://problem/46780400>
2275
2276         Reviewed by Matt Baker.
2277
2278         * UserInterface/Views/Main.css:
2279         (.message-text-view):
2280
2281 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2282
2283         Web Inspector: Dark Mode: selected text is too light when Inspector window is inactive
2284         https://bugs.webkit.org/show_bug.cgi?id=190542
2285         <rdar://problem/45238712>
2286
2287         Reviewed by Devin Rousso.
2288
2289         * UserInterface/Views/CodeMirrorOverrides.css:
2290         (.CodeMirror .CodeMirror-selected):
2291
2292 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2293
2294         Web Inspector: column sort controls in Layers tab sidebar don't render correctly in dark mode
2295         https://bugs.webkit.org/show_bug.cgi?id=192845
2296
2297         Reviewed by Devin Rousso.
2298
2299         * UserInterface/Views/DataGrid.css:
2300         (@media (prefers-dark-interface)):
2301         (.data-grid th.sortable:active):
2302         Drive-by: replace obnoxiously light background of the pressed header with a more subtle gray.
2303
2304         (.data-grid th.sort-ascending > div:first-child::after, .data-grid th.sort-descending > div:first-child::after):
2305         Invert colors of the arrow glyph.
2306
2307 2018-12-18  Devin Rousso  <drousso@apple.com>
2308
2309         Web Inspector: Layers: increase default column width for other localizations
2310         https://bugs.webkit.org/show_bug.cgi?id=192812
2311         <rdar://problem/46628625>
2312
2313         Reviewed by Brian Burg.
2314
2315         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2316         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
2317         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
2318         (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
2319
2320 2018-12-18  Joseph Pecoraro  <pecoraro@apple.com>
2321
2322         Web Inspector: m3u8 content not shown, it should be text
2323         https://bugs.webkit.org/show_bug.cgi?id=192731
2324         <rdar://problem/46747728>
2325
2326         Reviewed by Devin Rousso.
2327
2328         * UserInterface/Base/MIMETypeUtilities.js:
2329         (WI.shouldTreatMIMETypeAsText):
2330         Support m3u8/m3u files as text.
2331
2332 2018-12-17  Devin Rousso  <drousso@apple.com>
2333
2334         Web Inspector: Canvas: path view is misaligned
2335         https://bugs.webkit.org/show_bug.cgi?id=192761
2336
2337         Reviewed by Joseph Pecoraro.
2338
2339         * UserInterface/Views/RecordingContentView.css:
2340         (.content-view:not(.tab).recording :matches(img, canvas)):
2341         (.content-view:not(.tab).recording canvas.path):
2342
2343 2018-12-17  Devin Rousso  <drousso@apple.com>
2344
2345         Web Inspector: Audit: add plural result strings
2346         https://bugs.webkit.org/show_bug.cgi?id=192769
2347         <rdar://problem/46628680>
2348
2349         Reviewed by Brian Burg.
2350
2351         * UserInterface/Views/AuditTestContentView.js:
2352         (WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):
2353
2354         * UserInterface/Views/AuditTestGroupContentView.js:
2355         (WI.AuditTestGroupContentView.prototype.layout):
2356
2357         * Localizations/en.lproj/localizedStrings.js:
2358
2359 2018-12-17  Devin Rousso  <drousso@apple.com>
2360
2361         Web Inspector: Settings: add singular "space" UIString
2362         https://bugs.webkit.org/show_bug.cgi?id=192766
2363         <rdar://problem/46776948>
2364
2365         Reviewed by Brian Burg.
2366
2367         * UserInterface/Views/SettingEditor.js:
2368         (WI.SettingEditor):
2369         (WI.SettingEditor.prototype.get label):
2370         (WI.SettingEditor.prototype.set label): Added.
2371
2372         * UserInterface/Views/SettingsTabContentView.js:
2373         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2374         (WI.SettingsTabContentView.prototype._createGeneralSettingsView.addSpacesSetting): Added.
2375         (WI.SettingsTabContentView.prototype._createGeneralSettingsView.addSpacesSetting.updateLabel): Added.
2376
2377         * Localizations/en.lproj/localizedStrings.js:
2378
2379 2018-12-15  Nikita Vasilyev  <nvasilyev@apple.com>
2380
2381         Web Inspector: Styles: toggling selected properties may cause data corruption
2382         https://bugs.webkit.org/show_bug.cgi?id=192396
2383         <rdar://problem/46478383>
2384
2385         Reviewed by Devin Rousso.
2386
2387         Uncommenting a property after a commented out property used to insert an unnecessary semicolon,
2388         and not updating ranges of the following properties.
2389
2390         For example:
2391
2392             /* color: red; */
2393             /* font-size: 12px */
2394
2395         Uncommenting `font-size` would result in something like this:
2396
2397             /* color: red; */; font-size: 12px
2398                              ^
2399                              unnecessary semicolon
2400
2401         Now the semicolon doesn't get inserted and the white space is preserved better:
2402
2403             /* color: red; */
2404             font-size: 12px
2405
2406         * UserInterface/Models/CSSProperty.js:
2407         (WI.CSSProperty.prototype._updateOwnerStyleText):
2408         (WI.CSSProperty.prototype._appendSemicolonIfNeeded): Removed.
2409         (WI.CSSProperty.prototype._prependSemicolonIfNeeded): Added.
2410
2411         * UserInterface/Views/SpreadsheetStyleProperty.js:
2412         (WI.SpreadsheetStyleProperty.prototype.remove):
2413         (WI.SpreadsheetStyleProperty.prototype.update):
2414         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
2415         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
2416         Style declaration should be locked while editing. Add asserts to ensure this.
2417
2418 2018-12-14  Matt Baker  <mattbaker@apple.com>
2419
2420         Web Inspector: REGRESSION(r238599): Uncaught Exception: TypeError: null is not an object (evaluating 'treeElement.listItemElement.classList')
2421         https://bugs.webkit.org/show_bug.cgi?id=192090
2422         <rdar://problem/46318614>
2423
2424         Reviewed by Devin Rousso.
2425
2426         * UserInterface/Views/TreeOutline.js:
2427         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
2428         Check that `listItemElement` is valid before accessing it to update class
2429         names. The selection can change before the TreeElement has been attached.
2430
2431 2018-12-14  Matt Baker  <mattbaker@apple.com>
2432
2433         Web Inspector: Cookies view should use model objects instead of raw payload data
2434         https://bugs.webkit.org/show_bug.cgi?id=189533
2435         <rdar://problem/44364183>
2436
2437         Reviewed by Joseph Pecoraro and Devin Rousso.
2438
2439         * UserInterface/Models/Cookie.js:
2440         (WI.Cookie):
2441         (WI.Cookie.fromPayload):
2442         (WI.Cookie.parseSetCookieResponseHeader):
2443         (WI.Cookie.prototype.get type):
2444         (WI.Cookie.prototype.get name):
2445         (WI.Cookie.prototype.get value):
2446         (WI.Cookie.prototype.get header):
2447         (WI.Cookie.prototype.get expires):
2448         (WI.Cookie.prototype.get maxAge):
2449         (WI.Cookie.prototype.get path):
2450         (WI.Cookie.prototype.get domain):
2451         (WI.Cookie.prototype.get secure):
2452         (WI.Cookie.prototype.get httpOnly):
2453         (WI.Cookie.prototype.get sameSite):
2454         (WI.Cookie.prototype.get size):
2455         (WI.Cookie.prototype.get url):
2456         (WI.Cookie.prototype.expirationDate):
2457         Cleanup Cookie object; add pubic getters for data, `url` property,
2458         static `fromPayload` method, and calculate `_size` if missing.
2459
2460         * UserInterface/Views/CookieStorageContentView.js:
2461         (WI.CookieStorageContentView.prototype.tableDidRemoveRows):
2462         (WI.CookieStorageContentView.prototype._reloadCookies):
2463         Create Cookie objects from the payload instead of using raw payload data.
2464
2465 2018-12-13  Devin Rousso  <drousso@apple.com>
2466
2467         Web Inspector: remove DOM.BackendNodeId and associated commands/events
2468         https://bugs.webkit.org/show_bug.cgi?id=192478
2469
2470         Reviewed by Matt Baker.
2471
2472         * Versions/Inspector-iOS-8.0.json:
2473         * Versions/Inspector-iOS-9.0.json:
2474         * Versions/Inspector-iOS-9.3.json:
2475         * Versions/Inspector-iOS-10.0.json:
2476         * Versions/Inspector-iOS-10.3.json:
2477         * Versions/Inspector-iOS-11.0.json:
2478         * Versions/Inspector-iOS-11.3.json:
2479         * Versions/Inspector-iOS-12.0.json:
2480         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
2481         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
2482         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
2483         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
2484         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
2485         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
2486         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
2487         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
2488
2489 2018-12-13  Devin Rousso  <drousso@apple.com>
2490
2491         Web Inspector: experimental settings reload button disappears after changing more than one setting
2492         https://bugs.webkit.org/show_bug.cgi?id=192645
2493         <rdar://problem/46626204>
2494
2495         Reviewed by Joseph Pecoraro.
2496
2497         * UserInterface/Views/SettingsTabContentView.js:
2498         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange):
2499         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2500
2501 2018-12-13  Matt Baker  <mattbaker@apple.com>
2502
2503         Web Inspector: REGRESSION(r238602): Elements: deleting multiple DOM nodes doesn't select the nearest node after deletion
2504         https://bugs.webkit.org/show_bug.cgi?id=192116
2505         <rdar://problem/46344339>
2506
2507         Reviewed by Devin Rousso.
2508
2509         * UserInterface/Controllers/SelectionController.js:
2510         (WI.SelectionController.prototype.removeSelectedItems):
2511         Finding a new index to select should go through the delegate instead of
2512         naively advancing the index.
2513
2514         * UserInterface/Views/DOMTreeElement.js:
2515         (WI.DOMTreeElement.prototype._populateNodeContextMenu):
2516         (WI.DOMTreeElement.prototype.ondelete): Deleted.
2517         The menu item for removing the DOM node is now managed by the parent
2518         DOMTreeOutline, since its UI and behavior now depend on whether there
2519         are multiple elements selected.
2520
2521         * UserInterface/Views/DOMTreeOutline.js:
2522         (WI.DOMTreeOutline.prototype.populateContextMenu):
2523         (WI.DOMTreeOutline.prototype.ondelete.level):
2524         (WI.DOMTreeOutline.prototype.ondelete):
2525         Implement `ondelete` to remove selected DOM nodes using the delete and
2526         backspace keys. Also used by the DOMTreeOutline's context menu handler.
2527
2528 2018-12-13  Matt Baker  <mattbaker@apple.com>
2529
2530         Web Inspector: Table selection becomes corrupted when deleting selected cookies
2531         https://bugs.webkit.org/show_bug.cgi?id=192388
2532         <rdar://problem/46472364>
2533
2534         Reviewed by Devin Rousso.
2535
2536         * UserInterface/Controllers/SelectionController.js:
2537         (WI.SelectionController):
2538         (WI.SelectionController.prototype.didRemoveItems):
2539         (WI.SelectionController.prototype._updateSelectedItems):
2540         (WI.SelectionController.prototype.didRemoveItem): Deleted.
2541         Replace `didRemoveItem` with a method taking an IndexSet. Calling the
2542         single-index version while iterating over multiple rows in ascending
2543         order is unsafe, a detail best left to the SelectionController.
2544
2545         * UserInterface/Views/Table.js:
2546         (WI.Table.prototype.removeRow):
2547         (WI.Table.prototype._removeRows):
2548         Notify SelectionController of removed rows.
2549
2550         * UserInterface/Views/TreeOutline.js:
2551         (WI.TreeOutline.prototype.insertChild):
2552         (WI.TreeOutline.prototype.removeChildAtIndex):
2553         Remove the child from the element's `children` after calling `_forgetTreeElement`,
2554         which needs to calculate the child's index to pass to the SelectionController.
2555
2556         (WI.TreeOutline.prototype.removeChildren):
2557         Remove child items during iteration so that `children` doesn't contain
2558         detached TreeElements while calling `_forgetTreeElement`.
2559
2560         (WI.TreeOutline.prototype._rememberTreeElement):
2561         (WI.TreeOutline.prototype._forgetTreeElement):
2562
2563 2018-12-10  Matt Baker  <mattbaker@apple.com>
2564
2565         Web Inspector: REGRESSION (r238599): unable to select specific timeline
2566         https://bugs.webkit.org/show_bug.cgi?id=192443
2567         <rdar://problem/46608087>
2568
2569         Reviewed by Joseph Pecoraro.
2570
2571         When determining the trailing horizontal edge for TreeElement mouse
2572         events, TreeOutline should not assume that its containing DOM element
2573         is only as wide as its <ol> element.
2574
2575         * UserInterface/Views/TreeOutline.js:
2576         (WI.TreeOutline.prototype.treeElementFromEvent):
2577
2578 2018-12-10  Matt Baker  <mattbaker@apple.com>
2579
2580         Web Inspector: Move TreeOutlineGroup coordination out of TreeElement
2581         https://bugs.webkit.org/show_bug.cgi?id=192487
2582         <rdar://problem/46543431>
2583
2584         Reviewed by Devin Rousso.
2585
2586         * UserInterface/Views/TreeElement.js:
2587         (WI.TreeElement.prototype.select):
2588         (WI.TreeElement.prototype.deselect):
2589
2590         * UserInterface/Views/TreeOutlineGroup.js:
2591         (WI.TreeOutlineGroup):
2592         (WI.TreeOutlineGroup.prototype.itemAdded):
2593         (WI.TreeOutlineGroup.prototype.itemRemoved):
2594         (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
2595         (WI.TreeOutlineGroup.prototype._treeOutlineSelectionDidChange):
2596         (WI.TreeOutlineGroup.groupForTreeOutline): Deleted.
2597         (WI.TreeOutlineGroup.prototype.didSelectTreeElement): Deleted.
2598         make the group responsible for listening to selection changes from the
2599         TreeOutlines it manages, and synchronizing the selection between them.
2600
2601 2018-12-10  Dean Jackson  <dino@apple.com>
2602
2603         Use text/javascript as recommended by the HTML specification
2604         https://bugs.webkit.org/show_bug.cgi?id=192525
2605         <rdar://problem/46569636>
2606
2607         Reviewed by Jon Lee.
2608
2609         The HTML specification says we should use text/javascript for
2610         JavaScript files:
2611         https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type
2612
2613         * UserInterface/Base/MIMETypeUtilities.js:
2614         (WI.mimeTypeForFileExtension):
2615         * UserInterface/Views/TextEditor.js:
2616         (WI.TextEditor.prototype._attemptToDetermineMIMEType):
2617
2618 2018-12-06  Matt Baker  <mattbaker@apple.com>
2619
2620         Web Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left arrow doesn't work
2621         https://bugs.webkit.org/show_bug.cgi?id=192353
2622         <rdar://problem/46455019>
2623
2624         Reviewed by Devin Rousso.
2625
2626         * UserInterface/Views/TreeElement.js:
2627         (WI.TreeElement.prototype.deselect):
2628         Don't early return when the element is not the selected tree element.
2629         This condition no longer holds now that TreeOutline supports multiple selection.
2630
2631 2018-12-05  Matt Baker  <mattbaker@apple.com>
2632
2633         Web Inspector: SelectionController should not extend the selection when allowsMultipleSelection is false
2634         https://bugs.webkit.org/show_bug.cgi?id=192390
2635         <rdar://problem/46473624>
2636
2637         Reviewed by Devin Rousso.
2638
2639         * UserInterface/Controllers/SelectionController.js:
2640         (WI.SelectionController.prototype.selectItem):
2641
2642 2018-12-04  Nikita Vasilyev  <nvasilyev@apple.com>
2643
2644         Web Inspector: Add style editing debug mode
2645         https://bugs.webkit.org/show_bug.cgi?id=192282
2646         <rdar://problem/46399176>
2647
2648         Reviewed by Matt Baker.
2649
2650         Introduce a style editing debug mode to help to troubleshoot complex bugs in the style editor.
2651
2652           - Log CSS changes;
2653           - Display red border for locked style declarations.
2654
2655         * UserInterface/Base/Setting.js:
2656         * UserInterface/Models/CSSProperty.js:
2657         (WI.CSSProperty.prototype._updateOwnerStyleText):
2658         * UserInterface/Views/SettingsTabContentView.js:
2659         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
2660         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2661         (.spreadsheet-style-declaration-editor.debug-style-locked::after):
2662         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2663         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
2664         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
2665         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateDebugLockStatus):
2666
2667 2018-12-04  Matt Baker  <mattbaker@apple.com>
2668
2669         Web Inspector: REGRESSION(r238602): Elements: changing selection no longer highlights the selected node
2670         https://bugs.webkit.org/show_bug.cgi?id=192354
2671         <rdar://problem/46444438>
2672
2673         Reviewed by Joseph Pecoraro.
2674
2675         * UserInterface/Views/TreeOutline.js:
2676         (WI.TreeOutline.prototype._treeKeyDown):
2677         (WI.TreeOutline.prototype._handleMouseDown):
2678
2679 2018-12-04  Joseph Pecoraro  <pecoraro@apple.com>
2680
2681         Web Inspector: REGRESSION(r238330): Timeline auto-capture does not work after page transition
2682         https://bugs.webkit.org/show_bug.cgi?id=192248
2683         <rdar://problem/46390199>
2684
2685         Reviewed by Devin Rousso.
2686
2687         * UserInterface/Base/Main.js:
2688         (WI.transitionPageTarget):
2689         Let the TimelineManager perform work on page transitions.
2690
2691         * UserInterface/Controllers/TimelineManager.js:
2692         (WI.TimelineManager.prototype.initializeTarget):
2693         Initialize the autocapture state of the target.
2694
2695         (WI.TimelineManager.prototype.transitionPageTarget):
2696         When transitioning pages perform a legacy (frontend based) timeline capture.
2697
2698 2018-12-04  Matt Baker  <mattbaker@apple.com>
2699
2700         Web Inspector: Elements: $0 is shown for all selected elements
2701         https://bugs.webkit.org/show_bug.cgi?id=192119
2702         <rdar://problem/46327554>
2703
2704         Reviewed by Devin Rousso.
2705
2706         * UserInterface/Views/ContentBrowserTabContentView.js:
2707         (WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
2708         * UserInterface/Views/DOMTreeContentView.js:
2709         (WI.DOMTreeContentView):
2710         (WI.DOMTreeContentView.prototype.layout):
2711         (WI.DOMTreeContentView.prototype._domTreeSelectionDidChange):
2712         Update the selected DOM node using the TreeOutline's selection change
2713         event, instead of in `onselect`, which wasn't always called.
2714
2715         * UserInterface/Views/DOMTreeElement.js:
2716         (WI.DOMTreeElement.prototype.onselect): Deleted.
2717         (WI.DOMTreeElement.prototype.ondeselect): Deleted.
2718         Eliminate `onselect` and `ondeselect`. TreeOutline clients should use
2719         the TreeOutline.Event.SelectedDidChange event instead.
2720
2721         * UserInterface/Views/DOMTreeOutline.css:
2722         (.tree-outline.dom li.last-selected > span::after):
2723         (.tree-outline.dom:focus li.last-selected > span::after):
2724         (.tree-outline.dom li.selected > span::after): Deleted.
2725         (.tree-outline.dom:focus li.selected > span::after): Deleted.
2726         * UserInterface/Views/DOMTreeOutline.js:
2727         (WI.DOMTreeOutline.prototype.updateSelection): Deleted.
2728
2729         * UserInterface/Views/DebuggerSidebarPanel.js:
2730         (WI.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
2731         * UserInterface/Views/FolderizedTreeElement.js:
2732         (WI.FolderizedTreeElement.prototype._addTreeElement):
2733         * UserInterface/Views/NavigationSidebarPanel.js:
2734         (WI.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
2735         (WI.NavigationSidebarPanel.prototype._treeElementWasFiltered):
2736         (WI.NavigationSidebarPanel):
2737         * UserInterface/Views/OpenResourceDialog.js:
2738         (WI.OpenResourceDialog.prototype._populateResourceTreeOutline):
2739         (WI.OpenResourceDialog.prototype._handleKeydownEvent):
2740         * UserInterface/Views/SourceCodeTreeElement.js:
2741         (WI.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
2742         * UserInterface/Views/TreeElement.js:
2743         (WI.TreeElement.prototype.select):
2744         (WI.TreeElement.prototype.revealAndSelect):
2745         (WI.TreeElement.prototype.deselect):
2746         Remove `suppressOnDeselect` and rename `suppressOnSelect` to `suppressNotification`.
2747         Now that `ondeselect` has been removed `suppressOnDeselect` is no longer
2748         meaningful, as TreeOutline generates a single `SelectedDidChange` event
2749         when the selected item changes. In the case of `revealAndSelect`, both
2750         arguments had the same value.
2751
2752         * UserInterface/Views/TreeOutline.js:
2753         (WI.TreeOutline):
2754         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
2755         Add a unique class name to the last selected TreeElement to distinguish
2756         it from other selected elements.
2757
2758 2018-12-04  Matt Baker  <mattbaker@apple.com>
2759
2760         Web Inspector: Elements: ⌘-A should select all visible nodes
2761         https://bugs.webkit.org/show_bug.cgi?id=192120
2762         <rdar://problem/46344435>
2763
2764         Reviewed by Devin Rousso.
2765
2766         * UserInterface/Views/TreeOutline.js:
2767         (WI.TreeOutline.prototype._treeKeyDown):
2768         Remove an early return, allowing `WI.SelectionController` to handle ⌘-A
2769         and select all items.
2770
2771 2018-12-04  Devin Rousso  <drousso@apple.com>
2772
2773         Web Inspector: Audit: tests should support async operations
2774         https://bugs.webkit.org/show_bug.cgi?id=192171
2775         <rdar://problem/46423562>
2776
2777         Reviewed by Joseph Pecoraro.
2778
2779         * UserInterface/Controllers/RuntimeManager.js:
2780         (WI.RuntimeManager.supportsAwaitPromise): Added.
2781
2782         * UserInterface/Models/AuditTestCase.js:
2783         (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty.addErrorForValueType): Deleted.
2784         (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty): Deleted.
2785         (WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach): Deleted.
2786         (WI.AuditTestCase.prototype.async run.async parseResponse): Added.
2787         (WI.AuditTestCase.prototype.async run):
2788         (WI.AuditTestCase.prototype.async run.checkResultProperty.addErrorForValueType): Deleted.
2789         (WI.AuditTestCase.prototype.async run.checkResultProperty): Deleted.
2790         (WI.AuditTestCase.prototype.async run.async resultArrayForEach): Deleted.
2791
2792         * UserInterface/Models/AuditTestCaseResult.js:
2793         (WI.AuditTestCaseResult.async fromPayload):
2794         (WI.AuditTestCaseResult.prototype.toJSON):
2795
2796         * UserInterface/Views/AuditTestCaseContentView.js:
2797         (WI.AuditTestCaseContentView.prototype.layout):
2798
2799 2018-12-03  Devin Rousso  <drousso@apple.com>
2800
2801         Web Inspector: Audit: save the expanded state of test groups
2802         https://bugs.webkit.org/show_bug.cgi?id=192346
2803         <rdar://problem/46440704>
2804
2805         Reviewed by Matt Baker.
2806
2807         * UserInterface/Views/AuditTreeElement.js:
2808         (WI.AuditTreeElement):
2809         (WI.AuditTreeElement.prototype.onattach):
2810         (WI.AuditTreeElement.prototype.onexpand): Added.
2811         (WI.AuditTreeElement.prototype.oncollapse): Added.
2812
2813 2018-12-03  Devin Rousso  <drousso@apple.com>
2814
2815         Web Inspector: Audit: sidebar briefly shows "No Filter Results" before populating default audits
2816         https://bugs.webkit.org/show_bug.cgi?id=192341
2817         <rdar://problem/46436550>
2818
2819         Reviewed by Matt Baker.
2820
2821         * UserInterface/Views/AuditNavigationSidebarPanel.js:
2822         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
2823         (WI.AuditNavigationSidebarPanel.prototype._addTest):
2824         (WI.AuditNavigationSidebarPanel.prototype._addResult):
2825         (WI.AuditNavigationSidebarPanel.prototype.applyFiltersToTreeElement): Deleted.
2826         Delay the construction of the "Results" folder until it's needed, since adding a hidden
2827         `WI.TreeElement` will cause the placeholder to appear.
2828
2829 2018-12-03  Devin Rousso  <drousso@apple.com>
2830
2831         Web Inspector: Audit: navigating while tests are running should stop and clear all results
2832         https://bugs.webkit.org/show_bug.cgi?id=192317
2833         <rdar://problem/46435222>
2834
2835         Reviewed by Joseph Pecoraro.
2836
2837         * UserInterface/Controllers/AuditManager.js:
2838         (WI.AuditManager.prototype.async start):
2839         (WI.AuditManager.prototype._handleFrameMainResourceDidChange):
2840
2841         * UserInterface/Views/AuditNavigationSidebarPanel.js:
2842         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
2843         Drive-by: pass the index of the saved result.
2844
2845 2018-12-03  Devin Rousso  <drousso@apple.com>
2846
2847         Web Inspector: Audit: "Add Default Audits" shown when there are no filter results
2848         https://bugs.webkit.org/show_bug.cgi?id=192105
2849
2850         Reviewed by Matt Baker.
2851
2852         * UserInterface/Views/NavigationSidebarPanel.js:
2853         (WI.NavigationSidebarPanel):
2854         (WI.NavigationSidebarPanel.prototype.get hasActiveFilters): Added.
2855         (WI.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
2856         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
2857         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
2858         (WI.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
2859         (WI.NavigationSidebarPanel.prototype.updateFilter):
2860         (WI.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults):
2861         (WI.NavigationSidebarPanel.prototype._filterDidChange):
2862         (WI.NavigationSidebarPanel.prototype._updateFilter): Deleted.
2863         (WI.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded): Deleted.
2864
2865         * UserInterface/Views/AuditNavigationSidebarPanel.js:
2866         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
2867         Drive-by: change capitalization for consistency with other navigation sidebars.
2868
2869         * Localizations/en.lproj/localizedStrings.js:
2870
2871 2018-12-03  Devin Rousso  <drousso@apple.com>
2872
2873         Web Inspector: Canvas: add singular localized string for "Record first %s frames"
2874         https://bugs.webkit.org/show_bug.cgi?id=192189
2875
2876         Reviewed by Joseph Pecoraro.
2877
2878         * UserInterface/Views/CanvasOverviewContentView.js:
2879         (WI.CanvasOverviewContentView):
2880         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
2881         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel): Added.
2882         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureInput):
2883         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
2884         (WI.CanvasOverviewContentView.prototype.initialLayout): Deleted.
2885         Drive-by: update the auto-capture navigation item when the view is first created so there is
2886         no flashing of in the navigation bar (before `initialLayout` is called).
2887
2888         * UserInterface/Views/CheckboxNavigationItem.js:
2889         (WI.CheckboxNavigationItem):
2890         (WI.CheckboxNavigationItem.prototype.set label): Added.
2891
2892         * Localizations/en.lproj/localizedStrings.js:
2893
2894 2018-12-03  Matt Baker  <mattbaker@apple.com>
2895
2896         Web Inspector: REGRESSION(r238599): Multiple Selection: restoring selection when opening WebInspector puts the TreeElement into a permanent selected state
2897         https://bugs.webkit.org/show_bug.cgi?id=192091
2898         <rdar://problem/46321795>
2899
2900         Reviewed by Devin Rousso.
2901
2902         * UserInterface/Controllers/SelectionController.js:
2903         (WI.SelectionController.prototype.didInsertItem):
2904         Fix a bug where selected indexes were overwritten by the inserted index.
2905
2906         * UserInterface/Views/TreeOutline.js:
2907         (WI.TreeOutline):
2908         (WI.TreeOutline.prototype.insertChild):
2909         Update the SelectionController with the newly inserted index before
2910         attaching the TreeElement. Attaching the TreeElement can cause it to
2911         become selected, which would add the index to the SelectionController,
2912         only to have it immediately incremented by the call to `didInsertItem`.
2913         Additionally, change `insertionIndex` to be the index of the inserted
2914         item instead of the inserted item's previous sibling.
2915
2916         (WI.TreeOutline.prototype._rememberTreeElement):
2917         (WI.TreeOutline.prototype._forgetTreeElement):
2918         (WI.TreeOutline.prototype._indexOfTreeElement.previousElement): Deleted.
2919         Eliminate TreeElement index caching, which could become stale and cause
2920         the wrong index to be calculated. Additionally, instead of walking up the
2921         parent chain to determine the index, start at the root and use existing
2922         method `traverseNextTreeElement`.
2923
2924 2018-12-03  Devin Rousso  <drousso@apple.com>
2925
2926         Web Inspector: Audit: test tree elements should start out collapsed
2927         https://bugs.webkit.org/show_bug.cgi?id=192107
2928
2929         Reviewed by Matt Baker.
2930
2931         * UserInterface/Views/AuditTreeElement.js:
2932         (WI.AuditTreeElement.prototype.onattach):
2933
2934 2018-12-03  Nikita Vasilyev  <nvasilyev@apple.com>
2935
2936         Web Inspector: Styles: can't select properties of read-only rules
2937         https://bugs.webkit.org/show_bug.cgi?id=192266
2938
2939         Reviewed by Devin Rousso.
2940
2941         Implement multiple properties selection for read-only rules (such as User Agent Stylesheets)
2942         in the Styles panel.
2943
2944         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2945         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
2946         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
2947         Keep selection on layout.
2948
2949         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
2950         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
2951         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyBlur):
2952         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseEnter):
2953         SpreadsheetCSSStyleDeclarationEditor is used by ComputedStyleDetailsPanel, which doesn't have:
2954           - spreadsheetCSSStyleDeclarationEditorPropertyBlur
2955           - spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter
2956
2957         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
2958         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
2959         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2960         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2961         * UserInterface/Views/SpreadsheetStyleProperty.js:
2962         (WI.SpreadsheetStyleProperty.prototype.startEditingName):
2963         (WI.SpreadsheetStyleProperty.prototype.startEditingValue):
2964
2965 2018-11-30  Brian Burg  <bburg@apple.com>
2966
2967         Web Inspector: resource combining should be more robust against missing WebKitAdditions
2968         https://bugs.webkit.org/show_bug.cgi?id=192255
2969         <rdar://problem/46042879>
2970
2971         Reviewed by Joseph Pecoraro.
2972
2973         * Scripts/copy-user-interface-resources.pl:
2974         (combineOrStripResourcesForWebKitAdditions):
2975
2976 2018-11-30  Nikita Vasilyev  <nvasilyev@apple.com>
2977
2978         Web Inspector: Jumping from Computed to Styles should select property
2979         https://bugs.webkit.org/show_bug.cgi?id=192198
2980
2981         Reviewed by Devin Rousso.
2982
2983         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2984         (.spreadsheet-style-declaration-editor .property.highlighted): Deleted.
2985         (@keyframes style-property-highlight): Deleted.
2986         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2987         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
2988         Remove unnecessary `__propertyView` property.
2989
2990         * UserInterface/Views/SpreadsheetStyleProperty.js:
2991         (WI.SpreadsheetStyleProperty.prototype.detached):
2992         (WI.SpreadsheetStyleProperty.prototype.highlight): Deleted.
2993
2994 2018-11-30  Matt Baker  <mattbaker@apple.com>
2995
2996         Web Inspector: REGRESSION(r238599): Multiple Selection: selecting a breakpoint will change the selection to it's parent on the first click
2997         https://bugs.webkit.org/show_bug.cgi?id=192093
2998         <rdar://problem/46318466>
2999
3000         Reviewed by Devin Rousso.
3001
3002         * UserInterface/Views/TreeElement.js:
3003         (WI.TreeElement.prototype.select):
3004         TreeElement shouldn't manage the TreeOutline's selection barrier.
3005
3006         * UserInterface/Views/TreeOutline.js:
3007         (WI.TreeOutline):
3008         (WI.TreeOutline.prototype.get processingSelectionChange):
3009         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3010         (WI.TreeOutline.prototype.selectTreeElementInternal):
3011         The selection re-entry barrier `processingSelectionChange` should be
3012         managed internally by TreeOutline, and exposed as a read-only property.
3013         Fix a bug where the barrier was cleared before dispatching the change
3014         notification, which can cause re-entry as a side effect.
3015
3016 2018-11-30  Devin Rousso  <drousso@apple.com>
3017
3018         Web Inspector: Settings: reload button needs horizontal spacing
3019         https://bugs.webkit.org/show_bug.cgi?id=192231
3020         <rdar://problem/46274363>
3021
3022         Reviewed by Matt Baker.
3023
3024         * UserInterface/Views/SettingsTabContentView.css:
3025         (.content-view.settings > .settings-view > .container button):
3026         (.content-view.settings > .settings-view > .container > .title):
3027         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]):
3028         (body[dir=ltr] .content-view.settings > .settings-view > .container > .title): Deleted.
3029         (body[dir=rtl] .content-view.settings > .settings-view > .container > .title): Deleted.
3030         (body[dir=ltr] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
3031         (body[dir=rtl] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
3032         Drive-by: replace `dir=*` attribute rules with `-webkit-margin-*` properties.
3033
3034 2018-11-30  Joseph Pecoraro  <pecoraro@apple.com>
3035
3036         Web Inspector: Uncaught Exception opening Web Inspector to Debugger Tab
3037         https://bugs.webkit.org/show_bug.cgi?id=192174
3038
3039         Reviewed by Devin Rousso.
3040
3041         * UserInterface/Protocol/InspectorBackend.js:
3042         (InspectorBackendClass.prototype.runAfterPendingDispatches):
3043         Dispatch the callback with a timeout if there is no backend target yet
3044         so it doesn't get lost.
3045
3046         * UserInterface/Protocol/Connection.js:
3047         (InspectorBackend.Connection.prototype.runAfterPendingDispatches):
3048         Change the ambiguous name "script" to the more familiar "callback".
3049
3050 2018-11-30  Devin Rousso  <drousso@apple.com>
3051
3052         Web Inspector: replace all unicode characters with the escaped character code
3053         https://bugs.webkit.org/show_bug.cgi?id=192216
3054         <rdar://problem/46275637>
3055
3056         Reviewed by Brian Burg.
3057
3058         * Localizations/en.lproj/localizedStrings.js:
3059         * UserInterface/Controllers/BreakpointPopoverController.js:
3060         * UserInterface/Debug/UncaughtExceptionReporter.js:
3061         * UserInterface/Models/AuditTestCase.js:
3062         * UserInterface/Models/Canvas.js:
3063         * UserInterface/Models/RecordingAction.js:
3064         * UserInterface/Models/ScriptTimelineRecord.js:
3065         * UserInterface/Views/AuditTestCaseContentView.js:
3066         * UserInterface/Views/AuditTestContentView.js:
3067         * UserInterface/Views/AuditTestGroupContentView.js:
3068         * UserInterface/Views/CallFrameView.js:
3069         * UserInterface/Views/CanvasContentView.js:
3070         * UserInterface/Views/CanvasOverviewContentView.css:
3071         * UserInterface/Views/ConsoleMessageView.css:
3072         * UserInterface/Views/ContextMenuUtilities.js:
3073         * UserInterface/Views/DOMEventsBreakdownView.js:
3074         * UserInterface/Views/DataGrid.css:
3075         * UserInterface/Views/DataGrid.js:
3076         * UserInterface/Views/DatabaseTableContentView.js:
3077         * UserInterface/Views/DebuggerDashboardView.css:
3078         * UserInterface/Views/DebuggerSidebarPanel.js:
3079         * UserInterface/Views/ErrorObjectView.js:
3080         * UserInterface/Views/EventBreakpointPopover.js:
3081         * UserInterface/Views/InlineSwatch.js:
3082         * UserInterface/Views/LayerTreeDataGridNode.js:
3083         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3084         * UserInterface/Views/Layers3DContentView.js:
3085         * UserInterface/Views/LayoutTimelineDataGridNode.js:
3086         * UserInterface/Views/NetworkTableContentView.css:
3087         * UserInterface/Views/NetworkTableContentView.js:
3088         * UserInterface/Views/ObjectPreviewView.js:
3089         * UserInterface/Views/ProfileDataGridNode.js:
3090         * UserInterface/Views/ResourceTimelineDataGridNode.js:
3091         * UserInterface/Views/ScriptDetailsTimelineView.css:
3092         * UserInterface/Views/TextEditor.css:
3093         * UserInterface/Views/TreeOutline.css:
3094
3095 2018-11-29  Matt Baker  <mattbaker@apple.com>
3096
3097         Web Inspector: RTL: disclosure triangles should be flipped and aligned right
3098         https://bugs.webkit.org/show_bug.cgi?id=192089
3099         <rdar://problem/46316753>
3100
3101         Reviewed by Devin Rousso.
3102
3103         * UserInterface/Views/ComputedStyleSection.css:
3104         (.computed-style-section .computed-property-item .disclosure-button):
3105         (body[dir=rtl] .computed-style-section .computed-property-item .disclosure-button):
3106
3107         * UserInterface/Views/ConsoleMessageView.css:
3108         (.console-message.expandable .console-top-level-message::before):
3109         (body[dir=rtl] .console-message.expandable .console-top-level-message::before):
3110
3111         * UserInterface/Views/ErrorObjectView.css:
3112         (.error-object > .formatted-error::before):
3113         (body[dir=rtl] .error-object > .formatted-error::before):
3114         (.error-object .content):
3115
3116         * UserInterface/Views/LogContentView.css:
3117         (.console-group-title::before):
3118         (body[dir=ltr] .console-group-title::before):
3119         (body[dir=rtl] .console-group-title::before):
3120
3121         * UserInterface/Views/ObjectTreeView.css:
3122         (body[dir=rtl] .object-tree > :matches(.title, .object-preview)::before):
3123
3124         * UserInterface/Views/TypeTreeElement.css:
3125         (body[dir=rtl] .item.type-tree-element.parent > .disclosure-button):
3126
3127 2018-11-28  Dean Jackson  <dino@apple.com>
3128
3129         [ES Modules] Allow .mjs content when loaded from file://
3130         https://bugs.webkit.org/show_bug.cgi?id=192100
3131         <rdar://problem/46320065>
3132
3133         Reviewed by Sam Weinig.
3134
3135         Add a mapping from .mjs to application/javascript.
3136
3137         * UserInterface/Base/MIMETypeUtilities.js:
3138         (WI.mimeTypeForFileExtension):
3139
3140 2018-11-29  Matt Baker  <mattbaker@apple.com>
3141
3142         Web Inspector: Elements: selecting more than one DOM node causes the scope highlight to contrast
3143         https://bugs.webkit.org/show_bug.cgi?id=192118
3144         <rdar://problem/46325664>
3145
3146         Reviewed by Devin Rousso.
3147
3148         Use an alpha blended border for the "selected" DOM scope highlight,
3149         matching the "hovered" scope highlight.
3150
3151         * UserInterface/Views/DOMTreeOutline.css:
3152         (.tree-outline.dom li.selected + ol.children.expanded):
3153
3154 2018-11-28  Joseph Pecoraro  <pecoraro@apple.com>
3155
3156         Web Inspector: REGRESSION(?): all "Show *" develop menu items cause the page to crash
3157         https://bugs.webkit.org/show_bug.cgi?id=192016
3158         <rdar://problem/46284417>
3159
3160         Reviewed by Devin Rousso.
3161
3162         * UserInterface/Base/Main.js:
3163         (WI.loaded):
3164         (WI.initializeBackendTarget):
3165         (WI.contentLoaded):
3166         (WI.whenTargetsAvailable):
3167         Don't evaluate any InspectorFrontendAPI commands until the frontend
3168         has initialized a main target and the user interface.
3169
3170 2018-11-28  Nikita Vasilyev  <nvasilyev@apple.com>
3171
3172         Web Inspector: Styles: enable selection of multiple properties by default
3173         https://bugs.webkit.org/show_bug.cgi?id=192109
3174         <rdar://problem/46323565>
3175
3176         Reviewed by Devin Rousso.
3177
3178         * UserInterface/Base/Setting.js:
3179         * UserInterface/Views/SettingsTabContentView.js:
3180         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3181         Remove the checkbox.
3182
3183         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3184         (.spreadsheet-style-declaration-editor .property):
3185         (.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
3186         (.spreadsheet-style-declaration-editor .property.selected):
3187         (.spreadsheet-style-declaration-editor .property.selected:focus):
3188         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property): Deleted.
3189         (.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)): Deleted.
3190         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected): Deleted.
3191         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus): Deleted.
3192         Remove `.multiple-properties-selection` class.
3193
3194         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3195         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
3196         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3197         (WI.SpreadsheetCSSStyleDeclarationSection):
3198         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
3199         * UserInterface/Views/SpreadsheetStyleProperty.js:
3200         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
3201         * UserInterface/Views/SpreadsheetTextField.js:
3202         (WI.SpreadsheetTextField):
3203         (WI.SpreadsheetTextField.prototype._handleFocus): Deleted.
3204
3205 2018-11-28  Devin Rousso  <drousso@apple.com>
3206
3207         Web Inspector: Audit: empty results folder is shown after clearing filters
3208         https://bugs.webkit.org/show_bug.cgi?id=192106
3209
3210         Reviewed by Matt Baker.
3211
3212         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3213         (WI.AuditNavigationSidebarPanel.prototype.applyFiltersToTreeElement): Added.
3214
3215 2018-11-28  Matt Baker  <mattbaker@apple.com>
3216
3217         Web Inspector: Remove unused DataGrid and TreeOutline code
3218         https://bugs.webkit.org/show_bug.cgi?id=191622
3219         <rdar://problem/46052014>
3220
3221         Reviewed by Devin Rousso.
3222
3223         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
3224         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
3225
3226         * UserInterface/Views/DOMTreeElement.js:
3227         (WI.DOMTreeElement.prototype.insertChildElement):
3228
3229         * UserInterface/Views/DOMTreeOutline.js:
3230         (WI.DOMTreeOutline):
3231         (WI.DOMTreeOutline.prototype.update):
3232
3233         * UserInterface/Views/DataGrid.js:
3234         (WI.DataGrid.prototype.removeChildrenRecursive): Deleted.
3235
3236         * UserInterface/Views/DataGridNode.js:
3237         (WI.DataGridNode.prototype.removeChildren):
3238         (WI.DataGridNode.prototype.removeChildrenRecursive): Deleted.
3239
3240         * UserInterface/Views/ErrorObjectView.css:
3241         (.error-object:not(.expanded) .content):
3242         (.error-object .content):
3243         (.error-object:not(.expanded) .tree-outline): Deleted.
3244         (.error-object .tree-outline): Deleted.
3245
3246         * UserInterface/Views/ErrorObjectView.js:
3247         (WI.ErrorObjectView):
3248         (WI.ErrorObjectView.prototype.get treeOutline): Deleted.
3249         Use a simple container since TreeOutline features aren't used,
3250         and remove unused property `treeOutline`.
3251
3252         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
3253         (WI.RecordingTraceDetailsSidebarPanel):
3254
3255         * UserInterface/Views/TreeElement.js:
3256         (WI.TreeElement.prototype.removeChildren):
3257         (WI.TreeElement.prototype.removeChildrenRecursive): Deleted.
3258
3259         * UserInterface/Views/TreeOutline.js:
3260         (WI.TreeOutline):
3261         (WI.TreeOutline.prototype.removeChildrenRecursive): Deleted.
3262         (WI.TreeOutline.prototype.reattachIfIndexChanged): Deleted.
3263         Removed `element` parameter now that the only use case has been removed.
3264
3265 2018-11-27  Matt Baker  <mattbaker@apple.com>
3266
3267         Web Inspector: Elements tab should allow selecting/deleting multiple DOM nodes
3268         https://bugs.webkit.org/show_bug.cgi?id=192059
3269         <rdar://problem/46294827>
3270
3271         Reviewed by Devin Rousso.
3272
3273         Enable multiple DOM node selection in the DOMTreeContentView.
3274
3275         * UserInterface/Controllers/SelectionController.js:
3276         (WI.SelectionController):
3277         (WI.SelectionController.prototype.get allowsEmptySelection):
3278         (WI.SelectionController.prototype.set allowsEmptySelection):
3279         Allow clients to control whether the last selected item can be deselected.
3280         (WI.SelectionController.prototype.deselectItem):
3281         (WI.SelectionController.prototype.didInsertItem):
3282         Rewritten to prevent infinite loop.
3283         (WI.SelectionController.prototype.didRemoveItem):
3284         (WI.SelectionController.prototype._updateSelectedItems):
3285         (WI.SelectionController.prototype._adjustIndexesAfter): Deleted.
3286
3287         * UserInterface/Views/DOMTreeContentView.js:
3288         (WI.DOMTreeContentView):
3289
3290         * UserInterface/Views/DOMTreeElement.js:
3291         (WI.DOMTreeElement.prototype.updateSelectionArea):
3292         * UserInterface/Views/DOMTreeOutline.js:
3293         (WI.DOMTreeOutline.prototype.updateSelection):
3294         Updating the selection area DOM element should not assume that only one
3295         TreeElement is selected at a time.
3296
3297         * UserInterface/Views/TreeOutline.js:
3298         (WI.TreeOutline.prototype.get allowsEmptySelection):
3299         (WI.TreeOutline.prototype.set allowsEmptySelection):
3300         (WI.TreeOutline.prototype.set selectedTreeElement):
3301         (WI.TreeOutline.prototype.get selectedTreeElements):
3302         (WI.TreeOutline.prototype._treeKeyDown):
3303
3304         * UserInterface/Views/TreeOutlineGroup.js:
3305         (WI.TreeOutlineGroup):
3306         (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
3307         Eliminate use of `TreeElement.prototype.deselect`.
3308
3309 2018-11-27  Matt Baker  <mattbaker@apple.com>
3310
3311         Web Inspector: TreeOutline should re-use multiple-selection logic from Table
3312         https://bugs.webkit.org/show_bug.cgi?id=191483
3313         <rdar://problem/45953305>
3314
3315         Reviewed by Devin Rousso.
3316
3317         Update TreeOutline to use SelectionController. Adopting SelectionController
3318         in TreeOutline is not as straightforward as it was in Table. Selected items
3319         are tracked by index, and TreeElement lacks an explicit index. As a consequence
3320         TreeElement indexes are calcualted as needed and cached. The cache is cleared
3321         whenever an element is added or removed.
3322
3323         * UserInterface/Controllers/SelectionController.js:
3324         (WI.SelectionController.prototype.didInsertItem):
3325         (WI.SelectionController.prototype.didRemoveItem):
3326         (WI.SelectionController.prototype.handleKeyDown):
3327         Drive-by syntax error fix.
3328         (WI.SelectionController.prototype._adjustIndexesAfter):
3329         (WI.SelectionController):
3330
3331         * UserInterface/Views/DOMTreeElement.js:
3332         (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
3333         (WI.DOMTreeElement.prototype.selectOnMouseDown): Deleted.
3334
3335         * UserInterface/Views/DOMTreeOutline.js:
3336         (WI.DOMTreeOutline.prototype._onmousedown):
3337         Item selection is now handled by SelectionController.
3338
3339         * UserInterface/Views/ShaderProgramTreeElement.js:
3340         (WI.ShaderProgramTreeElement.prototype.canSelectOnMouseDown):
3341         (WI.ShaderProgramTreeElement.prototype.selectOnMouseDown): Deleted.
3342
3343         * UserInterface/Views/TreeElement.js:
3344         (WI.TreeElement.prototype.canSelectOnMouseDown):
3345         (WI.TreeElement.prototype._attach):
3346         (WI.TreeElement.prototype.select):
3347         (WI.TreeElement.prototype.deselect):
3348         Route item selection through the parent TreeOutline, in order to go though
3349         the TreeOutline's SelectionController.
3350
3351         (WI.TreeElement.treeElementMouseDown): Deleted.
3352         Moved handler to TreeOutline, which owns the SelectionController that
3353         needs to respond to mouse events.
3354
3355         * UserInterface/Views/TreeOutline.js:
3356         (WI.TreeOutline):
3357         (WI.TreeOutline.prototype.get allowsMultipleSelection):
3358         (WI.TreeOutline.prototype.set allowsMultipleSelection):
3359         (WI.TreeOutline.prototype.get selectedTreeElement):
3360         (WI.TreeOutline.prototype.set selectedTreeElement):
3361         (WI.TreeOutline.prototype.insertChild):
3362         (WI.TreeOutline.prototype.removeChildAtIndex):
3363         (WI.TreeOutline.prototype._rememberTreeElement):
3364         (WI.TreeOutline.prototype._forgetTreeElement):
3365         (WI.TreeOutline.prototype._treeKeyDown):
3366         (WI.TreeOutline.prototype.selectionControllerNumberOfItems):
3367         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3368         (WI.TreeOutline.prototype.selectionControllerNextSelectableIndex):
3369         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableIndex):
3370         (WI.TreeOutline.prototype.selectTreeElementInternal):
3371         (WI.TreeOutline._generateStyleRulesIfNeeded._indexOfTreeElement.previousElement):
3372         (WI.TreeOutline._generateStyleRulesIfNeeded):
3373
3374 2018-11-27  Nikita Vasilyev  <nvasilyev@apple.com>
3375
3376         Web Inspector: Experimental Computed panel is unreadable in Dark Mode
3377         https://bugs.webkit.org/show_bug.cgi?id=192053
3378
3379         Reviewed by Matt Baker.
3380
3381         * UserInterface/Views/ComputedStyleDetailsPanel.css:
3382         (@media (prefers-dark-interface)):
3383         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
3384         * UserInterface/Views/ComputedStyleSection.css: