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