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