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