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