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