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