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