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