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