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