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