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