Web Inspector: Layers: increase default column width for other localizations
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2018-12-18  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Layers: increase default column width for other localizations
4         https://bugs.webkit.org/show_bug.cgi?id=192812
5         <rdar://problem/46628625>
6
7         Reviewed by Brian Burg.
8
9         * UserInterface/Views/LayerDetailsSidebarPanel.js:
10         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
11         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
12         (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
13
14 2018-12-18  Joseph Pecoraro  <pecoraro@apple.com>
15
16         Web Inspector: m3u8 content not shown, it should be text
17         https://bugs.webkit.org/show_bug.cgi?id=192731
18         <rdar://problem/46747728>
19
20         Reviewed by Devin Rousso.
21
22         * UserInterface/Base/MIMETypeUtilities.js:
23         (WI.shouldTreatMIMETypeAsText):
24         Support m3u8/m3u files as text.
25
26 2018-12-17  Devin Rousso  <drousso@apple.com>
27
28         Web Inspector: Canvas: path view is misaligned
29         https://bugs.webkit.org/show_bug.cgi?id=192761
30
31         Reviewed by Joseph Pecoraro.
32
33         * UserInterface/Views/RecordingContentView.css:
34         (.content-view:not(.tab).recording :matches(img, canvas)):
35         (.content-view:not(.tab).recording canvas.path):
36
37 2018-12-17  Devin Rousso  <drousso@apple.com>
38
39         Web Inspector: Audit: add plural result strings
40         https://bugs.webkit.org/show_bug.cgi?id=192769
41         <rdar://problem/46628680>
42
43         Reviewed by Brian Burg.
44
45         * UserInterface/Views/AuditTestContentView.js:
46         (WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):
47
48         * UserInterface/Views/AuditTestGroupContentView.js:
49         (WI.AuditTestGroupContentView.prototype.layout):
50
51         * Localizations/en.lproj/localizedStrings.js:
52
53 2018-12-17  Devin Rousso  <drousso@apple.com>
54
55         Web Inspector: Settings: add singular "space" UIString
56         https://bugs.webkit.org/show_bug.cgi?id=192766
57         <rdar://problem/46776948>
58
59         Reviewed by Brian Burg.
60
61         * UserInterface/Views/SettingEditor.js:
62         (WI.SettingEditor):
63         (WI.SettingEditor.prototype.get label):
64         (WI.SettingEditor.prototype.set label): Added.
65
66         * UserInterface/Views/SettingsTabContentView.js:
67         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
68         (WI.SettingsTabContentView.prototype._createGeneralSettingsView.addSpacesSetting): Added.
69         (WI.SettingsTabContentView.prototype._createGeneralSettingsView.addSpacesSetting.updateLabel): Added.
70
71         * Localizations/en.lproj/localizedStrings.js:
72
73 2018-12-15  Nikita Vasilyev  <nvasilyev@apple.com>
74
75         Web Inspector: Styles: toggling selected properties may cause data corruption
76         https://bugs.webkit.org/show_bug.cgi?id=192396
77         <rdar://problem/46478383>
78
79         Reviewed by Devin Rousso.
80
81         Uncommenting a property after a commented out property used to insert an unnecessary semicolon,
82         and not updating ranges of the following properties.
83
84         For example:
85
86             /* color: red; */
87             /* font-size: 12px */
88
89         Uncommenting `font-size` would result in something like this:
90
91             /* color: red; */; font-size: 12px
92                              ^
93                              unnecessary semicolon
94
95         Now the semicolon doesn't get inserted and the white space is preserved better:
96
97             /* color: red; */
98             font-size: 12px
99
100         * UserInterface/Models/CSSProperty.js:
101         (WI.CSSProperty.prototype._updateOwnerStyleText):
102         (WI.CSSProperty.prototype._appendSemicolonIfNeeded): Removed.
103         (WI.CSSProperty.prototype._prependSemicolonIfNeeded): Added.
104
105         * UserInterface/Views/SpreadsheetStyleProperty.js:
106         (WI.SpreadsheetStyleProperty.prototype.remove):
107         (WI.SpreadsheetStyleProperty.prototype.update):
108         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
109         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
110         Style declaration should be locked while editing. Add asserts to ensure this.
111
112 2018-12-14  Matt Baker  <mattbaker@apple.com>
113
114         Web Inspector: REGRESSION(r238599): Uncaught Exception: TypeError: null is not an object (evaluating 'treeElement.listItemElement.classList')
115         https://bugs.webkit.org/show_bug.cgi?id=192090
116         <rdar://problem/46318614>
117
118         Reviewed by Devin Rousso.
119
120         * UserInterface/Views/TreeOutline.js:
121         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
122         Check that `listItemElement` is valid before accessing it to update class
123         names. The selection can change before the TreeElement has been attached.
124
125 2018-12-14  Matt Baker  <mattbaker@apple.com>
126
127         Web Inspector: Cookies view should use model objects instead of raw payload data
128         https://bugs.webkit.org/show_bug.cgi?id=189533
129         <rdar://problem/44364183>
130
131         Reviewed by Joseph Pecoraro and Devin Rousso.
132
133         * UserInterface/Models/Cookie.js:
134         (WI.Cookie):
135         (WI.Cookie.fromPayload):
136         (WI.Cookie.parseSetCookieResponseHeader):
137         (WI.Cookie.prototype.get type):
138         (WI.Cookie.prototype.get name):
139         (WI.Cookie.prototype.get value):
140         (WI.Cookie.prototype.get header):
141         (WI.Cookie.prototype.get expires):
142         (WI.Cookie.prototype.get maxAge):
143         (WI.Cookie.prototype.get path):
144         (WI.Cookie.prototype.get domain):
145         (WI.Cookie.prototype.get secure):
146         (WI.Cookie.prototype.get httpOnly):
147         (WI.Cookie.prototype.get sameSite):
148         (WI.Cookie.prototype.get size):
149         (WI.Cookie.prototype.get url):
150         (WI.Cookie.prototype.expirationDate):
151         Cleanup Cookie object; add pubic getters for data, `url` property,
152         static `fromPayload` method, and calculate `_size` if missing.
153
154         * UserInterface/Views/CookieStorageContentView.js:
155         (WI.CookieStorageContentView.prototype.tableDidRemoveRows):
156         (WI.CookieStorageContentView.prototype._reloadCookies):
157         Create Cookie objects from the payload instead of using raw payload data.
158
159 2018-12-13  Devin Rousso  <drousso@apple.com>
160
161         Web Inspector: remove DOM.BackendNodeId and associated commands/events
162         https://bugs.webkit.org/show_bug.cgi?id=192478
163
164         Reviewed by Matt Baker.
165
166         * Versions/Inspector-iOS-8.0.json:
167         * Versions/Inspector-iOS-9.0.json:
168         * Versions/Inspector-iOS-9.3.json:
169         * Versions/Inspector-iOS-10.0.json:
170         * Versions/Inspector-iOS-10.3.json:
171         * Versions/Inspector-iOS-11.0.json:
172         * Versions/Inspector-iOS-11.3.json:
173         * Versions/Inspector-iOS-12.0.json:
174         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
175         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
176         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
177         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
178         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
179         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
180         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
181         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
182
183 2018-12-13  Devin Rousso  <drousso@apple.com>
184
185         Web Inspector: experimental settings reload button disappears after changing more than one setting
186         https://bugs.webkit.org/show_bug.cgi?id=192645
187         <rdar://problem/46626204>
188
189         Reviewed by Joseph Pecoraro.
190
191         * UserInterface/Views/SettingsTabContentView.js:
192         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange):
193         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
194
195 2018-12-13  Matt Baker  <mattbaker@apple.com>
196
197         Web Inspector: REGRESSION(r238602): Elements: deleting multiple DOM nodes doesn't select the nearest node after deletion
198         https://bugs.webkit.org/show_bug.cgi?id=192116
199         <rdar://problem/46344339>
200
201         Reviewed by Devin Rousso.
202
203         * UserInterface/Controllers/SelectionController.js:
204         (WI.SelectionController.prototype.removeSelectedItems):
205         Finding a new index to select should go through the delegate instead of
206         naively advancing the index.
207
208         * UserInterface/Views/DOMTreeElement.js:
209         (WI.DOMTreeElement.prototype._populateNodeContextMenu):
210         (WI.DOMTreeElement.prototype.ondelete): Deleted.
211         The menu item for removing the DOM node is now managed by the parent
212         DOMTreeOutline, since its UI and behavior now depend on whether there
213         are multiple elements selected.
214
215         * UserInterface/Views/DOMTreeOutline.js:
216         (WI.DOMTreeOutline.prototype.populateContextMenu):
217         (WI.DOMTreeOutline.prototype.ondelete.level):
218         (WI.DOMTreeOutline.prototype.ondelete):
219         Implement `ondelete` to remove selected DOM nodes using the delete and
220         backspace keys. Also used by the DOMTreeOutline's context menu handler.
221
222 2018-12-13  Matt Baker  <mattbaker@apple.com>
223
224         Web Inspector: Table selection becomes corrupted when deleting selected cookies
225         https://bugs.webkit.org/show_bug.cgi?id=192388
226         <rdar://problem/46472364>
227
228         Reviewed by Devin Rousso.
229
230         * UserInterface/Controllers/SelectionController.js:
231         (WI.SelectionController):
232         (WI.SelectionController.prototype.didRemoveItems):
233         (WI.SelectionController.prototype._updateSelectedItems):
234         (WI.SelectionController.prototype.didRemoveItem): Deleted.
235         Replace `didRemoveItem` with a method taking an IndexSet. Calling the
236         single-index version while iterating over multiple rows in ascending
237         order is unsafe, a detail best left to the SelectionController.
238
239         * UserInterface/Views/Table.js:
240         (WI.Table.prototype.removeRow):
241         (WI.Table.prototype._removeRows):
242         Notify SelectionController of removed rows.
243
244         * UserInterface/Views/TreeOutline.js:
245         (WI.TreeOutline.prototype.insertChild):
246         (WI.TreeOutline.prototype.removeChildAtIndex):
247         Remove the child from the element's `children` after calling `_forgetTreeElement`,
248         which needs to calculate the child's index to pass to the SelectionController.
249
250         (WI.TreeOutline.prototype.removeChildren):
251         Remove child items during iteration so that `children` doesn't contain
252         detached TreeElements while calling `_forgetTreeElement`.
253
254         (WI.TreeOutline.prototype._rememberTreeElement):
255         (WI.TreeOutline.prototype._forgetTreeElement):
256
257 2018-12-10  Matt Baker  <mattbaker@apple.com>
258
259         Web Inspector: REGRESSION (r238599): unable to select specific timeline
260         https://bugs.webkit.org/show_bug.cgi?id=192443
261         <rdar://problem/46608087>
262
263         Reviewed by Joseph Pecoraro.
264
265         When determining the trailing horizontal edge for TreeElement mouse
266         events, TreeOutline should not assume that its containing DOM element
267         is only as wide as its <ol> element.
268
269         * UserInterface/Views/TreeOutline.js:
270         (WI.TreeOutline.prototype.treeElementFromEvent):
271
272 2018-12-10  Matt Baker  <mattbaker@apple.com>
273
274         Web Inspector: Move TreeOutlineGroup coordination out of TreeElement
275         https://bugs.webkit.org/show_bug.cgi?id=192487
276         <rdar://problem/46543431>
277
278         Reviewed by Devin Rousso.
279
280         * UserInterface/Views/TreeElement.js:
281         (WI.TreeElement.prototype.select):
282         (WI.TreeElement.prototype.deselect):
283
284         * UserInterface/Views/TreeOutlineGroup.js:
285         (WI.TreeOutlineGroup):
286         (WI.TreeOutlineGroup.prototype.itemAdded):
287         (WI.TreeOutlineGroup.prototype.itemRemoved):
288         (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
289         (WI.TreeOutlineGroup.prototype._treeOutlineSelectionDidChange):
290         (WI.TreeOutlineGroup.groupForTreeOutline): Deleted.
291         (WI.TreeOutlineGroup.prototype.didSelectTreeElement): Deleted.
292         make the group responsible for listening to selection changes from the
293         TreeOutlines it manages, and synchronizing the selection between them.
294
295 2018-12-10  Dean Jackson  <dino@apple.com>
296
297         Use text/javascript as recommended by the HTML specification
298         https://bugs.webkit.org/show_bug.cgi?id=192525
299         <rdar://problem/46569636>
300
301         Reviewed by Jon Lee.
302
303         The HTML specification says we should use text/javascript for
304         JavaScript files:
305         https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type
306
307         * UserInterface/Base/MIMETypeUtilities.js:
308         (WI.mimeTypeForFileExtension):
309         * UserInterface/Views/TextEditor.js:
310         (WI.TextEditor.prototype._attemptToDetermineMIMEType):
311
312 2018-12-06  Matt Baker  <mattbaker@apple.com>
313
314         Web Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left arrow doesn't work
315         https://bugs.webkit.org/show_bug.cgi?id=192353
316         <rdar://problem/46455019>
317
318         Reviewed by Devin Rousso.
319
320         * UserInterface/Views/TreeElement.js:
321         (WI.TreeElement.prototype.deselect):
322         Don't early return when the element is not the selected tree element.
323         This condition no longer holds now that TreeOutline supports multiple selection.
324
325 2018-12-05  Matt Baker  <mattbaker@apple.com>
326
327         Web Inspector: SelectionController should not extend the selection when allowsMultipleSelection is false
328         https://bugs.webkit.org/show_bug.cgi?id=192390
329         <rdar://problem/46473624>
330
331         Reviewed by Devin Rousso.
332
333         * UserInterface/Controllers/SelectionController.js:
334         (WI.SelectionController.prototype.selectItem):
335
336 2018-12-04  Nikita Vasilyev  <nvasilyev@apple.com>
337
338         Web Inspector: Add style editing debug mode
339         https://bugs.webkit.org/show_bug.cgi?id=192282
340         <rdar://problem/46399176>
341
342         Reviewed by Matt Baker.
343
344         Introduce a style editing debug mode to help to troubleshoot complex bugs in the style editor.
345
346           - Log CSS changes;
347           - Display red border for locked style declarations.
348
349         * UserInterface/Base/Setting.js:
350         * UserInterface/Models/CSSProperty.js:
351         (WI.CSSProperty.prototype._updateOwnerStyleText):
352         * UserInterface/Views/SettingsTabContentView.js:
353         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
354         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
355         (.spreadsheet-style-declaration-editor.debug-style-locked::after):
356         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
357         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
358         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
359         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateDebugLockStatus):
360
361 2018-12-04  Matt Baker  <mattbaker@apple.com>
362
363         Web Inspector: REGRESSION(r238602): Elements: changing selection no longer highlights the selected node
364         https://bugs.webkit.org/show_bug.cgi?id=192354
365         <rdar://problem/46444438>
366
367         Reviewed by Joseph Pecoraro.
368
369         * UserInterface/Views/TreeOutline.js:
370         (WI.TreeOutline.prototype._treeKeyDown):
371         (WI.TreeOutline.prototype._handleMouseDown):
372
373 2018-12-04  Joseph Pecoraro  <pecoraro@apple.com>
374
375         Web Inspector: REGRESSION(r238330): Timeline auto-capture does not work after page transition
376         https://bugs.webkit.org/show_bug.cgi?id=192248
377         <rdar://problem/46390199>
378
379         Reviewed by Devin Rousso.
380
381         * UserInterface/Base/Main.js:
382         (WI.transitionPageTarget):
383         Let the TimelineManager perform work on page transitions.
384
385         * UserInterface/Controllers/TimelineManager.js:
386         (WI.TimelineManager.prototype.initializeTarget):
387         Initialize the autocapture state of the target.
388
389         (WI.TimelineManager.prototype.transitionPageTarget):
390         When transitioning pages perform a legacy (frontend based) timeline capture.
391
392 2018-12-04  Matt Baker  <mattbaker@apple.com>
393
394         Web Inspector: Elements: $0 is shown for all selected elements
395         https://bugs.webkit.org/show_bug.cgi?id=192119
396         <rdar://problem/46327554>
397
398         Reviewed by Devin Rousso.
399
400         * UserInterface/Views/ContentBrowserTabContentView.js:
401         (WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
402         * UserInterface/Views/DOMTreeContentView.js:
403         (WI.DOMTreeContentView):
404         (WI.DOMTreeContentView.prototype.layout):
405         (WI.DOMTreeContentView.prototype._domTreeSelectionDidChange):
406         Update the selected DOM node using the TreeOutline's selection change
407         event, instead of in `onselect`, which wasn't always called.
408
409         * UserInterface/Views/DOMTreeElement.js:
410         (WI.DOMTreeElement.prototype.onselect): Deleted.
411         (WI.DOMTreeElement.prototype.ondeselect): Deleted.
412         Eliminate `onselect` and `ondeselect`. TreeOutline clients should use
413         the TreeOutline.Event.SelectedDidChange event instead.
414
415         * UserInterface/Views/DOMTreeOutline.css:
416         (.tree-outline.dom li.last-selected > span::after):
417         (.tree-outline.dom:focus li.last-selected > span::after):
418         (.tree-outline.dom li.selected > span::after): Deleted.
419         (.tree-outline.dom:focus li.selected > span::after): Deleted.
420         * UserInterface/Views/DOMTreeOutline.js:
421         (WI.DOMTreeOutline.prototype.updateSelection): Deleted.
422
423         * UserInterface/Views/DebuggerSidebarPanel.js:
424         (WI.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
425         * UserInterface/Views/FolderizedTreeElement.js:
426         (WI.FolderizedTreeElement.prototype._addTreeElement):
427         * UserInterface/Views/NavigationSidebarPanel.js:
428         (WI.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
429         (WI.NavigationSidebarPanel.prototype._treeElementWasFiltered):
430         (WI.NavigationSidebarPanel):
431         * UserInterface/Views/OpenResourceDialog.js:
432         (WI.OpenResourceDialog.prototype._populateResourceTreeOutline):
433         (WI.OpenResourceDialog.prototype._handleKeydownEvent):
434         * UserInterface/Views/SourceCodeTreeElement.js:
435         (WI.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
436         * UserInterface/Views/TreeElement.js:
437         (WI.TreeElement.prototype.select):
438         (WI.TreeElement.prototype.revealAndSelect):
439         (WI.TreeElement.prototype.deselect):
440         Remove `suppressOnDeselect` and rename `suppressOnSelect` to `suppressNotification`.
441         Now that `ondeselect` has been removed `suppressOnDeselect` is no longer
442         meaningful, as TreeOutline generates a single `SelectedDidChange` event
443         when the selected item changes. In the case of `revealAndSelect`, both
444         arguments had the same value.
445
446         * UserInterface/Views/TreeOutline.js:
447         (WI.TreeOutline):
448         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
449         Add a unique class name to the last selected TreeElement to distinguish
450         it from other selected elements.
451
452 2018-12-04  Matt Baker  <mattbaker@apple.com>
453
454         Web Inspector: Elements: ⌘-A should select all visible nodes
455         https://bugs.webkit.org/show_bug.cgi?id=192120
456         <rdar://problem/46344435>
457
458         Reviewed by Devin Rousso.
459
460         * UserInterface/Views/TreeOutline.js:
461         (WI.TreeOutline.prototype._treeKeyDown):
462         Remove an early return, allowing `WI.SelectionController` to handle ⌘-A
463         and select all items.
464
465 2018-12-04  Devin Rousso  <drousso@apple.com>
466
467         Web Inspector: Audit: tests should support async operations
468         https://bugs.webkit.org/show_bug.cgi?id=192171
469         <rdar://problem/46423562>
470
471         Reviewed by Joseph Pecoraro.
472
473         * UserInterface/Controllers/RuntimeManager.js:
474         (WI.RuntimeManager.supportsAwaitPromise): Added.
475
476         * UserInterface/Models/AuditTestCase.js:
477         (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty.addErrorForValueType): Deleted.
478         (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty): Deleted.
479         (WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach): Deleted.
480         (WI.AuditTestCase.prototype.async run.async parseResponse): Added.
481         (WI.AuditTestCase.prototype.async run):
482         (WI.AuditTestCase.prototype.async run.checkResultProperty.addErrorForValueType): Deleted.
483         (WI.AuditTestCase.prototype.async run.checkResultProperty): Deleted.
484         (WI.AuditTestCase.prototype.async run.async resultArrayForEach): Deleted.
485
486         * UserInterface/Models/AuditTestCaseResult.js:
487         (WI.AuditTestCaseResult.async fromPayload):
488         (WI.AuditTestCaseResult.prototype.toJSON):
489
490         * UserInterface/Views/AuditTestCaseContentView.js:
491         (WI.AuditTestCaseContentView.prototype.layout):
492
493 2018-12-03  Devin Rousso  <drousso@apple.com>
494
495         Web Inspector: Audit: save the expanded state of test groups
496         https://bugs.webkit.org/show_bug.cgi?id=192346
497         <rdar://problem/46440704>
498
499         Reviewed by Matt Baker.
500
501         * UserInterface/Views/AuditTreeElement.js:
502         (WI.AuditTreeElement):
503         (WI.AuditTreeElement.prototype.onattach):
504         (WI.AuditTreeElement.prototype.onexpand): Added.
505         (WI.AuditTreeElement.prototype.oncollapse): Added.
506
507 2018-12-03  Devin Rousso  <drousso@apple.com>
508
509         Web Inspector: Audit: sidebar briefly shows "No Filter Results" before populating default audits
510         https://bugs.webkit.org/show_bug.cgi?id=192341
511         <rdar://problem/46436550>
512
513         Reviewed by Matt Baker.
514
515         * UserInterface/Views/AuditNavigationSidebarPanel.js:
516         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
517         (WI.AuditNavigationSidebarPanel.prototype._addTest):
518         (WI.AuditNavigationSidebarPanel.prototype._addResult):
519         (WI.AuditNavigationSidebarPanel.prototype.applyFiltersToTreeElement): Deleted.
520         Delay the construction of the "Results" folder until it's needed, since adding a hidden
521         `WI.TreeElement` will cause the placeholder to appear.
522
523 2018-12-03  Devin Rousso  <drousso@apple.com>
524
525         Web Inspector: Audit: navigating while tests are running should stop and clear all results
526         https://bugs.webkit.org/show_bug.cgi?id=192317
527         <rdar://problem/46435222>
528
529         Reviewed by Joseph Pecoraro.
530
531         * UserInterface/Controllers/AuditManager.js:
532         (WI.AuditManager.prototype.async start):
533         (WI.AuditManager.prototype._handleFrameMainResourceDidChange):
534
535         * UserInterface/Views/AuditNavigationSidebarPanel.js:
536         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
537         Drive-by: pass the index of the saved result.
538
539 2018-12-03  Devin Rousso  <drousso@apple.com>
540
541         Web Inspector: Audit: "Add Default Audits" shown when there are no filter results
542         https://bugs.webkit.org/show_bug.cgi?id=192105
543
544         Reviewed by Matt Baker.
545
546         * UserInterface/Views/NavigationSidebarPanel.js:
547         (WI.NavigationSidebarPanel):
548         (WI.NavigationSidebarPanel.prototype.get hasActiveFilters): Added.
549         (WI.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
550         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
551         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
552         (WI.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
553         (WI.NavigationSidebarPanel.prototype.updateFilter):
554         (WI.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults):
555         (WI.NavigationSidebarPanel.prototype._filterDidChange):
556         (WI.NavigationSidebarPanel.prototype._updateFilter): Deleted.
557         (WI.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded): Deleted.
558
559         * UserInterface/Views/AuditNavigationSidebarPanel.js:
560         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
561         Drive-by: change capitalization for consistency with other navigation sidebars.
562
563         * Localizations/en.lproj/localizedStrings.js:
564
565 2018-12-03  Devin Rousso  <drousso@apple.com>
566
567         Web Inspector: Canvas: add singular localized string for "Record first %s frames"
568         https://bugs.webkit.org/show_bug.cgi?id=192189
569
570         Reviewed by Joseph Pecoraro.
571
572         * UserInterface/Views/CanvasOverviewContentView.js:
573         (WI.CanvasOverviewContentView):
574         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
575         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel): Added.
576         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureInput):
577         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
578         (WI.CanvasOverviewContentView.prototype.initialLayout): Deleted.
579         Drive-by: update the auto-capture navigation item when the view is first created so there is
580         no flashing of in the navigation bar (before `initialLayout` is called).
581
582         * UserInterface/Views/CheckboxNavigationItem.js:
583         (WI.CheckboxNavigationItem):
584         (WI.CheckboxNavigationItem.prototype.set label): Added.
585
586         * Localizations/en.lproj/localizedStrings.js:
587
588 2018-12-03  Matt Baker  <mattbaker@apple.com>
589
590         Web Inspector: REGRESSION(r238599): Multiple Selection: restoring selection when opening WebInspector puts the TreeElement into a permanent selected state
591         https://bugs.webkit.org/show_bug.cgi?id=192091
592         <rdar://problem/46321795>
593
594         Reviewed by Devin Rousso.
595
596         * UserInterface/Controllers/SelectionController.js:
597         (WI.SelectionController.prototype.didInsertItem):
598         Fix a bug where selected indexes were overwritten by the inserted index.
599
600         * UserInterface/Views/TreeOutline.js:
601         (WI.TreeOutline):
602         (WI.TreeOutline.prototype.insertChild):
603         Update the SelectionController with the newly inserted index before
604         attaching the TreeElement. Attaching the TreeElement can cause it to
605         become selected, which would add the index to the SelectionController,
606         only to have it immediately incremented by the call to `didInsertItem`.
607         Additionally, change `insertionIndex` to be the index of the inserted
608         item instead of the inserted item's previous sibling.
609
610         (WI.TreeOutline.prototype._rememberTreeElement):
611         (WI.TreeOutline.prototype._forgetTreeElement):
612         (WI.TreeOutline.prototype._indexOfTreeElement.previousElement): Deleted.
613         Eliminate TreeElement index caching, which could become stale and cause
614         the wrong index to be calculated. Additionally, instead of walking up the
615         parent chain to determine the index, start at the root and use existing
616         method `traverseNextTreeElement`.
617
618 2018-12-03  Devin Rousso  <drousso@apple.com>
619
620         Web Inspector: Audit: test tree elements should start out collapsed
621         https://bugs.webkit.org/show_bug.cgi?id=192107
622
623         Reviewed by Matt Baker.
624
625         * UserInterface/Views/AuditTreeElement.js:
626         (WI.AuditTreeElement.prototype.onattach):
627
628 2018-12-03  Nikita Vasilyev  <nvasilyev@apple.com>
629
630         Web Inspector: Styles: can't select properties of read-only rules
631         https://bugs.webkit.org/show_bug.cgi?id=192266
632
633         Reviewed by Devin Rousso.
634
635         Implement multiple properties selection for read-only rules (such as User Agent Stylesheets)
636         in the Styles panel.
637
638         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
639         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
640         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
641         Keep selection on layout.
642
643         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
644         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
645         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyBlur):
646         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseEnter):
647         SpreadsheetCSSStyleDeclarationEditor is used by ComputedStyleDetailsPanel, which doesn't have:
648           - spreadsheetCSSStyleDeclarationEditorPropertyBlur
649           - spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter
650
651         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
652         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
653         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
654         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
655         * UserInterface/Views/SpreadsheetStyleProperty.js:
656         (WI.SpreadsheetStyleProperty.prototype.startEditingName):
657         (WI.SpreadsheetStyleProperty.prototype.startEditingValue):
658
659 2018-11-30  Brian Burg  <bburg@apple.com>
660
661         Web Inspector: resource combining should be more robust against missing WebKitAdditions
662         https://bugs.webkit.org/show_bug.cgi?id=192255
663         <rdar://problem/46042879>
664
665         Reviewed by Joseph Pecoraro.
666
667         * Scripts/copy-user-interface-resources.pl:
668         (combineOrStripResourcesForWebKitAdditions):
669
670 2018-11-30  Nikita Vasilyev  <nvasilyev@apple.com>
671
672         Web Inspector: Jumping from Computed to Styles should select property
673         https://bugs.webkit.org/show_bug.cgi?id=192198
674
675         Reviewed by Devin Rousso.
676
677         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
678         (.spreadsheet-style-declaration-editor .property.highlighted): Deleted.
679         (@keyframes style-property-highlight): Deleted.
680         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
681         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
682         Remove unnecessary `__propertyView` property.
683
684         * UserInterface/Views/SpreadsheetStyleProperty.js:
685         (WI.SpreadsheetStyleProperty.prototype.detached):
686         (WI.SpreadsheetStyleProperty.prototype.highlight): Deleted.
687
688 2018-11-30  Matt Baker  <mattbaker@apple.com>
689
690         Web Inspector: REGRESSION(r238599): Multiple Selection: selecting a breakpoint will change the selection to it's parent on the first click
691         https://bugs.webkit.org/show_bug.cgi?id=192093
692         <rdar://problem/46318466>
693
694         Reviewed by Devin Rousso.
695
696         * UserInterface/Views/TreeElement.js:
697         (WI.TreeElement.prototype.select):
698         TreeElement shouldn't manage the TreeOutline's selection barrier.
699
700         * UserInterface/Views/TreeOutline.js:
701         (WI.TreeOutline):
702         (WI.TreeOutline.prototype.get processingSelectionChange):
703         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
704         (WI.TreeOutline.prototype.selectTreeElementInternal):
705         The selection re-entry barrier `processingSelectionChange` should be
706         managed internally by TreeOutline, and exposed as a read-only property.
707         Fix a bug where the barrier was cleared before dispatching the change
708         notification, which can cause re-entry as a side effect.
709
710 2018-11-30  Devin Rousso  <drousso@apple.com>
711
712         Web Inspector: Settings: reload button needs horizontal spacing
713         https://bugs.webkit.org/show_bug.cgi?id=192231
714         <rdar://problem/46274363>
715
716         Reviewed by Matt Baker.
717
718         * UserInterface/Views/SettingsTabContentView.css:
719         (.content-view.settings > .settings-view > .container button):
720         (.content-view.settings > .settings-view > .container > .title):
721         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]):
722         (body[dir=ltr] .content-view.settings > .settings-view > .container > .title): Deleted.
723         (body[dir=rtl] .content-view.settings > .settings-view > .container > .title): Deleted.
724         (body[dir=ltr] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
725         (body[dir=rtl] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
726         Drive-by: replace `dir=*` attribute rules with `-webkit-margin-*` properties.
727
728 2018-11-30  Joseph Pecoraro  <pecoraro@apple.com>
729
730         Web Inspector: Uncaught Exception opening Web Inspector to Debugger Tab
731         https://bugs.webkit.org/show_bug.cgi?id=192174
732
733         Reviewed by Devin Rousso.
734
735         * UserInterface/Protocol/InspectorBackend.js:
736         (InspectorBackendClass.prototype.runAfterPendingDispatches):
737         Dispatch the callback with a timeout if there is no backend target yet
738         so it doesn't get lost.
739
740         * UserInterface/Protocol/Connection.js:
741         (InspectorBackend.Connection.prototype.runAfterPendingDispatches):
742         Change the ambiguous name "script" to the more familiar "callback".
743
744 2018-11-30  Devin Rousso  <drousso@apple.com>
745
746         Web Inspector: replace all unicode characters with the escaped character code
747         https://bugs.webkit.org/show_bug.cgi?id=192216
748         <rdar://problem/46275637>
749
750         Reviewed by Brian Burg.
751
752         * Localizations/en.lproj/localizedStrings.js:
753         * UserInterface/Controllers/BreakpointPopoverController.js:
754         * UserInterface/Debug/UncaughtExceptionReporter.js:
755         * UserInterface/Models/AuditTestCase.js:
756         * UserInterface/Models/Canvas.js:
757         * UserInterface/Models/RecordingAction.js:
758         * UserInterface/Models/ScriptTimelineRecord.js:
759         * UserInterface/Views/AuditTestCaseContentView.js:
760         * UserInterface/Views/AuditTestContentView.js:
761         * UserInterface/Views/AuditTestGroupContentView.js:
762         * UserInterface/Views/CallFrameView.js:
763         * UserInterface/Views/CanvasContentView.js:
764         * UserInterface/Views/CanvasOverviewContentView.css:
765         * UserInterface/Views/ConsoleMessageView.css:
766         * UserInterface/Views/ContextMenuUtilities.js:
767         * UserInterface/Views/DOMEventsBreakdownView.js:
768         * UserInterface/Views/DataGrid.css:
769         * UserInterface/Views/DataGrid.js:
770         * UserInterface/Views/DatabaseTableContentView.js:
771         * UserInterface/Views/DebuggerDashboardView.css:
772         * UserInterface/Views/DebuggerSidebarPanel.js:
773         * UserInterface/Views/ErrorObjectView.js:
774         * UserInterface/Views/EventBreakpointPopover.js:
775         * UserInterface/Views/InlineSwatch.js:
776         * UserInterface/Views/LayerTreeDataGridNode.js:
777         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
778         * UserInterface/Views/Layers3DContentView.js:
779         * UserInterface/Views/LayoutTimelineDataGridNode.js:
780         * UserInterface/Views/NetworkTableContentView.css:
781         * UserInterface/Views/NetworkTableContentView.js:
782         * UserInterface/Views/ObjectPreviewView.js:
783         * UserInterface/Views/ProfileDataGridNode.js:
784         * UserInterface/Views/ResourceTimelineDataGridNode.js:
785         * UserInterface/Views/ScriptDetailsTimelineView.css:
786         * UserInterface/Views/TextEditor.css:
787         * UserInterface/Views/TreeOutline.css:
788
789 2018-11-29  Matt Baker  <mattbaker@apple.com>
790
791         Web Inspector: RTL: disclosure triangles should be flipped and aligned right
792         https://bugs.webkit.org/show_bug.cgi?id=192089
793         <rdar://problem/46316753>
794
795         Reviewed by Devin Rousso.
796
797         * UserInterface/Views/ComputedStyleSection.css:
798         (.computed-style-section .computed-property-item .disclosure-button):
799         (body[dir=rtl] .computed-style-section .computed-property-item .disclosure-button):
800
801         * UserInterface/Views/ConsoleMessageView.css:
802         (.console-message.expandable .console-top-level-message::before):
803         (body[dir=rtl] .console-message.expandable .console-top-level-message::before):
804
805         * UserInterface/Views/ErrorObjectView.css:
806         (.error-object > .formatted-error::before):
807         (body[dir=rtl] .error-object > .formatted-error::before):
808         (.error-object .content):
809
810         * UserInterface/Views/LogContentView.css:
811         (.console-group-title::before):
812         (body[dir=ltr] .console-group-title::before):
813         (body[dir=rtl] .console-group-title::before):
814
815         * UserInterface/Views/ObjectTreeView.css:
816         (body[dir=rtl] .object-tree > :matches(.title, .object-preview)::before):
817
818         * UserInterface/Views/TypeTreeElement.css:
819         (body[dir=rtl] .item.type-tree-element.parent > .disclosure-button):
820
821 2018-11-28  Dean Jackson  <dino@apple.com>
822
823         [ES Modules] Allow .mjs content when loaded from file://
824         https://bugs.webkit.org/show_bug.cgi?id=192100
825         <rdar://problem/46320065>
826
827         Reviewed by Sam Weinig.
828
829         Add a mapping from .mjs to application/javascript.
830
831         * UserInterface/Base/MIMETypeUtilities.js:
832         (WI.mimeTypeForFileExtension):
833
834 2018-11-29  Matt Baker  <mattbaker@apple.com>
835
836         Web Inspector: Elements: selecting more than one DOM node causes the scope highlight to contrast
837         https://bugs.webkit.org/show_bug.cgi?id=192118
838         <rdar://problem/46325664>
839
840         Reviewed by Devin Rousso.
841
842         Use an alpha blended border for the "selected" DOM scope highlight,
843         matching the "hovered" scope highlight.
844
845         * UserInterface/Views/DOMTreeOutline.css:
846         (.tree-outline.dom li.selected + ol.children.expanded):
847
848 2018-11-28  Joseph Pecoraro  <pecoraro@apple.com>
849
850         Web Inspector: REGRESSION(?): all "Show *" develop menu items cause the page to crash
851         https://bugs.webkit.org/show_bug.cgi?id=192016
852         <rdar://problem/46284417>
853
854         Reviewed by Devin Rousso.
855
856         * UserInterface/Base/Main.js:
857         (WI.loaded):
858         (WI.initializeBackendTarget):
859         (WI.contentLoaded):
860         (WI.whenTargetsAvailable):
861         Don't evaluate any InspectorFrontendAPI commands until the frontend
862         has initialized a main target and the user interface.
863
864 2018-11-28  Nikita Vasilyev  <nvasilyev@apple.com>
865
866         Web Inspector: Styles: enable selection of multiple properties by default
867         https://bugs.webkit.org/show_bug.cgi?id=192109
868         <rdar://problem/46323565>
869
870         Reviewed by Devin Rousso.
871
872         * UserInterface/Base/Setting.js:
873         * UserInterface/Views/SettingsTabContentView.js:
874         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
875         Remove the checkbox.
876
877         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
878         (.spreadsheet-style-declaration-editor .property):
879         (.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
880         (.spreadsheet-style-declaration-editor .property.selected):
881         (.spreadsheet-style-declaration-editor .property.selected:focus):
882         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property): Deleted.
883         (.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)): Deleted.
884         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected): Deleted.
885         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus): Deleted.
886         Remove `.multiple-properties-selection` class.
887
888         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
889         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
890         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
891         (WI.SpreadsheetCSSStyleDeclarationSection):
892         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
893         * UserInterface/Views/SpreadsheetStyleProperty.js:
894         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
895         * UserInterface/Views/SpreadsheetTextField.js:
896         (WI.SpreadsheetTextField):
897         (WI.SpreadsheetTextField.prototype._handleFocus): Deleted.
898
899 2018-11-28  Devin Rousso  <drousso@apple.com>
900
901         Web Inspector: Audit: empty results folder is shown after clearing filters
902         https://bugs.webkit.org/show_bug.cgi?id=192106
903
904         Reviewed by Matt Baker.
905
906         * UserInterface/Views/AuditNavigationSidebarPanel.js:
907         (WI.AuditNavigationSidebarPanel.prototype.applyFiltersToTreeElement): Added.
908
909 2018-11-28  Matt Baker  <mattbaker@apple.com>
910
911         Web Inspector: Remove unused DataGrid and TreeOutline code
912         https://bugs.webkit.org/show_bug.cgi?id=191622
913         <rdar://problem/46052014>
914
915         Reviewed by Devin Rousso.
916
917         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
918         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
919
920         * UserInterface/Views/DOMTreeElement.js:
921         (WI.DOMTreeElement.prototype.insertChildElement):
922
923         * UserInterface/Views/DOMTreeOutline.js:
924         (WI.DOMTreeOutline):
925         (WI.DOMTreeOutline.prototype.update):
926
927         * UserInterface/Views/DataGrid.js:
928         (WI.DataGrid.prototype.removeChildrenRecursive): Deleted.
929
930         * UserInterface/Views/DataGridNode.js:
931         (WI.DataGridNode.prototype.removeChildren):
932         (WI.DataGridNode.prototype.removeChildrenRecursive): Deleted.
933
934         * UserInterface/Views/ErrorObjectView.css:
935         (.error-object:not(.expanded) .content):
936         (.error-object .content):
937         (.error-object:not(.expanded) .tree-outline): Deleted.
938         (.error-object .tree-outline): Deleted.
939
940         * UserInterface/Views/ErrorObjectView.js:
941         (WI.ErrorObjectView):
942         (WI.ErrorObjectView.prototype.get treeOutline): Deleted.
943         Use a simple container since TreeOutline features aren't used,
944         and remove unused property `treeOutline`.
945
946         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
947         (WI.RecordingTraceDetailsSidebarPanel):
948
949         * UserInterface/Views/TreeElement.js:
950         (WI.TreeElement.prototype.removeChildren):
951         (WI.TreeElement.prototype.removeChildrenRecursive): Deleted.
952
953         * UserInterface/Views/TreeOutline.js:
954         (WI.TreeOutline):
955         (WI.TreeOutline.prototype.removeChildrenRecursive): Deleted.
956         (WI.TreeOutline.prototype.reattachIfIndexChanged): Deleted.
957         Removed `element` parameter now that the only use case has been removed.
958
959 2018-11-27  Matt Baker  <mattbaker@apple.com>
960
961         Web Inspector: Elements tab should allow selecting/deleting multiple DOM nodes
962         https://bugs.webkit.org/show_bug.cgi?id=192059
963         <rdar://problem/46294827>
964
965         Reviewed by Devin Rousso.
966
967         Enable multiple DOM node selection in the DOMTreeContentView.
968
969         * UserInterface/Controllers/SelectionController.js:
970         (WI.SelectionController):
971         (WI.SelectionController.prototype.get allowsEmptySelection):
972         (WI.SelectionController.prototype.set allowsEmptySelection):
973         Allow clients to control whether the last selected item can be deselected.
974         (WI.SelectionController.prototype.deselectItem):
975         (WI.SelectionController.prototype.didInsertItem):
976         Rewritten to prevent infinite loop.
977         (WI.SelectionController.prototype.didRemoveItem):
978         (WI.SelectionController.prototype._updateSelectedItems):
979         (WI.SelectionController.prototype._adjustIndexesAfter): Deleted.
980
981         * UserInterface/Views/DOMTreeContentView.js:
982         (WI.DOMTreeContentView):
983
984         * UserInterface/Views/DOMTreeElement.js:
985         (WI.DOMTreeElement.prototype.updateSelectionArea):
986         * UserInterface/Views/DOMTreeOutline.js:
987         (WI.DOMTreeOutline.prototype.updateSelection):
988         Updating the selection area DOM element should not assume that only one
989         TreeElement is selected at a time.
990
991         * UserInterface/Views/TreeOutline.js:
992         (WI.TreeOutline.prototype.get allowsEmptySelection):
993         (WI.TreeOutline.prototype.set allowsEmptySelection):
994         (WI.TreeOutline.prototype.set selectedTreeElement):
995         (WI.TreeOutline.prototype.get selectedTreeElements):
996         (WI.TreeOutline.prototype._treeKeyDown):
997
998         * UserInterface/Views/TreeOutlineGroup.js:
999         (WI.TreeOutlineGroup):
1000         (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
1001         Eliminate use of `TreeElement.prototype.deselect`.
1002
1003 2018-11-27  Matt Baker  <mattbaker@apple.com>
1004
1005         Web Inspector: TreeOutline should re-use multiple-selection logic from Table
1006         https://bugs.webkit.org/show_bug.cgi?id=191483
1007         <rdar://problem/45953305>
1008
1009         Reviewed by Devin Rousso.
1010
1011         Update TreeOutline to use SelectionController. Adopting SelectionController
1012         in TreeOutline is not as straightforward as it was in Table. Selected items
1013         are tracked by index, and TreeElement lacks an explicit index. As a consequence
1014         TreeElement indexes are calcualted as needed and cached. The cache is cleared
1015         whenever an element is added or removed.
1016
1017         * UserInterface/Controllers/SelectionController.js:
1018         (WI.SelectionController.prototype.didInsertItem):
1019         (WI.SelectionController.prototype.didRemoveItem):
1020         (WI.SelectionController.prototype.handleKeyDown):
1021         Drive-by syntax error fix.
1022         (WI.SelectionController.prototype._adjustIndexesAfter):
1023         (WI.SelectionController):
1024
1025         * UserInterface/Views/DOMTreeElement.js:
1026         (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
1027         (WI.DOMTreeElement.prototype.selectOnMouseDown): Deleted.
1028
1029         * UserInterface/Views/DOMTreeOutline.js:
1030         (WI.DOMTreeOutline.prototype._onmousedown):
1031         Item selection is now handled by SelectionController.
1032
1033         * UserInterface/Views/ShaderProgramTreeElement.js:
1034         (WI.ShaderProgramTreeElement.prototype.canSelectOnMouseDown):
1035         (WI.ShaderProgramTreeElement.prototype.selectOnMouseDown): Deleted.
1036
1037         * UserInterface/Views/TreeElement.js:
1038         (WI.TreeElement.prototype.canSelectOnMouseDown):
1039         (WI.TreeElement.prototype._attach):
1040         (WI.TreeElement.prototype.select):
1041         (WI.TreeElement.prototype.deselect):
1042         Route item selection through the parent TreeOutline, in order to go though
1043         the TreeOutline's SelectionController.
1044
1045         (WI.TreeElement.treeElementMouseDown): Deleted.
1046         Moved handler to TreeOutline, which owns the SelectionController that
1047         needs to respond to mouse events.
1048
1049         * UserInterface/Views/TreeOutline.js:
1050         (WI.TreeOutline):
1051         (WI.TreeOutline.prototype.get allowsMultipleSelection):
1052         (WI.TreeOutline.prototype.set allowsMultipleSelection):
1053         (WI.TreeOutline.prototype.get selectedTreeElement):
1054         (WI.TreeOutline.prototype.set selectedTreeElement):
1055         (WI.TreeOutline.prototype.insertChild):
1056         (WI.TreeOutline.prototype.removeChildAtIndex):
1057         (WI.TreeOutline.prototype._rememberTreeElement):
1058         (WI.TreeOutline.prototype._forgetTreeElement):
1059         (WI.TreeOutline.prototype._treeKeyDown):
1060         (WI.TreeOutline.prototype.selectionControllerNumberOfItems):
1061         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
1062         (WI.TreeOutline.prototype.selectionControllerNextSelectableIndex):
1063         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableIndex):
1064         (WI.TreeOutline.prototype.selectTreeElementInternal):
1065         (WI.TreeOutline._generateStyleRulesIfNeeded._indexOfTreeElement.previousElement):
1066         (WI.TreeOutline._generateStyleRulesIfNeeded):
1067
1068 2018-11-27  Nikita Vasilyev  <nvasilyev@apple.com>
1069
1070         Web Inspector: Experimental Computed panel is unreadable in Dark Mode
1071         https://bugs.webkit.org/show_bug.cgi?id=192053
1072
1073         Reviewed by Matt Baker.
1074
1075         * UserInterface/Views/ComputedStyleDetailsPanel.css:
1076         (@media (prefers-dark-interface)):
1077         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
1078         * UserInterface/Views/ComputedStyleSection.css:
1079         (.computed-style-section .computed-property-item.expanded):
1080         (.computed-style-section .computed-property-item.expanded + .computed-property-item):
1081         (@media (prefers-dark-interface)):
1082
1083 2018-11-27  Nikita Vasilyev  <nvasilyev@apple.com>
1084
1085         Web Inspector: Computed panel: allow to expand properties to show list of overridden values
1086         https://bugs.webkit.org/show_bug.cgi?id=191984
1087
1088         Reviewed by Devin Rousso.
1089
1090         Introduce the new experimental Computed Style Cascades.
1091
1092         Each property now can expand to show a list of overridden values, their corresponding
1093         selectors, and source locations.
1094
1095         * Localizations/en.lproj/localizedStrings.js:
1096         * UserInterface/Base/Setting.js:
1097         * UserInterface/Main.html:
1098         * UserInterface/Models/DOMNodeStyles.js:
1099         (WI.DOMNodeStyles.prototype.get uniqueOrderedStyles):
1100         Move `uniqueOrderedStyles` function unmodified from SpreadsheetRulesStyleDetailsPanel so it can be used by ComputedStyleDetailsPanel, too.
1101
1102         * UserInterface/Views/ComputedStyleDetailsPanel.css:
1103         (.computed-with-traces .computed-style-properties):
1104         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
1105         (.computed-with-traces .details-section.computed-style-properties > .content):
1106         (.computed-with-traces .computed-style-properties .property .go-to-arrow):
1107
1108         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1109         (WI.ComputedStyleDetailsPanel.prototype.refresh):
1110         (WI.ComputedStyleDetailsPanel.prototype.applyFilter):
1111         (WI.ComputedStyleDetailsPanel.prototype.focusFirstSection):
1112         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
1113         (WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
1114         (WI.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged):
1115         (WI.ComputedStyleDetailsPanel.prototype._handlePropertiesSectionCollapsedStateChanged):
1116         (WI.ComputedStyleDetailsPanel.prototype._handleEditorFilterApplied):
1117         (WI.ComputedStyleDetailsPanel):
1118         Use the new Computed section (WI.ComputedStyleSection) only when it's enabled in the experimental settings.
1119         Otherwise, use the current Computed section.
1120
1121         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
1122         (WI.ComputedStyleDetailsSidebarPanel):
1123
1124         * UserInterface/Views/ComputedStyleSection.css: Added.
1125         (.computed-style-section):
1126         (.computed-style-section .computed-property-item):
1127         (.computed-style-section .computed-property-item.expanded):
1128         (.computed-style-section .computed-property-item.expanded + .computed-property-item):
1129         (.computed-style-section .computed-property-item .disclosure-button):
1130         (.computed-style-section .computed-property-item .property-traces):
1131         (.computed-style-section .computed-property-item.expanded .property-traces):
1132         (.computed-style-section .computed-property-item.expanded .disclosure-button):
1133         (.computed-style-section .computed-property-item .property-trace-item):
1134         (.computed-style-section .computed-property-item .property-trace-item .property.overridden .value):
1135         (.computed-style-section .property-trace-item-left,):
1136         (.computed-style-section .property-trace-item-right):
1137         (.computed-style-section .computed-property-item .property-trace-item .value):
1138         (.computed-style-section .property .value):
1139         (.computed-style-section .computed-property-item .property):
1140         (.computed-style-section .computed-property-item .property .name):
1141         (.computed-style-section .computed-property-item .property-trace-item .selector):
1142         (.computed-style-section .computed-property-item .origin):
1143         (.computed-style-section .computed-property-item .go-to-link):
1144         (.computed-style-section .property-trace-item .property .name,):
1145         (.computed-style-section .property-trace-item .property .value + span):
1146         (.computed-style-properties.details-section > .content,):
1147
1148         * UserInterface/Views/ComputedStyleSection.js: Added.
1149         (WI.ComputedStyleSection):
1150         (WI.ComputedStyleSection.prototype.get style):
1151         (WI.ComputedStyleSection.prototype.set style):
1152         (WI.ComputedStyleSection.prototype.get styleTraces):
1153         (WI.ComputedStyleSection.prototype.set styleTraces):
1154         (WI.ComputedStyleSection.prototype.set showsImplicitProperties):
1155         (WI.ComputedStyleSection.prototype.set alwaysShowPropertyNames):
1156         (WI.ComputedStyleSection.prototype.set propertyVisibilityMode):
1157         (WI.ComputedStyleSection.prototype.set hideFilterNonMatchingProperties):
1158         (WI.ComputedStyleSection.prototype.get propertiesToRender):
1159         (WI.ComputedStyleSection.prototype.layout):
1160         (WI.ComputedStyleSection.prototype.detached):
1161         (WI.ComputedStyleSection.prototype.hidden):
1162         (WI.ComputedStyleSection.prototype.applyFilter):
1163         (WI.ComputedStyleSection.prototype.spreadsheetStylePropertyShowProperty):
1164         (WI.ComputedStyleSection.prototype._createTrace):
1165         (WI.ComputedStyleSection.prototype._handlePropertiesChanged):
1166
1167         * UserInterface/Views/ExpandableView.js: Added.
1168         (WI.ExpandableView):
1169         (WI.ExpandableView.prototype.get element):
1170         (WI.ExpandableView.prototype._onDisclosureButtonClick):
1171         (WI.ExpandableView.prototype._update):
1172
1173         * UserInterface/Views/SettingsTabContentView.js:
1174         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1175
1176         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1177         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
1178         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout):
1179         Replace `_renderOrigin` with WI.StyleOriginView so it could be used by WI.ComputedStyleSection.
1180
1181         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1182         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
1183
1184         * UserInterface/Views/SpreadsheetStyleProperty.js:
1185         (WI.SpreadsheetStyleProperty.prototype.update):
1186         (WI.SpreadsheetStyleProperty.prototype._isEditable):
1187         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
1188         Introduce `readOnly` option so WI.SpreadsheetStyleProperty could be used by WI.ComputedStyleSection.
1189
1190         * UserInterface/Views/StyleOriginView.js: Added.
1191         (WI.StyleOriginView):
1192
1193 2018-11-27  Timothy Hatcher  <timothy@apple.com>
1194
1195         Web Inspector: Add support for forcing color scheme appearance in DOM tree.
1196         https://bugs.webkit.org/show_bug.cgi?id=191820
1197         rdar://problem/46153172
1198
1199         Reviewed by Devin Rousso.
1200
1201         * Localizations/en.lproj/localizedStrings.js: Updated.
1202         * UserInterface/Controllers/CSSManager.js:
1203         (WI.CSSManager):
1204         (WI.CSSManager.prototype.get defaultAppearance): Added.
1205         (WI.CSSManager.prototype.get forcedAppearance): Added.
1206         (WI.CSSManager.prototype.set forcedAppearance): Added.
1207         (WI.CSSManager.prototype.canForceAppearance): Added.
1208         (WI.CSSManager.prototype.defaultAppearanceDidChange): Added.
1209         * UserInterface/Images/Appearance.svg: Added.
1210         * UserInterface/Protocol/PageObserver.js:
1211         (WI.PageObserver.prototype.defaultAppearanceChanged): Added.
1212         * UserInterface/Views/DOMTreeContentView.js:
1213         (WI.DOMTreeContentView):
1214         (WI.DOMTreeContentView.prototype.get navigationItems):
1215         (WI.DOMTreeContentView.prototype._defaultAppearanceDidChange): Added.
1216         (WI.DOMTreeContentView.prototype._toggleAppearance): Added.
1217
1218 2018-11-27  Matt Baker  <mattbaker@apple.com>
1219
1220         Web Inspector: Cookies table needs copy keyboard shortcut and context menu support
1221         https://bugs.webkit.org/show_bug.cgi?id=191482
1222         <rdar://problem/45953002>
1223
1224         Reviewed by Joseph Pecoraro.
1225
1226         * UserInterface/Views/CookieStorageContentView.js:
1227         (WI.CookieStorageContentView.prototype.handleCopyEvent):
1228         (WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
1229         As with Delete, if the target row is selected, all selected rows are copied.
1230         Otherwise only the target row is copied. This distinction will be surfaced
1231         in the UI in https://webkit.org/b/191095.
1232
1233         (WI.CookieStorageContentView.prototype.tablePopulateCell):
1234         (WI.CookieStorageContentView.prototype._cookiesAtIndexes):
1235         (WI.CookieStorageContentView.prototype._formatCookiesAsText):
1236         (WI.CookieStorageContentView.prototype._formatCookiePropertyForColumn):
1237         (WI.CookieStorageContentView):
1238         Break Cookie property formatting into a helper method, which is used for
1239         formatting Table cells and creating plain text for the clipboard.
1240
1241         * UserInterface/Views/Table.js:
1242         (WI.Table.prototype.get columns):
1243
1244 2018-11-27  Matt Baker  <mattbaker@apple.com>
1245
1246         Web Inspector: Table selection should be handled by a SelectionController
1247         https://bugs.webkit.org/show_bug.cgi?id=191977
1248         <rdar://problem/46253093>
1249
1250         Reviewed by Devin Rousso.
1251
1252         Add a SelectionController class, which manages an IndexSet of selected
1253         items, and provides operations for adding and removing items from the
1254         selection. Complex behaviors such as shift-clicking to select a range of
1255         items, and updating the selection using the keyboard, are forwarded to
1256         the controller using special-purpose methods that accept DOM Event objects.
1257
1258         * UserInterface/Base/Utilities.js:
1259
1260         * UserInterface/Controllers/SelectionController.js: Added.
1261         (WI.SelectionController):
1262         (WI.SelectionController.prototype.get delegate):
1263         (WI.SelectionController.prototype.get lastSelectedItem):
1264         (WI.SelectionController.prototype.get selectedItems):
1265         (WI.SelectionController.prototype.get allowsMultipleSelection):
1266         (WI.SelectionController.prototype.set allowsMultipleSelection):
1267         (WI.SelectionController.prototype.get numberOfItems):
1268         (WI.SelectionController.prototype.hasSelectedItem):
1269         (WI.SelectionController.prototype.selectItem):
1270         (WI.SelectionController.prototype.deselectItem):
1271         (WI.SelectionController.prototype.selectAll):
1272         (WI.SelectionController.prototype.deselectAll):
1273         (WI.SelectionController.prototype.removeSelectedItems):
1274         (WI.SelectionController.prototype.reset):
1275         (WI.SelectionController.prototype.didRemoveItem):
1276         (WI.SelectionController.prototype.handleKeyDown):
1277         (WI.SelectionController.prototype.handleItemMouseDown.normalizeRange):
1278         (WI.SelectionController.prototype.handleItemMouseDown):
1279         (WI.SelectionController.prototype._deselectAllAndSelect):
1280         (WI.SelectionController.prototype._selectItemsFromArrowKey):
1281         (WI.SelectionController.prototype._nextSelectableIndex):
1282         (WI.SelectionController.prototype._previousSelectableIndex):
1283         (WI.SelectionController.prototype._updateSelectedItems):
1284
1285         * UserInterface/Main.html:
1286         * UserInterface/Test.html:
1287
1288         * UserInterface/Views/Table.js:
1289         (WI.Table):
1290         (WI.Table.prototype.get selectedRow):
1291         (WI.Table.prototype.get selectedRows):
1292         (WI.Table.prototype.get allowsMultipleSelection):
1293         (WI.Table.prototype.set allowsMultipleSelection):
1294         (WI.Table.prototype.isRowSelected):
1295         (WI.Table.prototype.reloadData):
1296         (WI.Table.prototype.selectRow):
1297         (WI.Table.prototype.deselectRow):
1298         (WI.Table.prototype.selectAll):
1299         (WI.Table.prototype.deselectAll):
1300         (WI.Table.prototype.removeRow):
1301         (WI.Table.prototype.removeSelectedRows):
1302         (WI.Table.prototype.selectionControllerSelectionDidChange):
1303         (WI.Table.prototype.selectionControllerNumberOfItems):
1304         (WI.Table.prototype.selectionControllerNextSelectableIndex):
1305         (WI.Table.prototype.selectionControllerPreviousSelectableIndex):
1306         (WI.Table.prototype._handleKeyDown):
1307         (WI.Table.prototype._handleMouseDown):
1308         (WI.Table.prototype._removeRows):
1309         (WI.Table.prototype._toggleSelectedRowStyle):
1310         (WI.Table.prototype._selectRowsFromArrowKey): Deleted.
1311         (WI.Table.prototype._handleMouseDown.normalizeRange): Deleted.
1312         (WI.Table.prototype._deselectAllAndSelect): Deleted.
1313         (WI.Table.prototype._notifySelectionDidChange): Deleted.
1314         (WI.Table.prototype._updateSelectedRows): Deleted.
1315
1316 2018-11-26  Devin Rousso  <drousso@apple.com>
1317
1318         Web Inspector: "No Filter Results" in navigation sidebar should have a button to clear filters
1319         https://bugs.webkit.org/show_bug.cgi?id=191916
1320
1321         Reviewed by Joseph Pecoraro.
1322
1323         * UserInterface/Views/NavigationSidebarPanel.js:
1324         (WI.NavigationSidebarPanel.prototype.resetFilter): Added.
1325         (WI.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults):
1326
1327         * UserInterface/Views/FilterBar.js:
1328         (WI.FilterBar.prototype.clear):
1329
1330         * UserInterface/Views/FilterBarButton.js:
1331         (WI.FilterBarButton.prototype.toggle):
1332
1333         * UserInterface/Views/ResourceSidebarPanel.js:
1334         (WI.ResourceSidebarPanel.prototype.resetFilter): Added.
1335         * UserInterface/Views/StorageSidebarPanel.js:
1336         (WI.StorageSidebarPanel.prototype.resetFilter): Added.
1337
1338         * UserInterface/Views/AuditTestContentView.js:
1339         (WI.AuditTestContentView.prototype.showFilteredPlaceholder):
1340         * UserInterface/Views/NetworkTableContentView.js:
1341         (WI.NetworkTableContentView.prototype._showEmptyFilterResultsMessage):
1342
1343         * UserInterface/Views/Main.css:
1344         (.message-text-view > .message + button): Added.
1345
1346         * Localizations/en.lproj/localizedStrings.js:
1347
1348 2018-11-26  Devin Rousso  <drousso@apple.com>
1349
1350         Web Inspector: Audit: automatically add to tab bar when the experimental setting is enabled
1351         https://bugs.webkit.org/show_bug.cgi?id=191659
1352
1353         Reviewed by Joseph Pecoraro.
1354
1355         * UserInterface/Views/SettingsTabContentView.js:
1356         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1357
1358         * UserInterface/Base/Main.js:
1359         (WI.loaded):
1360         Drive-by: use existing constants instead of hard-coded strings for consistency.
1361
1362 2018-11-25  Devin Rousso  <drousso@apple.com>
1363
1364         Web Inspector: Timelines: add Media timeline
1365         https://bugs.webkit.org/show_bug.cgi?id=191625
1366
1367         Reviewed by Matt Baker.
1368
1369         Add a new timeline to Timelines for media related events (e.g. event/fullscreen/low-power).
1370         Mimics what is visible by using the same instrumentation points as the Network tab when
1371         "Group Media Requests" is enabled.
1372
1373         * UserInterface/Models/MediaInstrument.js: Added.
1374         (WI.MediaInstrument):
1375         (WI.MediaInstrument.supported):
1376         (WI.MediaInstrument.prototype.get timelineRecordType):
1377         (WI.MediaInstrument.prototype.startInstrumentation):
1378         (WI.MediaInstrument.prototype.stopInstrumentation):
1379
1380         * UserInterface/Models/MediaTimelineRecord.js: Added.
1381         (WI.MediaTimelineRecord):
1382         (WI.MediaTimelineRecord.prototype.get eventType):
1383         (WI.MediaTimelineRecord.prototype.get domNode):
1384         (WI.MediaTimelineRecord.prototype.get domEvent):
1385         (WI.MediaTimelineRecord.prototype.get isLowPower):
1386         (WI.MediaTimelineRecord.prototype.get displayName):
1387         (WI.MediaTimelineRecord.prototype.saveIdentityToCookie):
1388
1389         * UserInterface/Views/MediaTimelineDataGridNode.js: Added.
1390         (WI.MediaTimelineDataGridNode):
1391         (WI.MediaTimelineDataGridNode.prototype.get records):
1392         (WI.MediaTimelineDataGridNode.prototype.get data):
1393         (WI.MediaTimelineDataGridNode.prototype.createCellContent):
1394         (WI.MediaTimelineDataGridNode.prototype.iconClassNames):
1395         (WI.MediaTimelineDataGridNode.prototype.filterableDataForColumn):
1396
1397         * UserInterface/Views/MediaTimelineOverviewGraph.js: Added.
1398         (WI.MediaTimelineOverviewGraph):
1399         (WI.MediaTimelineOverviewGraph.prototype.reset):
1400         (WI.MediaTimelineOverviewGraph.prototype.shown):
1401         (WI.MediaTimelineOverviewGraph.prototype.hidden):
1402         (WI.MediaTimelineOverviewGraph.prototype.layout):
1403         (WI.MediaTimelineOverviewGraph.prototype.updateSelectedRecord):
1404         (WI.MediaTimelineOverviewGraph.prototype._handleRecordAdded):
1405         * UserInterface/Views/MediaTimelineOverviewGraph.css: Added.
1406         (.timeline-overview-graph.media > .timeline-record-bar):
1407         (.timeline-overview-graph.media > .timeline-record-bar > .segment):
1408
1409         * UserInterface/Views/MediaTimelineView.js: Added.
1410         (WI.MediaTimelineView):
1411         (WI.MediaTimelineView.prototype.get secondsPerPixel):
1412         (WI.MediaTimelineView.prototype.get selectionPathComponents):
1413         (WI.MediaTimelineView.prototype.closed):
1414         (WI.MediaTimelineView.prototype.reset):
1415         (WI.MediaTimelineView.prototype.dataGridSortComparator.compareDOMNodes):
1416         (WI.MediaTimelineView.prototype.dataGridSortComparator.):
1417         (WI.MediaTimelineView.prototype.dataGridSortComparator):
1418         (WI.MediaTimelineView.prototype.layout):
1419         (WI.MediaTimelineView.prototype._processPendingRecords):
1420         (WI.MediaTimelineView.prototype._handleRecordAdded):
1421         (WI.MediaTimelineView.prototype._handleSelectionPathComponentSiblingSelected):
1422         * UserInterface/Views/MediaTimelineView.css: Added.
1423         (.timeline-view.media > .data-grid):
1424
1425         * UserInterface/Views/DOMEventsBreakdownView.js:
1426         (WI.DOMEventsBreakdownView.prototype.layout):
1427         * UserInterface/Views/DOMNodeEventsContentView.js:
1428         (WI.DOMNodeEventsContentView.prototype.initialLayout):
1429         * UserInterface/Views/NetworkDOMNodeDetailView.js:
1430         (WI.NetworkDOMNodeDetailView):
1431         (WI.NetworkDOMNodeDetailView.prototype.showContentViewForIdentifier):
1432         * UserInterface/Views/NetworkTableContentView.js:
1433         (WI.NetworkTableContentView):
1434         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
1435         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
1436         (WI.NetworkTableContentView.prototype._showDetailView):
1437         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForNodeEntry):
1438         Remove passing of `startTimestamp` to `WI.DOMEventsBreakdownView`, as we should be showing
1439         absolute timestamps for each event, not relative to the start of the recording.
1440
1441         * UserInterface/Views/TimelineIcons.css:
1442         (.media-icon .icon): Added.
1443         (.dom-event-record .icon): Added.
1444         (.dom-event-record.fullscreen .icon): Added.
1445         (.low-power-record .icon): Added.
1446
1447         * UserInterface/Controllers/TimelineManager.js:
1448         (WI.TimelineManager.availableTimelineTypes):
1449         (WI.TimelineManager.prototype.capturingStarted):
1450         (WI.TimelineManager.prototype.capturingStopped):
1451         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
1452         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent): Added.
1453         (WI.TimelineManager.prototype._handleDOMNodeLowPowerChanged): Added.
1454
1455         * UserInterface/Views/TimelineRuler.js:
1456         (WI.TimelineRuler.prototype.clearMarkers):
1457         (WI.TimelineRuler.prototype._handleClick):
1458         * UserInterface/Views/TimelineOverview.js:
1459         (WI.TimelineOverview.prototype._timelineRulerMouseClicked):
1460         * UserInterface/Models/TimelineRecording.js:
1461         (WI.TimelineRecording.prototype.reset):
1462         (WI.TimelineRecording.prototype.addEventMarker):
1463         (WI.TimelineRecording.prototype.addRecord):
1464         (WI.TimelineRecording.prototype._keyForRecord):
1465         Drive-by: rework the logic for "click" event pass-through to the graph underneath.
1466
1467         * UserInterface/Models/Instrument.js:
1468         (WI.Instrument.createForTimelineType):
1469
1470         * UserInterface/Models/TimelineRecord.js:
1471
1472         * UserInterface/Views/TimelineTabContentView.js:
1473         (WI.TimelineTabContentView.displayNameForTimelineType):
1474         (WI.TimelineTabContentView.iconClassNameForTimelineType):
1475         (WI.TimelineTabContentView.genericClassNameForTimelineType):
1476         (WI.TimelineTabContentView.iconClassNameForRecord):
1477         (WI.TimelineTabContentView.displayNameForRecord):
1478         * UserInterface/Views/TimelineRecordBar.css:
1479         (.timeline-record-bar.timeline-record-type-media > .segment): Added.
1480
1481         * UserInterface/Views/ContentView.js:
1482         (WI.ContentView.createFromRepresentedObject):
1483         * UserInterface/Views/TimelineOverviewGraph.js:
1484         (WI.TimelineOverviewGraph.createForTimeline):
1485
1486         * UserInterface/Models/ScriptTimelineRecord.js:
1487         (WI.ScriptTimelineRecord.EventType.displayName):
1488
1489         * UserInterface/Main.html:
1490         * UserInterface/Test.html:
1491         * Localizations/en.lproj/localizedStrings.js:
1492         * UserInterface/Images/DOMEvent.svg: Added.
1493         * UserInterface/Images/DOMEventFullscreen.svg: Added.
1494         * UserInterface/Images/LowPower.svg: Added.
1495         * UserInterface/Images/MediaInstrument.svg: Added.
1496
1497 2018-11-25  Matt Baker  <mattbaker@apple.com>
1498
1499         Web Inspector: Remove parameters from TreeOutline SelectionDidChange event
1500         https://bugs.webkit.org/show_bug.cgi?id=191770
1501
1502         Reviewed by Devin Rousso.
1503
1504         * UserInterface/Controllers/CallFrameTreeController.js:
1505         (WI.CallFrameTreeController.prototype._treeSelectionDidChange):
1506         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1507         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
1508         * UserInterface/Views/CanvasSidebarPanel.js:
1509         (WI.CanvasSidebarPanel):
1510         (WI.CanvasSidebarPanel.prototype._treeSelectionDidChange):
1511         (WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange): Deleted.
1512         * UserInterface/Views/CanvasTabContentView.js:
1513         (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
1514         * UserInterface/Views/DebuggerSidebarPanel.js:
1515         (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
1516         * UserInterface/Views/OpenResourceDialog.js:
1517         (WI.OpenResourceDialog.prototype._treeSelectionDidChange):
1518         * UserInterface/Views/ResourceSidebarPanel.js:
1519         (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
1520         * UserInterface/Views/SearchSidebarPanel.js:
1521         (WI.SearchSidebarPanel.prototype._treeSelectionDidChange):
1522         * UserInterface/Views/StorageSidebarPanel.js:
1523         (WI.StorageSidebarPanel._treeSelectionDidChange):
1524         * UserInterface/Views/TimelineDataGrid.js:
1525         (WI.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):
1526         (WI.TimelineDataGrid):
1527         * UserInterface/Views/TimelineTabContentView.js:
1528         (WI.TimelineTabContentView.prototype._recordingsTreeSelectionDidChange):
1529         Use `event.target.selectedTreeElement` instead of `event.data.selectedElement`.
1530
1531         * UserInterface/Views/TimelineOverview.js:
1532         (WI.TimelineOverview.prototype._timelinesTreeSelectionDidChange):
1533         (WI.TimelineOverview.prototype._timelinesTreeSelectionDidChange.updateGraphSelectedState): Deleted.
1534         Refactor away the single place `event.data.deselectedElement` was used.
1535
1536         * UserInterface/Views/TreeElement.js:
1537         (WI.TreeElement.prototype.select):
1538         (WI.TreeElement.prototype.deselect):
1539         Remove `selectedElement` and `deselectedElement` from event data.
1540
1541 2018-11-19  Devin Rousso  <drousso@apple.com>
1542
1543         Web Inspector: Audit: removing and re-adding the tab will duplicate tests
1544         https://bugs.webkit.org/show_bug.cgi?id=191843
1545
1546         Reviewed by Matt Baker.
1547
1548         * UserInterface/Controllers/AuditManager.js:
1549         (WI.AuditManager.prototype.loadStoredTests):
1550         If we already have tests, don't attempt to load any stored tests.
1551
1552 2018-11-19  Joseph Pecoraro  <pecoraro@apple.com>
1553
1554         Web Inspector: "Reload Web Inspector" button no longer partially works
1555         https://bugs.webkit.org/show_bug.cgi?id=191773
1556         <rdar://problem/46139932>
1557
1558         Reviewed by Devin Rousso.
1559
1560         * UserInterface/Base/Main.js:
1561         * UserInterface/Debug/UncaughtExceptionReporter.js:
1562         (sheetElement.innerHTML):
1563         * UserInterface/Views/SettingsTabContentView.js:
1564
1565 2018-11-17  Devin Rousso  <drousso@apple.com>
1566
1567         Web Inspector: Network: add button to show system certificate dialog
1568         https://bugs.webkit.org/show_bug.cgi?id=191458
1569         <rdar://problem/45977019>
1570
1571         Reviewed by Joseph Pecoraro.
1572
1573         * UserInterface/Controllers/NetworkManager.js:
1574         (WI.NetworkManager.supportsShowCertificate): Added.
1575
1576         * UserInterface/Models/Resource.js:
1577         (WI.Resource.prototype.showCertificate): Added.
1578
1579         * UserInterface/Views/ResourceSecurityContentView.js:
1580         (WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
1581         * UserInterface/Views/ResourceSecurityContentView.css:
1582         (.resource-security .details > .show-certificate > .key): Added.
1583         (.resource-security .details > .show-certificate > .key > .error): Added.
1584
1585         * Localizations/en.lproj/localizedStrings.js:
1586
1587 2018-11-16  Devin Rousso  <drousso@apple.com>
1588
1589         Web Inspector: Audit: add default tests
1590         https://bugs.webkit.org/show_bug.cgi?id=191758
1591
1592         Reviewed by Matt Baker.
1593
1594         * UserInterface/Controllers/AuditManager.js:
1595         (WI.AuditManager.prototype.loadStoredTests):
1596         (WI.AuditManager.prototype.addDefaultTestsIfNeeded): Added.
1597         If there are no previously saved tests in the database, automatically add the default set.
1598
1599         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1600         (WI.AuditNavigationSidebarPanel.prototype._addTest):
1601         (WI.AuditNavigationSidebarPanel.prototype._addResult):
1602         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
1603         * UserInterface/Views/AuditNavigationSidebarPanel.css:
1604         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view): Added.
1605         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > .message): Added.
1606         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > button): Added.
1607         When the last test is removed, show a placeholder message that allows the user to re-add the
1608         default set of tests.
1609
1610         * UserInterface/Views/NavigationSidebarPanel.js:
1611         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
1612         (WI.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded):
1613
1614         * Localizations/en.lproj/localizedStrings.js:
1615
1616 2018-11-16  Devin Rousso  <drousso@apple.com>
1617
1618         Web Inspector: Audit: minor style improvements
1619         https://bugs.webkit.org/show_bug.cgi?id=191727
1620
1621         Reviewed by Joseph Pecoraro.
1622
1623         * UserInterface/Controllers/AuditManager.js:
1624         (WI.AuditManager):
1625         (WI.AuditManager.prototype._handleFrameMainResourceDidChange): Added.
1626         Clear test results when the main frame navigates, but don't clear the saved results.
1627
1628         * UserInterface/Models/AuditTestCase.js:
1629         (WI.AuditTestCase.prototype.async run):
1630         * UserInterface/Models/AuditTestCaseResult.js:
1631         (WI.AuditTestCaseResult):
1632         (WI.AuditTestCaseResult.async fromPayload):
1633         (WI.AuditTestCaseResult.prototype.get resolvedDOMNodes): Added.
1634         (WI.AuditTestCaseResult.prototype.toJSON):
1635         Capture the full CSS path for any returned DOM nodes when the test finishes running, so that
1636         if the node moves around the path isn't modified as well.
1637
1638         * UserInterface/Views/AuditTestCaseContentView.js:
1639         (WI.AuditTestCaseContentView.prototype.layout):
1640         Always show the URL for the test when viewing a saved result.
1641
1642         * UserInterface/Views/AuditTestContentView.css:
1643         (.content-view-container > .content-view.audit-test > header p):
1644         (.content-view.audit-test > header):
1645         * UserInterface/Views/AuditTestCaseContentView.css:
1646         (.content-view.audit-test-case > header): Added.
1647         (.content-view.audit-test-case > header h1 > img):
1648         (.content-view.audit-test-case > header > .metadata > .source): Added.
1649         (.content-view.audit-test-case > header > .metadata > .duration):
1650         (.content-view.audit-test-case > section table > tr > td:first-child):
1651         * UserInterface/Views/AuditTestGroupContentView.css:
1652         (.content-view.audit-test-group > header):
1653         Horizontally align items in the header for visual consistency.
1654
1655 2018-11-16  Joseph Pecoraro  <pecoraro@apple.com>
1656
1657         Web Inspector: Include default filtering of InspectorBackend.dumpInspectorProtocolMessages with multi target backend
1658         https://bugs.webkit.org/show_bug.cgi?id=191785
1659
1660         Reviewed by Matt Baker.
1661
1662         * UserInterface/Debug/Bootstrap.js:
1663         (dumpMessagesCurrentState):
1664         (applyDumpMessagesState):
1665         (WI.runBootstrapOperations):
1666         Include tri-state for the logs button.
1667
1668         * UserInterface/Protocol/InspectorBackend.js:
1669         (InspectorBackendClass.prototype.set filterMultiplexingBackendInspectorProtocolMessages):
1670         (InspectorBackendClass.prototype.get filterMultiplexingBackendInspectorProtocolMessages):
1671         (InspectorBackendClass.prototype._startOrStopAutomaticTracing):
1672         Add new filtering state (the Setting already got added in the past).
1673
1674         * UserInterface/Protocol/LoggingProtocolTracer.js:
1675         (WI.LoggingProtocolTracer):
1676         (WI.LoggingProtocolTracer.prototype.set filterMultiplexingBackend):
1677         (WI.LoggingProtocolTracer.prototype.get filterMultiplexingBackend):
1678         (WI.LoggingProtocolTracer.prototype._processEntry):
1679         Perform new filtering.
1680
1681 2018-11-16  Joseph Pecoraro  <pecoraro@apple.com>
1682
1683         Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Local Inspector)
1684         https://bugs.webkit.org/show_bug.cgi?id=191740
1685         <rdar://problem/45470897>
1686
1687         Reviewed by Timothy Hatcher.
1688
1689         * UserInterface/Protocol/Connection.js:
1690         (InspectorBackend.Connection.prototype._dispatchResponse):
1691         Hide the TargetAgent does not exist message. This is necessary so that WebKitLegacy
1692         tests don't include this line in output each test.
1693
1694         * UserInterface/Test.html:
1695         * UserInterface/Test/Test.js:
1696         (WI.loaded):
1697         (WI.resetMainExecutionContext):
1698         (WI.performOneTimeFrontendInitializationsUsingTarget):
1699         Behave more like Main.js and initialize a MultiplexingBackendTarget when the
1700         TargetAgent is available.
1701
1702         * UserInterface/Protocol/InspectorBackend.js:
1703         (InspectorBackendClass.prototype.runAfterPendingDispatches):
1704         Use the main target, a.k.a. the page connection. The backend target's
1705         messages don't have any responses, so this was effectively not waiting
1706         at all.
1707
1708 2018-11-16  Matt Baker  <mattbaker@apple.com>
1709
1710         Web Inspector: TreeOutline shouldn't select first child of an expanded element on right arrow key
1711         https://bugs.webkit.org/show_bug.cgi?id=191766
1712
1713         Reviewed by Devin Rousso.
1714
1715         * UserInterface/Views/TreeOutline.js:
1716         (WI.TreeOutline.prototype._treeKeyDown):
1717
1718 2018-11-14  Matt Baker  <mattbaker@apple.com>
1719
1720         Web Inspector: Table should recalculate scrollable height when resized
1721         https://bugs.webkit.org/show_bug.cgi?id=191328
1722         <rdar://problem/45854412>
1723
1724         Reviewed by Devin Rousso.
1725
1726         * UserInterface/Views/NetworkTableContentView.js:
1727         (WI.NetworkTableContentView.prototype._hideDetailView):
1728         Force table columns to layout after hiding the detail view.
1729
1730         * UserInterface/Views/Table.js:
1731         (WI.Table):
1732         (WI.Table.prototype.showColumn):
1733         Call `_resizeColumnsAndFiller` instead of `resize`. The latter also cleared
1734         `_cachedWidth`, which isn't unnecessary since the width hasn't changed.
1735
1736         (WI.Table.prototype.layout):
1737         previously `_resizeColumnsAndFiller` always occurred after `_updateVisibleRows`,
1738         it was just a matter of whether the cached width and height were cleared first.
1739         That now happens in `sizeDidChange`.
1740
1741         (WI.Table.prototype.sizeDidChange):
1742         (WI.Table.prototype._updateVisibleRows):
1743         (WI.Table.prototype.resize): Deleted.
1744         Internally this cleared the cached width and height, which moved to `sizeDidChange`.
1745         Externally this was used by NetworkTableContentView to force columns to
1746         layout after hiding the details view. Calling `updateLayout` on the table
1747         accomplishes the same thing using the standard View API.
1748
1749         (WI.Table.prototype._resizeColumnsAndFiller):
1750         Only update the cached width, since the height will already have been
1751         updated. The number of rows doesn't change during this method, so that
1752         check was removed.
1753
1754 2018-11-14  Devin Rousso  <drousso@apple.com>
1755
1756         Web Inspector: REGRESSION(r236540): Debugger: breakpoints are sorted alphabetically instead of numerically
1757         https://bugs.webkit.org/show_bug.cgi?id=191560
1758
1759         Reviewed by Joseph Pecoraro.
1760
1761         When sorting breakpoints, if the `WI.TreeElement`s being compared both contain instances of
1762         `WI.Breakpoint`, sort by `WI.SourceCodeLocation` instead of title.
1763
1764         We only do this for `WI.Breakpoint` because they are the only debuggable item that has a
1765         `WI.SourceCodeLocation` (e.g. `WI.EventBreakpoint` is just an event name string).
1766
1767         * UserInterface/Views/DebuggerSidebarPanel.js:
1768         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
1769         (WI.DebuggerSidebarPanel.prototype._compareBreakpointTreeElements): Added.
1770         (WI.DebuggerSidebarPanel.prototype._addIssue):
1771         (WI.DebuggerSidebarPanel.prototype._addTreeElement.comparator): Deleted.
1772         (WI.DebuggerSidebarPanel.prototype._compareTreeElements): Deleted.
1773
1774 2018-11-14  Nikita Vasilyev  <nvasilyev@apple.com>
1775
1776         Web Inspector: Styles: shift-clicking on a property should extend selection
1777         https://bugs.webkit.org/show_bug.cgi?id=191575
1778         <rdar://problem/46012855>
1779
1780         Reviewed by Devin Rousso.
1781
1782         When there's at least one property is selected, Shift-clicking another property should extend the selection.
1783         Pressing Up or Down keys while holding Shift also extends the selection.
1784
1785         Remove unnecessary `_startedSelection`. Use `hasSelectedProperties` and `_isMousePressed` instead.
1786
1787         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1788         `_isMousePressed` was set to `true` by mistake, causing numerous assertion fails.
1789
1790         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focusIndex):
1791         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hasSelectedProperties): Renamed from _hasSelectedProperties.
1792         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.extendSelectedProperties): Added.
1793         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseLeave): Removed.
1794         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy):
1795
1796         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
1797         Implement Shift-ArrowUp/ArrowDown keys.
1798
1799         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1800         (WI.SpreadsheetCSSStyleDeclarationSection):
1801         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorPropertyBlur):
1802         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorPropertyMouseLeave): Removed.
1803         This was only used to set _startedSelection.
1804
1805         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
1806         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick):
1807         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
1808         Remove _startedSelection and use hasSelectedProperties method instead.
1809
1810         * UserInterface/Views/SpreadsheetStyleProperty.js:
1811         (WI.SpreadsheetStyleProperty):
1812         Remove spreadsheetStylePropertyMouseLeave since it is no longer used.
1813
1814 2018-11-14  Devin Rousso  <drousso@apple.com>
1815
1816         Web Inspector: Canvas: send a call stack with each action instead of an array of call frames
1817         https://bugs.webkit.org/show_bug.cgi?id=191628
1818
1819         Reviewed by Dean Jackson.
1820
1821         * UserInterface/Models/Recording.js:
1822         (WI.Recording.prototype.async swizzle):
1823
1824         * UserInterface/Models/RecordingAction.js:
1825         (WI.RecordingAction.fromPayload):
1826         (WI.RecordingAction.prototype.async swizzle):
1827
1828 2018-11-14  Devin Rousso  <drousso@apple.com>
1829
1830         Web Inspector: add drag+drop for importing Audits and Recordings
1831         https://bugs.webkit.org/show_bug.cgi?id=191566
1832
1833         Reviewed by Joseph Pecoraro.
1834
1835         Reorganize the file loading logic for the Audit and Canvas tabs/managers. Add "drop" event
1836         handlers to the tabs that add and show the corresponding object for the imported data.
1837
1838         * UserInterface/Views/AuditTabContentView.js:
1839         (WI.AuditTabContentView):
1840         (WI.AuditTabContentView.prototype._handleDragOver): Added.
1841         (WI.AuditTabContentView.prototype._handleDrop): Added.
1842         * UserInterface/Views/CanvasTabContentView.js:
1843         (WI.CanvasTabContentView):
1844         (WI.CanvasTabContentView.prototype._addCanvas):
1845         (WI.CanvasTabContentView.prototype._recordingImportedOrStopped):
1846         (WI.CanvasTabContentView.prototype._handleDragOver): Added.
1847         (WI.CanvasTabContentView.prototype._handleDrop): Added.
1848
1849         * UserInterface/Controllers/AuditManager.js:
1850         (WI.AuditManager.prototype.async processJSON): Added.
1851         (WI.AuditManager.prototype.export):
1852         (WI.AuditManager.prototype.import): Deleted.
1853         * UserInterface/Controllers/CanvasManager.js:
1854         (WI.CanvasManager.prototype.processJSON): Added.
1855         (WI.CanvasManager.prototype.importRecording): Deleted.
1856
1857         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1858         (WI.AuditNavigationSidebarPanel):
1859         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
1860         (WI.AuditNavigationSidebarPanel.prototype._handleImportButtonNavigationItemClicked):
1861         * UserInterface/Views/CanvasSidebarPanel.js:
1862         (WI.CanvasSidebarPanel):
1863         (WI.CanvasSidebarPanel.prototype._handleImportButtonNavigationItemClicked): Added.
1864         (WI.CanvasSidebarPanel.prototype._recordingChanged):
1865         (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem):
1866
1867         * UserInterface/Views/CanvasOverviewContentView.js:
1868         (WI.CanvasOverviewContentView):
1869         (WI.CanvasOverviewContentView.prototype._handleImportButtonNavigationItemClicked): Added.
1870
1871         * UserInterface/Base/FileUtilities.js:
1872         (WI.FileUtilities.save): Added.
1873         (WI.FileUtilities.importText): Added.
1874         (WI.FileUtilities.importJSON): Added.
1875         (WI.FileUtilities.async readText): Added.
1876         (WI.FileUtilities.async readJSON): Added.
1877         (WI.saveDataToFile): Deleted.
1878         (WI.loadDataFromFile): Deleted.
1879         * UserInterface/Base/Main.js:
1880         (WI._contextMenuRequested):
1881         (WI._save):
1882         (WI._saveAs):
1883         * UserInterface/Views/ContextMenuUtilities.js:
1884         (WI.appendContextMenuItemsForSourceCode):
1885         * UserInterface/Views/LogContentView.js:
1886         (WI.LogContentView.prototype._handleContextMenuEvent):
1887         * UserInterface/Views/NetworkTableContentView.js:
1888         (WI.NetworkTableContentView.prototype._exportHAR):
1889         * UserInterface/Views/RecordingContentView.js:
1890         (WI.RecordingContentView.prototype._exportRecording):
1891         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1892         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._save):
1893         Move file related functions into a static class container.
1894
1895         * Localizations/en.lproj/localizedStrings.js:
1896
1897 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
1898
1899         Web Inspector: Include target identifier in protocol logging
1900         https://bugs.webkit.org/show_bug.cgi?id=191478
1901
1902         Reviewed by Devin Rousso.
1903
1904         * UserInterface/Protocol/Connection.js:
1905         (InspectorBackend.Connection.prototype._dispatchResponse):
1906         (InspectorBackend.Connection.prototype._dispatchEvent):
1907         (InspectorBackend.Connection.prototype._sendMessageToBackend):
1908         Call tracer log methods with the connection.
1909
1910         * UserInterface/Debug/CapturingProtocolTracer.js:
1911         * UserInterface/Protocol/ProtocolTracer.js:
1912         * UserInterface/Protocol/LoggingProtocolTracer.js:
1913         (WI.LoggingProtocolTracer):
1914         (WI.LoggingProtocolTracer.prototype.logFrontendException):
1915         (WI.LoggingProtocolTracer.prototype.logFrontendRequest):
1916         (WI.LoggingProtocolTracer.prototype.logWillHandleResponse):
1917         (WI.LoggingProtocolTracer.prototype.logDidHandleResponse):
1918         (WI.LoggingProtocolTracer.prototype.logDidHandleEvent):
1919         Include the connection in log methods.
1920
1921         (WI.LoggingProtocolTracer.prototype.logProtocolError):
1922         Removed, this is never called.
1923                 
1924         (WI.LoggingProtocolTracer.prototype._processEntry):
1925         Include the target identifier in entry messages.
1926
1927 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
1928
1929         Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Remote Inspector)
1930         https://bugs.webkit.org/show_bug.cgi?id=191494
1931         <rdar://problem/45469854>
1932
1933         Reviewed by Devin Rousso.
1934
1935         This starts introducing multi-target support into the Web Inspector frontend.
1936         Specifically a backend connection that is persistent, but has the ability to
1937         connect to and transition between Page targets received through that backend
1938         connection.
1939
1940         This patch introduces the concept of a "Backend Target" which is the single
1941         connection that the frontend contains to a backend. The old way of connecting
1942         directly to a target is still supported. In that case the frontend constructs
1943         a DirectBackendTarget for the debuggable type the frontend was spawns for.
1944         However, if the frontend opens and has a TargetAgent, then it is likely
1945         connected to a multi-target supporting backend and instead constructs a
1946         MultiplexingBackendTarget, and will receive further information about
1947         sub-targets to connect to. The only sub-target at the moment is a Page
1948         sub-target.
1949
1950         As part of bringing up multi-target support this adds a few measures to
1951         handle situations where the frontend is playing fast and loose with agents.
1952         When the frontend does `FooAgent.method` it intends that to be performed
1953         on the "main" target being debugged. Likewise when the frontend loops
1954         over targets it expects them to be the debuggable targets. This patch
1955         profiles a new implementation of `WI.mainTarget` and `WI.targets` to
1956         match the assumptions being made by the frontend.
1957
1958           - In a direct-target world, there is a single target which
1959             should be used for global agents and in WI.targets.
1960
1961           - In a multi-target world, the page target is the one that
1962             should be used for global agents and WI.targets is the list
1963             of sub-targets (excluding the MultiplexingBackendTarget).
1964
1965         In a multi-target world, there are now commonly two Targets. The
1966         MultiplexingBackendTarget and a PageTarget sub-target. In the future
1967         this may include more targets, such as ServiceWorkers, DedicatedWorkers,
1968         and perhaps even frames.
1969
1970         In a multi-target world, the frontend is immediately told about targets
1971         as soon as it opens (via Target.targetCreated). In order to support
1972         this, frontend initialization happens without a main target being available.
1973         So this makes a few small changes to frontend initialization to perform
1974         a bit of work once we know what the main target is.
1975
1976         During a page transition the frontend is told to destroy existing targets
1977         and is soon after told about any new page targets (via Target.targetDestroyed
1978         and Target.targetCreated). The frontend special cases this page transition.
1979         It expects only one Page target to be alive at any time, accessible through
1980         WI.pageTarget. When a page transition happens the WI.pageTarget changes, and
1981         the frontend performs a bit of work to prepare the UI to handle the transition:
1982         `<Manager>.transitionPageTarget` / WI.Notification.TransitionPageTarget.
1983         For the most part the UI behaves fine as long once there are main frame
1984         change and main resource change events, but those other events allow
1985         the frontend to respond to the specific page transition cases.
1986
1987         * UserInterface/Base/Main.js:
1988         (WI.loaded):
1989         (WI.initializeBackendTarget):
1990         (WI.initializePageTarget):
1991         (WI.transitionPageTarget):
1992         (WI.terminatePageTarget):
1993         (WI.resetMainExecutionContext):
1994         (WI.redirectGlobalAgentsToConnection):
1995         (WI.contentLoaded):
1996         New global functions for target initialization
1997         and page transitioning.
1998
1999         * UserInterface/Test/Test.js:
2000         (WI.loaded):
2001         (WI.initializeBackendTarget):
2002         (WI.initializePageTarget):
2003         (WI.transitionPageTarget):
2004         (WI.terminatePageTarget):
2005         (WI.resetMainExecutionContext):
2006         (WI.redirectGlobalAgentsToConnection):
2007         New global functions for target initialization.
2008         Tests continue to be a direct connection to the Page.
2009
2010         * UserInterface/Protocol/TargetObserver.js:
2011         (WI.TargetObserver.prototype.targetCreated):
2012         (WI.TargetObserver.prototype.targetDestroyed):
2013         (WI.TargetObserver.prototype.dispatchMessageFromTarget):
2014         New observer goes to the manager.
2015
2016         * UserInterface/Controllers/TargetManager.js:
2017         (WI.TargetManager):
2018         (WI.TargetManager.prototype.get targets):
2019         (WI.TargetManager.prototype.get allTargets):
2020         (WI.TargetManager.prototype.targetForIdentifier):
2021         (WI.TargetManager.prototype.targetCreated):
2022         (WI.TargetManager.prototype.targetDestroyed):
2023         (WI.TargetManager.prototype.dispatchMessageFromTarget):
2024         (WI.TargetManager.prototype.createMultiplexingBackendTarget):
2025         (WI.TargetManager.prototype.createDirectBackendTarget):
2026         (WI.TargetManager.prototype._addTarget):
2027         (WI.TargetManager.prototype._removeTarget):
2028         (WI.TargetManager.prototype._createTarget):
2029         (WI.TargetManager.prototype._checkAndHandlePageTargetTransition):
2030         (WI.TargetManager.prototype._checkAndHandlePageTargetTermination):
2031         (WI.TargetManager.prototype.addTarget): Deleted.
2032         (WI.TargetManager.prototype.removeTarget): Deleted.
2033         (WI.TargetManager.prototype.initializeMainTarget): Deleted.
2034         TargetManager is where we handle creating and destroying targets
2035         and their connections. In order to simplify things a bit we make
2036         `WI.targets`, which goes through `get targets()` an array instead
2037         of a Set. And this includes only the sub-targets.
2038
2039         * UserInterface/Controllers/WorkerManager.js:
2040         (WI.WorkerManager.prototype.workerCreated):
2041         (WI.WorkerManager.prototype.workerTerminated):
2042         Workers are still special-target-like things that multiplex through
2043         WorkerAgent instead of TargetAgent. We'd like to promote these to
2044         be full targets in the future.
2045
2046         * UserInterface/Protocol/DirectBackendTarget.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/MainTarget.js.
2047         (WI.DirectBackendTarget):
2048         (WI.DirectBackendTarget.connectionInfoForDebuggable):
2049         (WI.DirectBackendTarget.prototype.get mainResource):
2050         (WI.DirectBackendTarget.prototype.set mainResource):
2051         This is the only "MainTarget" class. It is the backend target for a direct connection.
2052
2053         * UserInterface/Protocol/MultiplexingBackendTarget.js:
2054         (WI.MultiplexingBackendTarget):
2055         (WI.MultiplexingBackendTarget.prototype.initialize):
2056         (WI.MultiplexingBackendTarget.prototype.get name):
2057         (WI.MultiplexingBackendTarget.prototype.get executionContext):
2058         (WI.MultiplexingBackendTarget.prototype.get mainResource):
2059         This is the new backend target for a multi-target connection.
2060         We don't expect it to be treated like other targets, so we don't
2061         expect anyone to ask it for resources/executionContext/name info.
2062
2063         * UserInterface/Controllers/RuntimeManager.js:
2064         (WI.TargetManager.prototype.evaluateInInspectedWindow):
2065         This can be triggered by watch expressions before any target, and
2066         therefore execution context, is available. Just return null, when
2067         an execution context is available those clients will try again.
2068
2069         * UserInterface/Debug/Bootstrap.js:
2070         Provide an WI.isEngineeringBuild boolean that can be used for various
2071         debugging features.
2072
2073         * UserInterface/Main.html:
2074         * UserInterface/Test.html:
2075         New resources.
2076
2077         * UserInterface/Protocol/InspectorBackend.js:
2078         (InspectorBackendClass.prototype.dispatch):
2079         (InspectorBackendClass.prototype.runAfterPendingDispatches):
2080         (InspectorBackend.Agent):
2081         `InspectorBackend.mainConnection` was renamed `InspectorBackend.backendConnection`.
2082
2083         * UserInterface/Protocol/Connection.js:
2084         (InspectorBackend.Connection):
2085         (InspectorBackend.Connection.prototype._dispatchResponse):
2086         (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback):
2087         (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise):
2088         (InspectorBackend.BackendConnection):
2089         (InspectorBackend.BackendConnection.prototype.sendMessageToBackend):
2090         (InspectorBackend.WorkerConnection):
2091         (InspectorBackend.TargetConnection):
2092         (InspectorBackend.TargetConnection.sendMessageToBackend):
2093         Use a global sequence id to make filtering a bit easier in protocol tracing.
2094         TargetConnection is identical to WorkerConnection except it uses TargetAgent
2095         instead of WorkerAgent to perform multiplexing.
2096
2097         * UserInterface/Protocol/JavaScriptContextTarget.js:
2098         (WI.JavaScriptContextTarget):
2099         * UserInterface/Protocol/PageTarget.js:
2100         (WI.PageTarget):
2101         (WI.PageTarget.prototype.get displayName):
2102         Specialized target types.
2103
2104         * UserInterface/Views/DebuggerSidebarPanel.js:
2105         (WI.DebuggerSidebarPanel):
2106         (WI.DebuggerSidebarPanel.prototype._targetAdded):
2107         (WI.DebuggerSidebarPanel.prototype._targetRemoved):
2108         (WI.DebuggerSidebarPanel.prototype._updateCallStackTreeOutline):
2109         * UserInterface/Views/SourceCodeTextEditor.js:
2110         (WI.SourceCodeTextEditor.prototype._targetAdded):
2111         (WI.SourceCodeTextEditor.prototype._targetRemoved):
2112         (WI.SourceCodeTextEditor.prototype._callFramesDidChange):
2113         (WI.SourceCodeTextEditor.prototype._updateThreadIndicatorWidget):
2114         (WI.SourceCodeTextEditor.prototype._reinsertAllThreadIndicators):
2115         * UserInterface/Views/QuickConsole.js:
2116         (WI.QuickConsole.prototype.initializeMainExecutionContextPathComponent):
2117         (WI.QuickConsole.prototype._targetAdded):
2118         (WI.QuickConsole.prototype._targetRemoved):
2119         We make target added get called with all targets, including the
2120         MultiplexingBackendTarget and PageTargets, both of which would
2121         not have happened before. Before it was only WorkerTargets. Make
2122         these sites a little more robust for the type of target they expect
2123         to be able to handle.
2124
2125         * UserInterface/Base/Object.js:
2126         * UserInterface/Controllers/DOMManager.js:
2127         (WI.DOMManager):
2128         (WI.DOMManager.prototype.transitionPageTarget):
2129         (WI.DOMManager.prototype.requestDocument):
2130         (WI.DOMManager.prototype._setDocument):
2131         * UserInterface/Controllers/NetworkManager.js:
2132         (WI.NetworkManager):
2133         (WI.NetworkManager.prototype.transitionPageTarget):
2134         (WI.NetworkManager.prototype.executionContextCreated):
2135         (WI.NetworkManager.prototype._processMainFrameResourceTreePayload):
2136         * UserInterface/Models/DefaultDashboard.js:
2137         (WI.DefaultDashboard):
2138         (WI.DefaultDashboard.prototype._mainResourceDidChange):
2139         (WI.DefaultDashboard.prototype._transitionPageTarget):
2140         * UserInterface/Views/NetworkTableContentView.js:
2141         (WI.NetworkTableContentView):
2142         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
2143         (WI.NetworkTableContentView.prototype._transitionPageTarget):
2144         Special case handling when performing a page transition.
2145
2146         * UserInterface/Views/SettingsTabContentView.js:
2147         * UserInterface/Debug/UncaughtExceptionReporter.js:
2148         Document reloads are not supported right now.
2149
2150 2018-11-14  Devin Rousso  <drousso@apple.com>
2151
2152         Web Inspector: Canvas: don't start with auto-capture enabled
2153         https://bugs.webkit.org/show_bug.cgi?id=191553
2154
2155         Reviewed by Matt Baker.
2156
2157         * UserInterface/Views/CanvasOverviewContentView.js:
2158         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
2159         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
2160         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureInput):
2161         * UserInterface/Views/CanvasOverviewContentView.css:
2162         (.navigation-bar > .item.canvas-recording-auto-capture > label > input):
2163
2164 2018-11-14  Devin Rousso  <drousso@apple.com>
2165
2166         Web Inspector: Network Graphs are missing minimum sizes, might have no graph at all
2167         https://bugs.webkit.org/show_bug.cgi?id=191208
2168
2169         Reviewed by Joseph Pecoraro.
2170
2171         `WI.NetworkTableContentView` used to rely on the `WI.timelineManager.persistentNetworkTimeline`
2172         for events when a new resource is added. It also listened for `WI.Frame.Event.MainResourceDidChange`
2173         on it's own, which was also listened to by `WI.timelineManager.persistentNetworkTimeline`.
2174         Due to the order in which these listeners are added, the new main resource would get added
2175         to the `WI.timelineManager.persistentNetworkTimeline` (and the `WI.NetworkTableContentView`
2176         shortly after), and right after that the `WI.NetworkTableContentView` would reset the graph
2177         in it's own listener for `WI.Frame.Event.MainResourceDidChange`.
2178
2179         This patch removes `WI.timelineManager.persistentNetworkTimeline` and instead makes it so
2180         that `WI.NetworkTableContentView` listens for resource added and main frame changed events
2181         on its own (similar to other views that follow this pattern), ensuring that there are no
2182         event races.
2183
2184         Also relaxes the "requirement" that prevented 0 width blocks from being drawn, allowing
2185         requests served from memory/disk to appear in the graph (their time is effectively 0).
2186
2187         * UserInterface/Views/NetworkTableContentView.js:
2188         (WI.NetworkTableContentView):
2189         (WI.NetworkTableContentView.prototype.closed):
2190         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
2191         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
2192         (WI.NetworkTableContentView.prototype._updateWaterfallTimeRange): Added.
2193         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
2194         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
2195         (WI.NetworkTableContentView.prototype._handleResourceAdded): Added.
2196         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
2197         (WI.NetworkTableContentView.prototype._handleNodeDidFireEvent):
2198         (WI.NetworkTableContentView.prototype._handleNodeLowPowerChanged):
2199         * UserInterface/Views/NetworkTableContentView.css:
2200         (.network-table .waterfall .block:matches(.mouse-tracking, .filler) + .block:not(.mouse-tracking, .filler)): Added.
2201         (.network-table .waterfall .block.filler + .block): Deleted.
2202
2203         * UserInterface/Controllers/TimelineManager.js:
2204         (WI.TimelineManager):
2205         (WI.TimelineManager.prototype._mainResourceDidChange):
2206         (WI.TimelineManager.prototype._resourceWasAdded):
2207         (WI.TimelineManager.prototype.get persistentNetworkTimeline): Deleted.
2208
2209 2018-11-13  Matt Baker  <mattbaker@apple.com>
2210
2211         Web Inspector: Table should support select all (Cmd-A)
2212         https://bugs.webkit.org/show_bug.cgi?id=190299
2213         <rdar://problem/45029170>
2214
2215         Reviewed by Devin Rousso.
2216
2217         * UserInterface/Views/Table.js:
2218         (WI.Table.prototype.selectAll):
2219         (WI.Table.prototype._handleKeyDown):
2220
2221 2018-11-13  Matt Baker  <mattbaker@apple.com>
2222
2223         Web Inspector: Table with no selection should select the first/last row on down/up arrow key
2224         https://bugs.webkit.org/show_bug.cgi?id=190100
2225         <rdar://problem/44879243>
2226
2227         Reviewed by Devin Rousso.
2228
2229         Pressing the up or down arrow key when nothing is selected should select
2230         the last or first row, respectively. After selecting the row make sure
2231         it is visible by calling the new Table method `revealRow`.
2232
2233         * UserInterface/Views/Table.js:
2234         (WI.Table.prototype.revealRow):
2235         (WI.Table.prototype._handleKeyDown):
2236         (WI.Table.prototype._selectRowsFromArrowKey):
2237
2238 2018-11-13  Nikita Vasilyev  <nvasilyev@apple.com>
2239
2240         Web Inspector: Styles: Command-A should select all properties
2241         https://bugs.webkit.org/show_bug.cgi?id=191435
2242         <rdar://problem/45921373>
2243
2244         Reviewed by Devin Rousso.
2245
2246         When focused on a style property, Command-A on Mac (Control-A on other platforms)
2247         should select all properties of the style rule.
2248
2249         * UserInterface/Base/Utilities.js:
2250         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2251         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.selectProperties):
2252         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
2253
2254 2018-11-12  Devin Rousso  <drousso@apple.com>
2255
2256         Web Inspector: Network: show secure certificate details per-request
2257         https://bugs.webkit.org/show_bug.cgi?id=191447
2258         <rdar://problem/30019476>
2259
2260         Reviewed by Joseph Pecoraro.
2261
2262         * UserInterface/Controllers/NetworkManager.js:
2263         (WI.NetworkManager.prototype.resourceRequestWasServedFromMemoryCache):
2264         (WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
2265
2266         * UserInterface/Models/Resource.js:
2267         (WI.Resource.prototype.get responseSecurity): Added.
2268         (WI.Resource.prototype.get loadedSecurely): Added.
2269         (WI.Resource.prototype.updateForResponse):
2270
2271         * UserInterface/Views/NetworkResourceDetailView.js:
2272         (WI.NetworkResourceDetailView):
2273         (WI.NetworkResourceDetailView.prototype.initialLayout):
2274         (WI.NetworkResourceDetailView.prototype.showContentViewForIdentifier):
2275         * UserInterface/Views/NetworkResourceDetailView.css:
2276         (.content-view.resource-details .go-to-arrow): Added.
2277         (.content-view.resource-details.showing-find-banner .search-highlight): Added.
2278
2279         * UserInterface/Views/ResourceSecurityContentView.js: Added.
2280         (WI.ResourceSecurityContentView):
2281         (WI.ResourceSecurityContentView.prototype.initialLayout):
2282         (WI.ResourceSecurityContentView.prototype.layout):
2283         (WI.ResourceSecurityContentView.prototype.closed):
2284         (WI.ResourceSecurityContentView.prototype.get supportsSearch):
2285         (WI.ResourceSecurityContentView.prototype.get numberOfSearchResults):
2286         (WI.ResourceSecurityContentView.prototype.get hasPerformedSearch):
2287         (WI.ResourceSecurityContentView.prototype.set automaticallyRevealFirstSearchResult):
2288         (WI.ResourceSecurityContentView.prototype.performSearch):
2289         (WI.ResourceSecurityContentView.prototype.searchCleared):
2290         (WI.ResourceSecurityContentView.prototype.revealPreviousSearchResult):
2291         (WI.ResourceSecurityContentView.prototype.revealNextSearchResult):
2292         (WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
2293         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
2294         (WI.ResourceSecurityContentView.prototype._revealSearchResult):
2295         (WI.ResourceSecurityContentView.prototype._handleResourceResponseReceived):
2296         * UserInterface/Views/ResourceSecurityContentView.css: Added.
2297         (body[dir] .resource-security > section.certificate > .details):
2298         (.resource-security .details .key):
2299         (.resource-security .dns-name + .dns-name > .key,):
2300         (.resource-security .show-more):
2301         (@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details):
2302         (@media (prefers-dark-interface) .resource-security .details .key):
2303
2304         * UserInterface/Views/ResourceCookiesContentView.js:
2305         (WI.ResourceCookiesContentView.prototype._refreshRequestCookiesSection):
2306         (WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection):
2307         (WI.ResourceCookiesContentView.prototype._markIncompleteSectionWithMessage): Deleted.
2308         (WI.ResourceCookiesContentView.prototype._markIncompleteSectionWithLoadingIndicator): Deleted.
2309         * UserInterface/Views/ResourceHeadersContentView.js:
2310         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
2311         (WI.ResourceHeadersContentView.prototype._refreshRedirectHeadersSections):
2312         (WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
2313         (WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
2314         (WI.ResourceHeadersContentView.prototype._refreshQueryStringSection):
2315         (WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
2316         (WI.ResourceHeadersContentView.prototype._markIncompleteSectionWithMessage): Deleted.
2317         (WI.ResourceHeadersContentView.prototype._markIncompleteSectionWithLoadingIndicator): Deleted.
2318         (WI.ResourceHeadersContentView.prototype._appendKeyValuePair): Deleted.
2319         * UserInterface/Views/ResourceHeadersContentView.css:
2320         (.resource-headers .h1-status > .key,):
2321         (body[dir] .resource-headers > section.error > .details): Deleted.
2322         (.resource-headers > section.error .key): Deleted.
2323         (.resource-headers .details): Deleted.
2324         (.resource-headers .details .pair): Deleted.
2325         (body[dir=rtl] .resource-headers .details .pair): Deleted.
2326         (.resource-headers .details .key): Deleted.
2327         (.resource-headers .value): Deleted.
2328         (.resource-headers .go-to-arrow): Deleted.
2329         (.resource-headers.showing-find-banner .search-highlight): Deleted.
2330         * UserInterface/Views/ResourceDetailsSection.js:
2331         (WI.ResourceDetailsSection.prototype.markIncompleteSectionWithMessage): Added.
2332         (WI.ResourceDetailsSection.prototype.markIncompleteSectionWithLoadingIndicator): Added.
2333         (WI.ResourceDetailsSection.prototype.appendKeyValuePair): Added.
2334         * UserInterface/Views/ResourceDetailsSection.css:
2335         (.resource-details > section > .details): Added.
2336         (.resource-details > section > .details > .pair): Added.
2337         (body[dir=rtl] .resource-details > section > .details > .pair): Added.
2338         (.resource-details > section > .details > .pair > .key): Added.
2339         (.resource-details > section > .details > .pair > .value): Added.
2340         (body[dir] .resource-details > section.error > .details): Added.
2341         (.resource-details > section.error > .details > .pair > .key): Added.
2342         Move commonly used functions/styles from container classes onto this object.
2343
2344         * UserInterface/Main.html:
2345         * Localizations/en.lproj/localizedStrings.js:
2346
2347 2018-11-12  Matt Baker  <mattbaker@apple.com>
2348
2349         Web Inspector: Table should support shift-extending the row selection
2350         https://bugs.webkit.org/show_bug.cgi?id=189718
2351         <rdar://problem/44577942>
2352
2353         Reviewed by Devin Rousso.
2354
2355         Allow the table selection to be extended by shift-clicking a row, or by
2356         holding shift and pressing either the up or down arrow key. If both command
2357         and shift are pressed, shift is ignored. The selection behavior is modeled
2358         after AppKit's NSTableView.
2359
2360         * UserInterface/Base/IndexSet.js:
2361         (WI.IndexSet.prototype.addRange):
2362         (WI.IndexSet.prototype.deleteRange):
2363         (WI.IndexSet.prototype.equals):
2364         (WI.IndexSet.prototype.difference):
2365
2366         * UserInterface/Views/Table.js:
2367         (WI.Table):
2368         (WI.Table.prototype.set allowsMultipleSelection):
2369         (WI.Table.prototype.reloadData):
2370         (WI.Table.prototype.selectRow):
2371         (WI.Table.prototype.deselectRow):
2372         (WI.Table.prototype._handleKeyDown):
2373         Holding shift and pressing either the up or down arrow key extends the
2374         selection to the next unselected row adjacent to the anchor row, or causes
2375         the anchor row to be deselected, decreasing the selection. The table chooses
2376         the action to take based on the direction of movement (up or down), and
2377         the currently selected rows.
2378
2379         (WI.Table.prototype._selectRowsFromArrowKey):
2380         (WI.Table.prototype._handleMouseDown.normalizeRange):
2381         (WI.Table.prototype._handleMouseDown):
2382         Clicking a row while holding down shift extends the selection to include
2383         the rows between the anchor row (exclusive) and clicked row (inclusive).
2384         The anchor row is equal to the value of `_selectedRowIndex` prior to
2385         clicking a new row.
2386
2387         (WI.Table.prototype._deselectAllAndSelect):
2388         (WI.Table.prototype._removeRows):
2389         (WI.Table.prototype._toggleSelectedRowStyle):
2390         (WI.Table.prototype._updateSelectedRows):
2391         Helper method for updating the selection to the specified rows, and updating
2392         DOM styles for rows that are added to or removed from the selection.
2393
2394 2018-11-12  Nikita Vasilyev  <nvasilyev@apple.com>
2395
2396         Web Inspector: Styles: inline swatches don't work when Multiple Properties Selection is enabled
2397         https://bugs.webkit.org/show_bug.cgi?id=191165
2398         <rdar://problem/45737972>
2399
2400         Reviewed by Devin Rousso.
2401
2402         * UserInterface/Views/SpreadsheetStyleProperty.js:
2403         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
2404         * UserInterface/Views/SpreadsheetTextField.js:
2405         (WI.SpreadsheetTextField):
2406         `click` is fired after `mouseup` and inline swatches are activated by `click` event.
2407         Changing this to `click` allows swatches to activate before editing starts.
2408
2409         (WI.SpreadsheetTextField.prototype._handleMouseDown):
2410         Clicking on the field that is being edited should't restart editing. It should move the text caret.
2411
2412 2018-11-12  Don Olmstead  <don.olmstead@sony.com>
2413
2414         Shipped PNGs include bad profiles: iCCP: known incorrect sRGB profile
2415         https://bugs.webkit.org/show_bug.cgi?id=189230
2416         <rdar://problem/44050379>
2417
2418         Reviewed by Joseph Pecoraro.
2419
2420         Runs all png images through zopflipng. This results in a smaller file
2421         size and takes care of this issue as a byproduct.
2422
2423         * UserInterface/Images/ApplicationCache.png:
2424         * UserInterface/Images/ApplicationCache@2x.png:
2425         * UserInterface/Images/ApplicationCacheManifest.png:
2426         * UserInterface/Images/ApplicationCacheManifest@2x.png:
2427         * UserInterface/Images/Breakpoint.png:
2428         * UserInterface/Images/Breakpoint@2x.png:
2429         * UserInterface/Images/BreakpointInactive.png:
2430         * UserInterface/Images/BreakpointInactive@2x.png:
2431         * UserInterface/Images/ClippingCSS.png:
2432         * UserInterface/Images/ClippingCSS@2x.png:
2433         * UserInterface/Images/ClippingCSSLarge.png:
2434         * UserInterface/Images/ClippingCSSLarge@2x.png:
2435         * UserInterface/Images/ClippingGeneric.png:
2436         * UserInterface/Images/ClippingGeneric@2x.png:
2437         * UserInterface/Images/ClippingGenericLarge.png:
2438         * UserInterface/Images/ClippingGenericLarge@2x.png:
2439         * UserInterface/Images/ClippingJS.png:
2440         * UserInterface/Images/ClippingJS@2x.png:
2441         * UserInterface/Images/ClippingJSLarge.png:
2442         * UserInterface/Images/ClippingJSLarge@2x.png:
2443         * UserInterface/Images/ColorIcon.png:
2444         * UserInterface/Images/ColorIcon@2x.png:
2445         * UserInterface/Images/Cookie.png:
2446         * UserInterface/Images/Cookie@2x.png:
2447         * UserInterface/Images/Database.png:
2448         * UserInterface/Images/Database@2x.png:
2449         * UserInterface/Images/DatabaseTable.png:
2450         * UserInterface/Images/DatabaseTable@2x.png:
2451         * UserInterface/Images/DocumentCSS.png:
2452         * UserInterface/Images/DocumentCSS@2x.png:
2453         * UserInterface/Images/DocumentCSSLarge.png:
2454         * UserInterface/Images/DocumentCSSLarge@2x.png:
2455         * UserInterface/Images/DocumentFont.png:
2456         * UserInterface/Images/DocumentFont@2x.png:
2457         * UserInterface/Images/DocumentFontLarge.png:
2458         * UserInterface/Images/DocumentFontLarge@2x.png:
2459         * UserInterface/Images/DocumentGL.png:
2460         * UserInterface/Images/DocumentGL@2x.png:
2461         * UserInterface/Images/DocumentGeneric.png:
2462         * UserInterface/Images/DocumentGeneric@2x.png:
2463         * UserInterface/Images/DocumentGenericLarge.png:
2464         * UserInterface/Images/DocumentGenericLarge@2x.png:
2465         * UserInterface/Images/DocumentImage.png:
2466         * UserInterface/Images/DocumentImage@2x.png:
2467         * UserInterface/Images/DocumentImageLarge.png:
2468         * UserInterface/Images/DocumentImageLarge@2x.png:
2469         * UserInterface/Images/DocumentJS.png:
2470         * UserInterface/Images/DocumentJS@2x.png:
2471         * UserInterface/Images/DocumentJSLarge.png:
2472         * UserInterface/Images/DocumentJSLarge@2x.png:
2473         * UserInterface/Images/DocumentMarkup.png:
2474         * UserInterface/Images/DocumentMarkup@2x.png:
2475         * UserInterface/Images/DocumentMarkupLarge.png:
2476         * UserInterface/Images/DocumentMarkupLarge@2x.png:
2477         * UserInterface/Images/FolderGeneric.png:
2478         * UserInterface/Images/FolderGeneric@2x.png:
2479         * UserInterface/Images/GradientStop.png:
2480         * UserInterface/Images/GradientStop@2x.png:
2481         * UserInterface/Images/GradientStopSelected.png:
2482         * UserInterface/Images/GradientStopSelected@2x.png:
2483         * UserInterface/Images/HoverMenuButton.png:
2484         * UserInterface/Images/HoverMenuButton@2x.png:
2485         * UserInterface/Images/InstructionPointer.png:
2486         * UserInterface/Images/InstructionPointer@2x.png:
2487         * UserInterface/Images/LocalStorage.png:
2488         * UserInterface/Images/LocalStorage@2x.png:
2489         * UserInterface/Images/SessionStorage.png:
2490         * UserInterface/Images/SessionStorage@2x.png:
2491         * UserInterface/Images/SliderThumb.png:
2492         * UserInterface/Images/SliderThumb@2x.png:
2493         * UserInterface/Images/SliderThumbPressed.png:
2494         * UserInterface/Images/SliderThumbPressed@2x.png:
2495         * UserInterface/Images/WebSocket.png:
2496         * UserInterface/Images/WebSocket@2x.png:
2497         * UserInterface/Images/WebSocketLarge.png:
2498         * UserInterface/Images/WebSocketLarge@2x.png:
2499         * UserInterface/Images/WorkerScript.png:
2500         * UserInterface/Images/WorkerScript@2x.png:
2501         * UserInterface/Images/WorkerScriptLarge.png:
2502         * UserInterface/Images/WorkerScriptLarge@2x.png:
2503
2504 2018-11-12  Nikita Vasilyev  <nvasilyev@apple.com>
2505
2506         Web Inspector: Styles: Pressing Tab or Enter should start editing focused property
2507         https://bugs.webkit.org/show_bug.cgi?id=191510
2508         <rdar://problem/45970897>
2509
2510         Reviewed by Dean Jackson.
2511
2512         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2513         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
2514
2515 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
2516
2517         Web Inspector: Start moving toward better multi-target support
2518         https://bugs.webkit.org/show_bug.cgi?id=191345
2519
2520         Reviewed by Devin Rousso.
2521
2522         This change continues the move toward better multi-target support
2523         by explicitly using explicit target agents in more places, and
2524         converting generalized feature checks into target agnostic versions
2525         that use the new InspectorBackend.domains, which does not vary based
2526         on the connected targets / debuggable type.
2527
2528         I also audited uses of RuntimeAgent, ConsoleAgent, and DebuggerAgent
2529         for better multi-target support since these agents should already
2530         have complete multi-target support.
2531
2532         * UserInterface/Protocol/Target.js:
2533         (WI.Target.prototype.initialize):
2534         Move explicitly to target.Agent feature checks with a known target.
2535
2536         * UserInterface/Controllers/DebuggerManager.js:
2537         (WI.DebuggerManager.prototype.initializeTarget):
2538         (WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange):
2539         Move explicitly to target.DebuggerAgent for feature checks with a known target.
2540
2541         * UserInterface/Controllers/NetworkManager.js:
2542         (WI.NetworkManager.prototype.initializeTarget):
2543         Move explicitly to target.NetworkAgent for feature checks with a known target.
2544
2545         * UserInterface/Controllers/RuntimeManager.js:
2546         (WI.RuntimeManager.prototype.initializeTarget):
2547         (WI.RuntimeManager.prototype.saveResult):
2548         * UserInterface/Protocol/RemoteObject.js:
2549         (WI.RemoteObject.prototype.updatePreview):
2550         (WI.RemoteObject.prototype.getDisplayablePropertyDescriptors):
2551         (WI.RemoteObject.prototype.deprecatedGetDisplayableProperties):
2552         * UserInterface/Views/SourceCodeTextEditor.js:
2553         (WI.SourceCodeTextEditor.prototype._createTypeTokenAnnotator):
2554         (WI.SourceCodeTextEditor.prototype._createBasicBlockAnnotator):
2555         Move explicitly to target.RuntimeAgent for feature checks with a known target.
2556
2557         * UserInterface/Models/CSSCompletions.js:
2558         (WI.CSSCompletions.initializeCSSCompletions):
2559         Move explicitly to target.CSSAgent for feature checks with a known target.
2560
2561         * UserInterface/Views/ContextMenuUtilities.js:
2562         Use the DebuggerAgent from the target associated with the DOMNode's
2563         remote object instead of assuming the main target.
2564
2565         * UserInterface/Views/SettingsTabContentView.js:
2566         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2567         Update the ConsoleAgent setting on all targets that support it.
2568
2569         * UserInterface/Views/BreakpointActionView.js:
2570         (WI.BreakpointActionView):
2571         All backends support BreakpointActionType, the assertion can go away.
2572
2573         * UserInterface/Views/LogContentView.js:
2574         (WI.LogContentView.prototype.get navigationItems):
2575         * UserInterface/Views/DOMTreeContentView.js:
2576         (WI.DOMTreeContentView.prototype.get navigationItems):
2577         Include additional `window.FooAgent` checks for these since they will need
2578         to be revisited in the future.
2579
2580         * UserInterface/Protocol/InspectorBackend.js:
2581         (InspectorBackendClass.prototype.get domains):
2582         (InspectorBackendClass.prototype.activateDomain):
2583         Expose InspectorBackend.domains.<Domain> for feature checking.
2584
2585         * UserInterface/Controllers/BreakpointPopoverController.js:
2586         (WI.BreakpointPopoverController.prototype._createPopoverContent):
2587         * UserInterface/Controllers/CSSManager.js:
2588         (WI.CSSManager):
2589         (WI.CSSManager.prototype._mainResourceDidChange):
2590         * UserInterface/Controllers/TimelineManager.js:
2591         (WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
2592         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
2593         (WI.TimelineManager):
2594         * UserInterface/Models/Canvas.js:
2595         (WI.Canvas.prototype.startRecording):
2596         (WI.Canvas.prototype.recordingFinished):
2597         * UserInterface/Models/ScriptSyntaxTree.js:
2598         (WI.ScriptSyntaxTree.functionReturnDivot):
2599         * UserInterface/Protocol/DebuggerObserver.js:
2600         (WI.DebuggerObserver):
2601         * UserInterface/Protocol/NetworkObserver.js:
2602         (WI.NetworkObserver.prototype.requestWillBeSent):
2603         * UserInterface/Views/DebuggerSidebarPanel.js:
2604         (WI.DebuggerSidebarPanel):
2605         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked):
2606         * UserInterface/Views/NetworkTimelineView.js:
2607         (WI.NetworkTimelineView):
2608         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2609         (WI.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
2610         * UserInterface/Views/WebSocketContentView.js:
2611         (WI.WebSocketContentView):
2612         (WI.NetworkManager.prototype.webSocketWillSendHandshakeRequest):
2613         (WI.DebuggerManager.prototype.debuggerDidResume):
2614         Feature check in a target agnostic way.
2615
2616 2018-11-08  Matt Baker  <mattbaker@apple.com>
2617
2618         Web Inspector: ResourceQueryController should early return when query is longer than search string
2619         https://bugs.webkit.org/show_bug.cgi?id=191436
2620
2621         Reviewed by Devin Rousso.
2622
2623         * UserInterface/Controllers/ResourceQueryController.js:
2624
2625         * UserInterface/Models/ResourceQueryMatch.js:
2626         (WI.ResourceQueryMatch):
2627         Drive-by fixes.
2628
2629 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
2630
2631         Uncaught Exception: undefined is not an object (evaluating 'treeElement.parent.removeChild')
2632         https://bugs.webkit.org/show_bug.cgi?id=191454
2633
2634         Reviewed by Matt Baker.
2635
2636         * UserInterface/Views/ResourceSidebarPanel.js:
2637         (WI.ResourceSidebarPanel.prototype._scriptsCleared):
2638         This was intending to iterate the Map's values, which are tree elements.
2639
2640 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
2641
2642         Web Inspector: Potential for watch expressions to never show results
2643         https://bugs.webkit.org/show_bug.cgi?id=191438
2644
2645         Reviewed by Matt Baker.
2646
2647         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2648         (WI.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
2649         If there was no object don't bail, continue and resolve the Promise.
2650         In this case we can fallback to show `undefined`. This code might not be
2651         reachable right now, but is wrong as is.
2652
2653 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
2654
2655         Web Inspector: Debugger Popover does not work when paused in Worker
2656         https://bugs.webkit.org/show_bug.cgi?id=191342
2657
2658         Reviewed by Devin Rousso.
2659
2660         * UserInterface/Views/SourceCodeTextEditor.js:
2661         (WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
2662         (WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
2663         When receiving the result of the popover evaluation associate the RemoteObject with
2664         the target we used to evaluate (such as the Debugger call frame), not the target
2665         associated with the editor.
2666
2667 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
2668
2669         Web Inspector: Restrict domains at the target level instead of only at the window level
2670         https://bugs.webkit.org/show_bug.cgi?id=191344
2671
2672         Reviewed by Devin Rousso.
2673
2674         With this change the list of agents available on the target should accurately
2675         reflect the domains that target supports. We should start moving in the direction
2676         that if we are checking for, or using, a feature, we should ideally be using
2677         code that looks like `target.FooAgent.method` and not `window.FooAgent` or
2678         an unprefixed `FooAgent`. More changes to follow.
2679
2680         * UserInterface/Controllers/AppControllerBase.js:
2681         * UserInterface/Base/DebuggableType.js: Added.
2682         Extract debuggable type enum out into its own file loaded early on.
2683
2684         * UserInterface/Main.html:
2685         * UserInterface/Test.html:
2686         Load DebuggableType.js.
2687
2688         * UserInterface/Controllers/NetworkManager.js:
2689         (WI.NetworkManager.prototype.initializeTarget):
2690         With these changes target.ServiceWorker is only exposed on a ServiceWorker target.
2691
2692         * UserInterface/Protocol/Connection.js:
2693         (InspectorBackend.WorkerConnection):
2694         With these changes Target.js restricts the domains exposed on the Target so just
2695         clone all of the agents (we don't need to do anything special).
2696
2697         * UserInterface/Protocol/InspectorBackend.js:
2698         (InspectorBackendClass.prototype.activateDomain):
2699         Update supported domains per-type. If there is no explicit availability
2700         then the domain is supported on all types.
2701
2702         (InspectorBackendClass.prototype.supportedDomainsForDebuggableType):
2703         Get supported domains per-type.
2704
2705         (InspectorBackendClass.prototype.get workerSupportedDomains): Deleted.
2706         (InspectorBackendClass.prototype.workerSupportedDomain): Deleted.
2707         workerSupportedDomains is now unnecessary.
2708
2709         * UserInterface/Protocol/Target.js:
2710         (WI.Target.prototype._supportedDomainsForTargetType):
2711         Restrict supported domains for this target based on its type.
2712
2713         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
2714         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
2715         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
2716         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
2717         * Versions/Inspector-iOS-10.3.json:
2718         * Versions/Inspector-iOS-11.0.json:
2719         * Versions/Inspector-iOS-11.3.json:
2720         * Versions/Inspector-iOS-12.0.json:
2721         Regenerate protocol files now that workerSupportedDomains is unnecessary
2722         and explicit availability has been added to other domains.
2723
2724 2018-11-07  Nikita Vasilyev  <nvasilyev@apple.com>
2725
2726         REGRESSION(r236705): Web Inspector: wrong text color for selected DataGrid row
2727         https://bugs.webkit.org/show_bug.cgi?id=191405
2728         <rdar://problem/45893283>
2729
2730         Reviewed by Matt Baker.
2731
2732         Selection background color for both Dark Mode mode and Light Mode is dark blue.
2733         The text color for both cases should be white.
2734
2735         * UserInterface/Views/DataGrid.css:
2736         (body:not(.window-inactive, .window-docked-inactive) .data-grid:focus tr.editable.selected .cell-content > input):
2737
2738 2018-11-07  Joseph Pecoraro  <pecoraro@apple.com>
2739
2740         Web Inspector: Fix "Javascript" => "JavaScript" enum in protocol generated objects
2741         https://bugs.webkit.org/show_bug.cgi?id=191340
2742
2743         Reviewed by Devin Rousso.
2744
2745         * UserInterface/Models/Canvas.js:
2746         (WI.Canvas.fromPayload):
2747         Insert a missing break statement for the WebGPU case.
2748
2749         * UserInterface/Models/MemoryTimelineRecord.js:
2750         (WI.MemoryTimelineRecord.memoryCategoriesFromProtocol):
2751         Use new enum name.
2752
2753         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
2754         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
2755         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
2756         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
2757         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
2758         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
2759         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
2760         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
2761         Update enums with new generator.
2762
2763 2018-11-06  Joseph Pecoraro  <pecoraro@apple.com>
2764
2765         REGRESSION: Web Inspector: Popovers drawing incorrectly in Network Tab (clicking between a few items)
2766         https://bugs.webkit.org/show_bug.cgi?id=191323
2767
2768         Reviewed by Devin Rousso.
2769
2770         * UserInterface/Views/Popover.js:
2771         (WI.Popover.prototype._drawBackground):
2772         Save and restore the context state between updates. Something
2773         was affecting the clearRect, making it so that it didn't actually
2774         clear the entire rect each time.
2775
2776 2018-11-05  Devin Rousso  <drousso@apple.com>
2777
2778         Web Inspector: Audit: turn off Start button when all tests are removed
2779         https://bugs.webkit.org/show_bug.cgi?id=191235
2780
2781         Reviewed by Matt Baker.
2782
2783         * UserInterface/Views/AuditNavigationSidebarPanel.js:
2784         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
2785
2786 2018-11-05  Matt Baker  <mattbaker@apple.com>
2787
2788         Web Inspector: Table selection should not require that rows be in the cache
2789         https://bugs.webkit.org/show_bug.cgi?id=190993
2790         <rdar://problem/45613812>
2791
2792         Reviewed by Devin Rousso.
2793
2794         Deselecting a table row shouldn't depend on it being in the cache. This
2795         allows us to implement select all, and other kinds of bulk selection
2796         actions that affect rows that haven't been revealed.
2797
2798         * UserInterface/Views/Table.js:
2799         (WI.Table.prototype.deselectRow):
2800
2801 2018-11-05  Devin Rousso  <drousso@apple.com>
2802
2803         Web Inspector: show save/restore stack for recorded 2D Canvases
2804         https://bugs.webkit.org/show_bug.cgi?id=175283
2805         <rdar://problem/34040756>
2806
2807         Reviewed by Matt Baker.
2808
2809         Instead of using plain objects for holding the `WI.Recording`'s state, use a model object
2810         so that more data can be passed around. When visualizing the state, show any previously
2811         saved states in a `WI.DetailsSection` underneath the current state. If there are no saved
2812         states (meaning there is only the current state), don't use a `WI.DetailsSection`.
2813
2814         * UserInterface/Models/RecordingState.js: Added.
2815         (WI.RecordingState):
2816         (WI.RecordingState.fromContext):
2817         (WI.RecordingState.async swizzleInitialState):
2818         (WI.RecordingState.prototype.get source):
2819         (WI.RecordingState.prototype.has):
2820         (WI.RecordingState.prototype.get return):
2821         (WI.RecordingState.prototype.toJSON):
2822         (WI.RecordingState.prototype.[Symbol.iterator]):
2823
2824         * UserInterface/Models/Recording.js:
2825         (WI.Recording.prototype.async _process):
2826         (WI.Recording.prototype.async _swizzleState): Deleted.
2827
2828         * UserInterface/Models/RecordingAction.js:
2829         (WI.RecordingAction.prototype.process):
2830         (WI.RecordingAction.deriveCurrentState): Deleted.
2831
2832         * UserInterface/Views/RecordingContentView.js:
2833         (WI.RecordingContentView.prototype._generateContentCanvas2D):
2834
2835         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
2836         (WI.RecordingStateDetailsSidebarPanel):
2837         (WI.RecordingStateDetailsSidebarPanel.prototype.get scrollElement):
2838         (WI.RecordingStateDetailsSidebarPanel.prototype.sizeDidChange): Added.
2839         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
2840         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D.isColorProperty): Deleted.
2841         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D.createInlineSwatch): Deleted.
2842         * UserInterface/Views/RecordingStateDetailsSidebarPanel.css:
2843         (.sidebar > .panel.details.recording-state > .content .details-section > .header .source): Added.
2844         (.sidebar > .panel.details.recording-state > .content .data-grid tr.modified): Added.
2845         (.sidebar > .panel.details.recording-state > .content .data-grid tr:not(.selected).non-standard .name-column): Added.
2846         (.sidebar > .panel.details.recording-state > .content .data-grid tr:not(.selected) .unavailable): Added.
2847         (.sidebar > .panel.details.recording-state > .content .data-grid .inline-swatch): Added.
2848         (.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified): Deleted.
2849         (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected).non-standard): Deleted.
2850         (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected) .unavailable): Deleted.
2851         (.sidebar > .panel.details.recording-state > .content > .data-grid .inline-swatch): Deleted.
2852
2853         * UserInterface/Main.html:
2854         * UserInterface/Test.html:
2855
2856         * Localizations/en.lproj/localizedStrings.js:
2857
2858 2018-11-03  Devin Rousso  <drousso@apple.com>
2859
2860         Web Inspector: Canvas: capture changes to <canvas> that would affect the recorded context
2861         https://bugs.webkit.org/show_bug.cgi?id=190854
2862
2863         Reviewed by Matt Baker.
2864
2865         * UserInterface/Models/RecordingAction.js:
2866         (WI.RecordingAction):
2867         (WI.RecordingAction.isFunctionForType):
2868         (WI.RecordingAction.constantNameForParameter):
2869         (WI.RecordingAction.prototype.get contextReplacer): Added.
2870         (WI.RecordingAction.prototype.async.swizzle):
2871         (WI.RecordingAction.prototype.apply):
2872         Create a constant list of actions for each recording type that need to replace the context
2873         with a different value before being applied (e.g. `width` should be applied to the
2874         `context`'s `canvas` instead of directly to the `context`).
2875
2876         * UserInterface/Views/RecordingContentView.js:
2877         (WI.RecordingContentView.prototype._generateContentCanvas2D.actionModifiesPath): Added.
2878         (WI.RecordingContentView.prototype._generateContentCanvas2D):
2879         (WI.RecordingContentView._actionModifiesPath): Deleted.
2880         Generate the path context after the actions are applied to the preview context so that the
2881         final width/height are known and can be used. This is needed because changing the
2882         width/height causes the content to be erased.
2883
2884         * UserInterface/Views/RecordingActionTreeElement.js:
2885         (WI.RecordingActionTreeElement._generateDOM):
2886         (WI.RecordingActionTreeElement._classNameForAction):
2887         * UserInterface/Views/RecordingActionTreeElement.css:
2888         (.tree-outline:focus .item.action.selected:not(.invalid, .initial-state, .has-context-replacer) > .icon): Added.
2889         (.item.action > .titles .context-replacer::after): Added.
2890         (.item.action.has-context-replacer > .icon): Added.
2891         (@media (prefers-dark-interface) .item.action:not(.invalid, .initial-state, .has-context-replacer) > .icon): Added.
2892         (.tree-outline:focus .item.action.selected:not(.initial-state, .invalid) > .icon): Deleted.
2893         (@media (prefers-dark-interface) .item.action:not(.initial-state) > .icon): Deleted.
2894         (@media (prefers-dark-interface) .tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon): Deleted.
2895         Add the context replacer text to the beginning of the action's name if it exists.
2896
2897         * UserInterface/Views/CanvasContentView.js:
2898         (WI.CanvasContentView.prototype._refreshPixelSize):
2899         (WI.CanvasContentView.prototype._updatePixelSize): Deleted.
2900         Update preview image when the canvas' size changes.
2901
2902 2018-11-02  Matt Baker  <mattbaker@apple.com>
2903
2904         Web Inspector: support multiple selection/deletion of cookie records
2905         https://bugs.webkit.org/show_bug.cgi?id=66381
2906         <rdar://problem/19281525>
2907
2908         Reviewed by Devin Rousso.
2909
2910         * Localizations/en.lproj/localizedStrings.js:
2911
2912         * UserInterface/Views/CookieStorageContentView.js:
2913         (WI.CookieStorageContentView):
2914         (WI.CookieStorageContentView.prototype.get scrollableElements):
2915         (WI.CookieStorageContentView.prototype.tableNumberOfRows):
2916         (WI.CookieStorageContentView.prototype.tableSortChanged):
2917         (WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
2918         (WI.CookieStorageContentView.prototype.tableDidRemoveRows):
2919         (WI.CookieStorageContentView.prototype.tablePopulateCell):
2920         (WI.CookieStorageContentView.prototype.initialLayout):
2921         (WI.CookieStorageContentView.prototype._generateSortComparator):
2922         (WI.CookieStorageContentView.prototype._refreshButtonClicked):
2923         (WI.CookieStorageContentView.prototype._reloadCookies):
2924         (WI.CookieStorageContentView.prototype._updateSort):
2925         (WI.CookieStorageContentView.prototype._handleTableKeyDown):
2926         (WI.CookieStorageContentView.prototype.update): Deleted.
2927         (WI.CookieStorageContentView.prototype._rebuildTable): Deleted.
2928         (WI.CookieStorageContentView.prototype._sortDataGrid.localeCompare): Deleted.
2929         (WI.CookieStorageContentView.prototype._sortDataGrid.numberCompare): Deleted.
2930         (WI.CookieStorageContentView.prototype._sortDataGrid.expiresCompare): Deleted.
2931         (WI.CookieStorageContentView.prototype._sortDataGrid): Deleted.
2932         (WI.CookieStorageContentView.prototype._deleteCallback): Deleted.
2933         Replace DataGrid with Table. The content view serves as the table
2934         delegate and data source, and handles delete and backspace key events
2935         to allow deleting the selected cookies. Cookies may also be deleted from
2936         the table context menu and a new button in the navigation bar.
2937
2938         * UserInterface/Views/Table.js:
2939         (WI.Table.prototype.isRowSelected):
2940         (WI.Table.prototype.selectRow):
2941         (WI.Table.prototype.deselectRow):
2942         (WI.Table.prototype.removeRow):
2943         (WI.Table.prototype._getOrCreateRow):
2944         (WI.Table.prototype._handleMouseDown):
2945         (WI.Table.prototype._removeRows):
2946         (WI.Table.prototype._isRowSelected): Deleted.
2947         Make `isSelectedRow` public. It is more convenient and efficient than
2948         calling `Table.prototype.selectedRows.includes(rowIndex)`.
2949
2950 2018-11-01  Devin Rousso  <drousso@apple.com>
2951
2952         Web Inspector: View: introduce a didLayoutSubtree
2953         https://bugs.webkit.org/show_bug.cgi?id=191176
2954
2955         Reviewed by Matt Baker.
2956
2957         Introduce logic to allow subclasses of `WI.View` to perform logic after every `WI.View` in
2958         their subtree has finished `layout`.
2959
2960         * UserInterface/Views/View.js:
2961         (WI.View.prototype.didLayoutSubtree): Added.
2962         (WI.View.prototype._layoutSubtree):
2963
2964         * UserInterface/Views/NetworkTableContentView.js:
2965         (WI.NetworkTableContentView.prototype.layout):
2966         (WI.NetworkTableContentView.prototype.didLayoutSubtree): Added.
2967
2968 2018-11-01  Devin Rousso  <drousso@apple.com>
2969
2970         Web Inspector: Network: remove unnecessary media event tracking
2971         https://bugs.webkit.org/show_bug.cgi?id=191174
2972
2973         Reviewed by Joseph Pecoraro.
2974
2975         Renames "Group by Node" to "Group Media Requests" for clarity.
2976
2977         * UserInterface/Views/NetworkTableContentView.js:
2978         (WI.NetworkTableContentView):
2979         (WI.NetworkTableContentView.prototype.reset):
2980         (WI.NetworkTableContentView.prototype.showRepresentedObject):
2981         (WI.NetworkTableContentView.prototype.networkDetailViewClose):
2982         (WI.NetworkTableContentView.prototype._populateNameCell):
2983         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):
2984         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
2985         (WI.NetworkTableContentView.prototype.layout):
2986         (WI.NetworkTableContentView.prototype._entryForDOMNode):
2987         (WI.NetworkTableContentView.prototype._handleGroupByDOMNodeCheckedDidChange):
2988         (WI.NetworkTableContentView.prototype._restoreSelectedRow):
2989         (WI.NetworkTableContentView.prototype._handleResourceEntryMousedownWaterfall):
2990         (WI.NetworkTableContentView.prototype._handleNodeEntryMousedownWaterfall):
2991         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
2992         * UserInterface/Views/NetworkTableContentView.css:
2993         (.network-table .data-container .cell.name .range): Added.
2994         (.network-table .data-container .cell.name .range::before): Added.
2995         (.network-table:focus .data-container li.selected .cell.name .range): Added.
2996         (@media (prefers-dark-interface) .network-table .data-container .cell.name .range): Added.
2997         Always display the "Byte Range" title as a "subtitle", regardless of the media requests
2998         setting being toggled.
2999         Drive-by: update the position of the waterfall popover whenever the time range changes.
3000         Drive-by: close the details view if a node is selected and the media requests setting is
3001         turned off.
3002
3003         * UserInterface/Views/Popover.js:
3004         (WI.Popover.prototype.resize): Added.
3005         (WI.Popover.prototype.handleEvent):
3006
3007         * Localizations/en.lproj/localizedStrings.js:
3008
3009 2018-11-01  Devin Rousso  <drousso@apple.com>
3010
3011         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'mouseBlock.addEventListener')
3012         https://bugs.webkit.org/show_bug.cgi?id=191020
3013
3014         Reviewed by Joseph Pecoraro.
3015
3016         * UserInterface/Views/TimelineRuler.js:
3017         (WI.TimelineRuler):
3018         Since `undefined` is not a number, it isn't less than `0`, which caused us to divide by
3019         `undefined` (equivalent to dividing by `0`), resulting in `NaN`.
3020
3021 2018-11-01  Nikita Vasilyev  <nvasilyev@apple.com>
3022
3023         Uncaught Exception: TypeError: undefined is not an object (evaluating 'WI.modifierKeys.metaKey') (at ScopeBarItem.js:87:67)
3024         https://bugs.webkit.org/show_bug.cgi?id=191173
3025
3026         Reviewed by Devin Rousso.
3027
3028         WI.modifierKeys was accessed before it was initialized. Move it from WI.contentLoaded to WI.loaded,
3029         which happens before WI.contentLoaded.
3030
3031         * UserInterface/Base/Main.js:
3032         (WI.loaded):
3033         (WI.contentLoaded):
3034
3035 2018-11-01  Nikita Vasilyev  <nvasilyev@apple.com>
3036
3037         REGRESSION(r237652): Web Inspector: dumpInspectorProtocolMessages is always enabled
3038         https://bugs.webkit.org/show_bug.cgi?id=191161
3039
3040         Reviewed by Joseph Pecoraro.
3041
3042         * UserInterface/Protocol/InspectorBackend.js:
3043         (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
3044
3045 2018-11-01  Nikita Vasilyev  <nvasilyev@apple.com>
3046
3047         Web Inspector: Styles: Toggle selected properties by pressing Space or Command+/
3048         https://bugs.webkit.org/show_bug.cgi?id=181145
3049         <rdar://problem/36203388>
3050
3051         Reviewed by Brian Burg.
3052
3053         Pressing Space key or Command-/ toggles (comments out or uncomments) selected properties.
3054
3055         This patch only works with "Enable Selection of Multiple Properties" checked. It shouldn't introduce any
3056         changes when this setting is unchecked.
3057
3058         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3059         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get selectionRange):
3060         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.selectProperties):
3061         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy):
3062         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
3063         * UserInterface/Views/SpreadsheetStyleProperty.js:
3064         (WI.SpreadsheetStyleProperty):
3065         (WI.SpreadsheetStyleProperty.prototype.update): Renamed from _update.
3066         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
3067         (WI.SpreadsheetStyleProperty.prototype.applyFilter):
3068         (WI.SpreadsheetStyleProperty.prototype.handleCopyEvent):
3069         Make `update` method public. No other changes were made.
3070
3071 2018-10-31  Devin Rousso  <drousso@apple.com>
3072
3073         Web Inspector: Canvas: create a setting for auto-recording newly created contexts
3074         https://bugs.webkit.org/show_bug.cgi?id=190856
3075
3076         Reviewed by Brian Burg.
3077
3078         * UserInterface/Controllers/CanvasManager.js:
3079         (WI.CanvasManager.supportsRecordingAutoCapture): Added.
3080         (WI.CanvasManager.prototype.setRecordingAutoCaptureFrameCount): Added.
3081
3082         * UserInterface/Models/Canvas.js:
3083         (WI.Canvas.prototype.startRecording):
3084         (WI.Canvas.prototype.recordingStarted):
3085         (WI.Canvas.prototype.recordingFinished):
3086
3087         * UserInterface/Models/Recording.js:
3088
3089         * UserInterface/Views/CanvasOverviewContentView.js:
3090         (WI.CanvasOverviewContentView):
3091         (WI.CanvasOverviewContentView.prototype.get navigationItems):
3092         (WI.CanvasOverviewContentView.prototype.initialLayout): Added.
3093         (WI.CanvasOverviewContentView.prototype.attached):
3094         (WI.CanvasOverviewContentView.prototype.detached):
3095         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount): Added.
3096         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize): Added.
3097         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureInput): Added.
3098         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureCheckedDidChange): Added.
3099         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureEnabledChanged): Added.
3100         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged): Added.
3101         * UserInterface/Views/CanvasOverviewContentView.css:
3102         (.navigation-bar > .item.canvas-recording-auto-capture > label): Added.
3103         (.navigation-bar > .item.canvas-recording-auto-capture > label > input): Added.
3104         (.navigation-bar > .item.canvas-recording-auto-capture > label > input::-webkit-inner-spin-button): Added.
3105         (.popover-content > .tree-outline .item.recording > .icon): Deleted.
3106         (.popover-content > .tree-outline .item.recording:hover): Deleted.
3107         (.popover-content > .tree-outline .item.recording:hover > .icon): Deleted.
3108         Drive-by: removed unused CSS rules.
3109
3110         * UserInterface/Views/CanvasContentView.js:
3111         (WI.CanvasContentView.prototype.initialLayout):
3112         (WI.CanvasContentView.prototype._updateProgressView):
3113         (WI.CanvasContentView.prototype._updateViewRelatedItems):
3114
3115         * UserInterface/Views/CanvasTabContentView.js:
3116         (WI.CanvasTabContentView.prototype._recordingImportedOrStopped):
3117
3118         * UserInterface/Views/CheckboxNavigationItem.js:
3119         (WI.CheckboxNavigationItem):
3120         (WI.CheckboxNavigationItem.prototype._handleLabelClick): Added.
3121
3122         * UserInterface/Base/Setting.js:
3123
3124         * Localizations/en.lproj/localizedStrings.js:
3125
3126 2018-10-31  Devin Rousso  <drousso@apple.com>
3127
3128         Web Inspector: display low-power enter/exit events in Timelines and Network node waterfalls
3129         https://bugs.webkit.org/show_bug.cgi?id=190641
3130         <rdar://problem/45319049>
3131
3132         Reviewed by Joseph Pecoraro.
3133
3134         * UserInterface/Protocol/DOMObserver.js:
3135         (WI.DOMObserver.prototype.videoLowPowerChanged): Added.
3136
3137         * UserInterface/Controllers/DOMManager.js:
3138         (WI.DOMManager.prototype.videoLowPowerChanged): Added.
3139
3140         * UserInterface/Models/DOMNode.js:
3141         (WI.DOMNode):
3142         (WI.DOMNode.prototype.get lowPowerRanges): Added.
3143         (WI.DOMNode.prototype.videoLowPowerChanged): Added.
3144         (WI.DOMNode.prototype.canEnterLowPowerMode): Added.
3145
3146         * UserInterface/Views/NetworkTableContentView.js:
3147         (WI.NetworkTableContentView.prototype._populateDomainCell):
3148         (WI.NetworkTableContentView.prototype._tryLinkResourceToDOMNode):
3149         (WI.NetworkTableContentView.prototype._handleNodeLowPowerChanged): Added.
3150         * UserInterface/Views/NetworkTableContentView.css:
3151         (.network-table :not(.header) .cell.waterfall .waterfall-container > .area):
3152         (.network-table :not(.header) .cell.waterfall .waterfall-container > .area.dom-fullscreen): Added.
3153         (.network-table :not(.header) .cell.waterfall .waterfall-container > .area.low-power): Added.
3154         (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-fullscreen): Deleted.
3155
3156         * UserInterface/Views/DOMNodeEventsContentView.js:
3157         (WI.DOMNodeEventsContentView):
3158         (WI.DOMNodeEventsContentView.prototype.initialLayout):
3159         (WI.DOMNodeEventsContentView.prototype.closed): Deleted.
3160         (WI.DOMNodeEventsContentView.prototype._handleDOMNodeDidFireEvent): Deleted.
3161
3162         * UserInterface/Views/DOMEventsBreakdownView.js:
3163         (WI.DOMEventsBreakdownView):
3164         (WI.DOMEventsBreakdownView.prototype.initialLayout):
3165         (WI.DOMEventsBreakdownView.prototype.layout): Added.
3166         (WI.DOMEventsBreakdownView.prototype._handleDOMNodeDidFireEvent): Added.
3167         (WI.DOMEventsBreakdownView.prototype._handleDOMNodeLowPowerChanged): Added.
3168         (WI.DOMEventsBreakdownView.prototype.addEvent): Deleted.
3169         (WI.DOMEventsBreakdownView.prototype._populateTable.percentOfTotalTime): Deleted.
3170         (WI.DOMEventsBreakdownView.prototype._populateTable): Deleted.
3171         * UserInterface/Views/DOMEventsBreakdownView.css:
3172         (.dom-events-breakdown .graph > .area): Added.
3173         (.dom-events-breakdown .graph > .area.fullscreen):
3174         (.dom-events-breakdown .graph > .area.low-power): Added.
3175
3176         * Localizations/en.lproj/localizedStrings.js:
3177
3178 2018-10-31  Devin Rousso  <drousso@apple.com>
3179
3180         Web Inspector: Audit: save imported audits across WebInspector sessions
3181         https://bugs.webkit.org/show_bug.cgi?id=190858
3182         <rdar://problem/45527625>
3183
3184         Reviewed by Brian Burg.
3185
3186         * UserInterface/Base/ObjectStore.js: Added.
3187         (WI.ObjectStore):
3188         (WI.ObjectStore.supported):
3189         (WI.ObjectStore._open):
3190         (WI.ObjectStore.get _databaseName):
3191         (WI.ObjectStore.prototype.associateObject):
3192         (WI.ObjectStore.prototype.async getAll):
3193         (WI.ObjectStore.prototype.async add):
3194         (WI.ObjectStore.prototype.async addObject):
3195         (WI.ObjectStore.prototype.async delete):
3196         (WI.ObjectStore.prototype.async deleteObject):
3197         (WI.ObjectStore.prototype._resolveKeyPath):
3198         (WI.ObjectStore.prototype.async _operation.listener):
3199         (WI.ObjectStore.prototype.async _operation):
3200         Wrapper for a global `IndexedDB` instance for all of WebInspector (per level). Instances of
3201         `WI.ObjectStore` are able to control a given `IDBObjectStore` using a promise-based API.
3202
3203         *NOTE*: due to the constraint that `IDBObjectStore`s are only able to be created when the
3204         owner `IndexedDB` is "upgrade"d, all `WI.ObjectStore` must be declared before the database
3205         is opened for the first time. Additionally, any time a new `WI.ObjectStore` is added, the
3206         `version` needs to be incremented to ensure that the "upgrade" event fires.
3207
3208         To use any of the `*Object` functions, one must implement a `toJSON` on the object provided.
3209         This is so that `WI.ObjectStore` is able to add the resulting identifier value to the owner
3210         object while storing its `toJSON` value in the IndexedDB (e.g. for objects that have cycles).
3211
3212         * UserInterface/Controllers/AuditManager.js:
3213         (WI.AuditManager.prototype.import):
3214         (WI.AuditManager.prototype.loadStoredTests): Added.
3215         (WI.AuditManager.prototype.removeTest): Added.
3216         (WI.AuditManager.prototype._addTest):
3217
3218         * UserInterface/Views/AuditTabContentView.js:
3219         (WI.AuditTabContentView.prototype.initialLayout): Added.
3220         Attempt to load stored audits when the Audit tab is first shown (lazy-load).
3221
3222         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3223         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3224         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved): Added.
3225
3226         * UserInterface/Views/AuditTreeElement.js:
3227         (WI.AuditTreeElement.prototype.ondelete):
3228         Only allow top-level audits to be deleted, as that is what matches the `WI.ObjectStore`.
3229
3230         * UserInterface/Main.html:
3231         * UserInterface/Test.html:
3232
3233 2018-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3234
3235         Web Inspector: Move a few remaining global WI settings to WI.settings
3236         https://bugs.webkit.org/show_bug.cgi?id=191137
3237
3238         Reviewed by Brian Burg.
3239
3240         Move and better name some of the WI.settings created in Main.js
3241         to WI.settings, alongside other global settings.
3242
3243         * UserInterface/Base/Main.js:
3244         (WI.loaded):
3245         Move settings, and register for settings changes in contentLoaded.
3246
3247         * UserInterface/Base/Setting.js:
3248         New settings, and sort values.
3249
3250         * UserInterface/Test/Test.js:
3251         (WI.loaded):
3252         Update setting values for tests.
3253
3254         * UserInterface/Controllers/NetworkManager.js:
3255         (WI.NetworkManager.prototype.initializeTarget):
3256         * UserInterface/Controllers/RuntimeManager.js:
3257         (WI.RuntimeManager.prototype.initializeTarget):
3258         * UserInterface/Models/DOMNode.js:
3259         (WI.DOMNode.prototype.get children):
3260         (WI.DOMNode.prototype.get nextSibling):
3261         (WI.DOMNode.prototype.get previousSibling):
3262         (WI.DOMNode.prototype.get childNodeCount):
3263         * UserInterface/Protocol/Target.js:
3264         (WI.Target.prototype.initialize):
3265         * UserInterface/Views/DOMTreeContentView.js:
3266         (WI.DOMTreeContentView):
3267         (WI.DOMTreeContentView.prototype.closed):
3268         (WI.DOMTreeContentView.prototype._togglePaintFlashing):
3269         (WI.DOMTreeContentView.prototype._showPaintRectsSettingChanged):
3270         (WI.DOMTreeContentView.prototype._showShadowDOMSettingChanged):
3271         (WI.DOMTreeContentView.prototype._toggleShowsShadowDOMSetting):
3272         * UserInterface/Views/DOMTreeOutline.js:
3273         (WI.DOMTreeOutline):
3274         (WI.DOMTreeOutline.prototype.close):
3275         (WI.DOMTreeOutline.prototype._revealAndSelectNode):
3276         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3277         (WI.LayerTreeDetailsSidebarPanel.prototype.initialLayout):
3278         (WI.LayerTreeDetailsSidebarPanel.prototype._updateDisplayWithLayers):
3279         * UserInterface/Views/Layers3DContentView.js:
3280         (WI.Layers3DContentView):
3281         (WI.Layers3DContentView.prototype.closed):
3282         (WI.Layers3DContentView.prototype._showPaintRectsSettingChanged):
3283         (WI.Layers3DContentView.prototype._togglePaintFlashing):
3284         * UserInterface/Views/NetworkTableContentView.js:
3285         (WI.NetworkTableContentView):
3286         (WI.NetworkTableContentView.prototype.closed):
3287         (WI.NetworkTableContentView.prototype._resourceCachingDisabledSettingChanged):
3288         (WI.NetworkTableContentView.prototype._toggleDisableResourceCache):
3289         * UserInterface/Views/ScriptContentView.js:
3290         (WI.ScriptContentView):
3291         (WI.ScriptContentView.prototype.closed):
3292         (WI.ScriptContentView.prototype._contentDidPopulate):
3293         (WI.ScriptContentView.prototype._enableControlFlowProfilerSettingChanged):
3294         (WI.ScriptContentView.prototype._showJavaScriptTypeInformationSettingChanged):
3295         * UserInterface/Views/SourceCodeTextEditor.js:
3296         (WI.SourceCodeTextEditor.prototype.shown):
3297         (WI.SourceCodeTextEditor.prototype._proceedPopulateWithContent):
3298         (WI.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
3299         (WI.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
3300         * UserInterface/Views/TextResourceContentView.js:
3301         (WI.TextResourceContentView):
3302         (WI.TextResourceContentView.prototype.closed):
3303         (WI.TextResourceContentView.prototype._contentDidPopulate):
3304         (WI.TextResourceContentView.prototype._enableControlFlowProfilerSettingChanged):
3305         (WI.TextResourceContentView.prototype._showJavaScriptTypeInformationSettingChanged):
3306         Renamed setting.
3307
3308 2018-10-31  Devin Rousso  <drousso@apple.com>
3309
3310         Web Inspector: Styles: missing contextmenu items for links
3311         https://bugs.webkit.org/show_bug.cgi?id=191021
3312
3313         Reviewed by Joseph Pecoraro.
3314
3315         * UserInterface/Views/SpreadsheetStyleProperty.js:
3316         (WI.SpreadsheetStyleProperty.prototype._renderValue):
3317         (WI.SpreadsheetStyleProperty.prototype._handleLinkContextMenu): Added.
3318         If the token is subtype of "link", add contextmenu items to the wrapper element.
3319
3320         * UserInterface/Views/ContextMenuUtilities.js:
3321         (WI.appendContextMenuItemsForURL.showResourceWithOptions):
3322         (WI.appendContextMenuItemsForURL):
3323         Drive-by: don't assume that `options` will be provided.
3324
3325         * Localizations/en.lproj/localizedStrings.js:
3326
3327 2018-10-31  Nikita Vasilyev  <nvasilyev@apple.com>
3328
3329         Web Inspector: Styles: implement copying and deletion of multiple properties
3330         https://bugs.webkit.org/show_bug.cgi?id=191037
3331         <rdar://problem/45650078>
3332
3333         Reviewed by Brian Burg.
3334
3335         This patch should only work with "Enable Selection of Multiple Properties" checked. It shouldn't introduce any
3336         changes when this setting is unchecked.
3337
3338         Mousedown on a property (1) and moving the mouse cursor to another property (2) should select properties 1, 2, and
3339         all properties between them until mouseup is fired.
3340
3341         Once selected:
3342         - Pressing Command-C should copy the selected properties.
3343         - Pressing Delete should remove the properties.
3344
3345         * UserInterface/Models/CSSProperty.js:
3346         (WI.CSSProperty.prototype.get formattedText):
3347         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3348         (.spreadsheet-style-declaration-editor):
3349         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property):
3350         (.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
3351         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected):
3352         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus):
3353         (@media (prefers-dark-interface)):
3354
3355         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3356         (WI.SpreadsheetCSSStyleDeclarationEditor):
3357         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
3358         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.selectProperties):
3359         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.deselectProperties):
3360         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyBlur):
3361         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseEnter):
3362         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseLeave):
3363         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy):
3364         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
3365         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._hasSelectedProperties):
3366         Property selection is defined as two numbers: anchorIndex and focusIndex.
3367         The property with focusIndex is actually focused. The focus outline is replaced by a more subtle left blue border.
3368
3369         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
3370         (.spreadsheet-css-declaration.selecting,):
3371         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3372         (WI.SpreadsheetCSSStyleDeclarationSection):
3373         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorPropertyBlur):
3374         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter):
3375         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorPropertyMouseLeave):
3376         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
3377         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseUp):
3378         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
3379         * UserInterface/Views/SpreadsheetStyleProperty.js:
3380         (WI.SpreadsheetStyleProperty):
3381         Implement copying the same way it's done for DataGrid: by adding copyHandler property to the focused element.
3382         Add `tabIndex=-1` so the property element can be focused.
3383
3384         (WI.SpreadsheetStyleProperty.prototype.get property):
3385         (WI.SpreadsheetStyleProperty.prototype.get selected):
3386         (WI.SpreadsheetStyleProperty.prototype.set selected):
3387         (WI.SpreadsheetStyleProperty.prototype.remove):
3388         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
3389         (WI.SpreadsheetStyleProperty.prototype.handleCopyEvent):
3390         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
3391         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
3392         (WI.SpreadsheetStyleProperty.prototype._handleNamePaste):
3393
3394 2018-10-31  Devin Rousso  <drousso@apple.com>
3395
3396         Web Inspector: Audit: attempt to re-link DOM nodes for imported results
3397         https://bugs.webkit.org/show_bug.cgi?id=191044
3398         <rdar://problem/45687364>
3399
3400         Reviewed by Brian Burg.
3401
3402         When importing a `WI.AuditTestCaseResult`, attempt to `querySelector` for each item in
3403         `data.domNodes`. If a node is found, replace it with that node and show a tree instead.
3404
3405         * UserInterface/Models/AuditTestCase.js:
3406         (WI.AuditTestCase.async fromPayload): Added.
3407         (WI.AuditTestCase.fromPayload): Deleted.
3408
3409         * UserInterface/Models/AuditTestGroup.js:
3410         (WI.AuditTestGroup.async fromPayload): Added.
3411         (WI.AuditTestGroup.fromPayload): Deleted.
3412
3413         * UserInterface/Models/AuditTestCaseResult.js:
3414         (WI.AuditTestCaseResult.async fromPayload): Added.
3415         (WI.AuditTestCaseResult.fromPayload): Deleted.
3416
3417         * UserInterface/Models/AuditTestGroupResult.js:
3418         (WI.AuditTestGroupResult.async fromPayload): Added.
3419         (WI.AuditTestGroupResult.fromPayload): Deleted.
3420
3421         * UserInterface/Controllers/AuditManager.js:
3422         (WI.AuditManager.prototype.import):
3423
3424 2018-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3425
3426         Follow-up review comment to r237652.
3427
3428         Reviewed by Brian Burg.
3429
3430         * UserInterface/Controllers/DebuggerManager.js:
3431         (WI.DebuggerManager):
3432
3433 2018-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3434
3435         Web Inspector: Separate target initialization from frontend initialization
3436         https://bugs.webkit.org/show_bug.cgi?id=191052
3437         <rdar://problem/45658384>
3438
3439         Reviewed by Brian Burg.
3440
3441         * UserInterface/Base/Main.js:
3442         (WI.loaded):
3443         (WI.performOneTimeFrontendInitializationsUsingTarget):
3444         Create the targets after the rest of frontend initialization. This is a step
3445         toward a frontend opening and being told about multiple targets instead of
3446         knowing in advance a single target it is connected to. All backend
3447         messages during frontend initialization now happen with an explicit target.
3448
3449         * UserInterface/Controllers/ApplicationCacheManager.js:
3450         (WI.ApplicationCacheManager):
3451         (WI.ApplicationCacheManager.prototype.initializeTarget):
3452         (WI.ApplicationCacheManager.prototype.initialize):
3453         * UserInterface/Controllers/CSSManager.js:
3454         (WI.CSSManager):
3455         (WI.CSSManager.prototype.initializeTarget):
3456         * UserInterface/Controllers/CanvasManager.js:
3457         (WI.CanvasManager):
3458         (WI.CanvasManager.prototype.initializeTarget):
3459         * UserInterface/Controllers/ConsoleManager.js:
3460         (WI.ConsoleManager):
3461         (WI.ConsoleManager.prototype.initializeLogChannels):
3462         * UserInterface/Controllers/DOMManager.js:
3463         (WI.DOMManager):
3464         (WI.DOMManager.prototype.initializeTarget):
3465         * UserInterface/Controllers/DOMStorageManager.js:
3466         (WI.DOMStorageManager):
3467         (WI.DOMStorageManager.prototype.initializeTarget):
3468         * UserInterface/Controllers/DatabaseManager.js:
3469         (WI.DatabaseManager):
3470         (WI.DatabaseManager.prototype.initializeTarget):
3471         * UserInterface/Controllers/DebuggerManager.js:
3472         (WI.DebuggerManager):
3473         (WI.DebuggerManager.prototype.initializeTarget):
3474         (WI.DebuggerManager.restoreBreakpointsSoon): Deleted.
3475         * UserInterface/Controllers/HeapManager.js:
3476         (WI.HeapManager.prototype.initializeTarget):
3477         * UserInterface/Controllers/IndexedDBManager.js:
3478         (WI.IndexedDBManager):
3479         (WI.IndexedDBManager.prototype.initializeTarget):
3480         * UserInterface/Controllers/LayerTreeManager.js:
3481         (WI.LayerTreeManager.prototype.initializeTarget):
3482         * UserInterface/Controllers/MemoryManager.js:
3483         (WI.MemoryManager.prototype.initializeTarget):
3484         * UserInterface/Controllers/NetworkManager.js:
3485         (WI.NetworkManager):
3486         (WI.NetworkManager.prototype.initializeTarget):
3487         * UserInterface/Controllers/RuntimeManager.js:
3488         (WI.RuntimeManager):
3489         (WI.RuntimeManager.prototype.initializeTarget):
3490         * UserInterface/Controllers/TargetManager.js:
3491         (WI.TargetManager):
3492         (WI.TargetManager.prototype.initializeTargetsWithMainTarget):
3493         * UserInterface/Controllers/TimelineManager.js:
3494         (WI.TimelineManager):
3495         (WI.TimelineManager.prototype.initializeTarget):
3496         (WI.TimelineManager.prototype.set enabledTimelineTypes):
3497         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
3498         * UserInterface/Controllers/WorkerManager.js:
3499         (WI.WorkerManager):
3500         (WI.WorkerManager.prototype.initializeTarget):
3501         Move Target initialization out of the constructor into a top level
3502         `initializeTarget` function. This will be expected to be called
3503         by any target that the frontend connects to.
3504
3505         (WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange):
3506         Drive-by fix. Update all targets if the setting changes.
3507
3508         (WI.WorkerManager.prototype.workerCreated):
3509         Call initialize on the new target.
3510
3511         * UserInterface/Models/CSSCompletions.js:
3512         (WI.CSSCompletions.initializeCSSCompletions):
3513         (WI.CSSCompletions.requestCSSCompletions): Deleted.
3514         Rename requestCSSCompletions to initializeCSSCompletions to try
3515         and standardize on "initialize" being used for most frontend one
3516         time initialization tasks. This being one such operation that
3517         only needs to be performed once on a target that supports it.
3518
3519         * UserInterface/Protocol/Target.js:
3520         (WI.Target):
3521         (WI.Target.prototype.initialize):
3522         Perform explicit target initialization, such as initializing
3523         the state of all backend domains / agents. This is done by asking
3524         each of the managers to do initialization work for this target.
3525
3526         (WI.Target.prototype.get ApplicationCacheAgent):
3527         (WI.Target.prototype.get CSSAgent):
3528         (WI.Target.prototype.get CanvasAgent):
3529         (WI.Target.prototype.get ConsoleAgent):
3530         (WI.Target.prototype.get DOMAgent):
3531         (WI.Target.prototype.get DOMDebuggerAgent):
3532         (WI.Target.prototype.get DOMStorageAgent):
3533         (WI.Target.prototype.get DatabaseAgent):
3534         (WI.Target.prototype.get DebuggerAgent):
3535         (WI.Target.prototype.get HeapAgent):
3536         (WI.Target.prototype.get IndexedDBAgent):
3537         (WI.Target.prototype.get InspectorAgent):
3538         (WI.Target.prototype.get LayerTreeAgent):
3539         (WI.Target.prototype.get MemoryAgent):
3540         (WI.Target.prototype.get NetworkAgent):
3541         (WI.Target.prototype.get PageAgent):
3542         (WI.Target.prototype.get RecordingAgent):
3543         (WI.Target.prototype.get RuntimeAgent):
3544         (WI.Target.prototype.get ScriptProfilerAgent):
3545         (WI.Target.prototype.get ServiceWorkerAgent):
3546         (WI.Target.prototype.get TargetAgent):
3547         (WI.Target.prototype.get TimelineAgent):
3548         (WI.Target.prototype.get WorkerAgent):
3549         Accessors for all of the agents on a Target.
3550
3551         * UserInterface/Protocol/WorkerTarget.js:
3552         (WI.WorkerTarget):
3553         This is now automatically done in the base class.
3554
3555         * UserInterface/Test/Test.js:
3556         (WI.loaded):
3557         (WI.performOneTimeFrontendInitializationsUsingTarget):
3558         New necessary top level hooks, and initialize more like Main.js.
3559
3560 2018-10-31  Devin Rousso  <drousso@apple.com>
3561
3562         Web Inspector: Audit: show metadata for results
3563         https://bugs.webkit.org/show_bug.cgi?id=190853
3564         <rdar://problem/45527623>
3565
3566         Reviewed by Brian Burg.
3567
3568         * UserInterface/Models/AuditTestCase.js:
3569         (WI.AuditTestCase.prototype.async run):
3570         Capture timestamps around the `RunetimeAgent.evaluate` call, as well as the URL of the page.
3571
3572         * UserInterface/Models/AuditTestCaseResult.js:
3573         (WI.AuditTestCaseResult):
3574         (WI.AuditTestCaseResult.fromPayload):
3575         (WI.AuditTestCaseResult.prototype.get metadata): Added.
3576         (WI.AuditTestCaseResult.prototype.toJSON):
3577
3578         * UserInterface/Views/AuditTestCaseContentView.js:
3579         (WI.AuditTestCaseContentView.prototype.initialLayout):
3580         (WI.AuditTestCaseContentView.prototype.layout):
3581         * UserInterface/Views/AuditTestCaseContentView.css:
3582         (.content-view.audit-test-case > header h1): Added.
3583         (.content-view.audit-test-case > header h1 > img): Added.
3584         (.content-view.audit-test-case > header > .metadata): Added.
3585         (.content-view.audit-test-case > header > .metadata > .source > time): Added.
3586         (.content-view.audit-test-case > header > .metadata > .source > a): Added.
3587         (.content-view.audit-test-case > header > .metadata > .duration): Added.
3588         (.content-view.audit-test-case > header > h1): Deleted.
3589         (.content-view.audit-test-case > header > h1 > img): Deleted.
3590         Display any metadata information where the `WI.ScopeBar` is for `WI.AuditTestGroupContentView`s.
3591
3592         * UserInterface/Views/AuditTestContentView.css:
3593         (.content-view.audit-test > header):
3594         (.content-view.audit-test > header > .information): Added.
3595         * UserInterface/Views/AuditTestGroupContentView.css:
3596         (.content-view.audit-test-group > header):
3597         (.content-view.audit-test-group > header > .percentage-pass):
3598         (.content-view.audit-test-group > header > .information): Deleted.
3599         Move common CSS rules to common parent class.
3600
3601         * UserInterface/Base/Utilities.js:
3602
3603 2018-10-30  Devin Rousso  <drousso@apple.com>
3604
3605         Web Inspector: Audit: create Audit Tab
3606         https://bugs.webkit.org/show_bug.cgi?id=190754
3607
3608         Reviewed by Matt Baker.
3609
3610         Create an Audit tab for running audits on the inspected page. Leverage `Runtime.evaluate`
3611         for running the audit tests (arbitrary JavaScript), and use the returned value to generate
3612         a preview UI of the results. All tests/results can be exported/imported to formatted JSON:
3613
3614         `AuditTestCase` JSON:
3615             {
3616                 "type": "test-case",
3617                 "name": <string>,
3618                 <optional> "description": <string>,
3619                 "test": <stringified JavaScript function>,
3620             }
3621
3622         `AuditTestGroup` JSON:
3623             {
3624                 "type": "test-group",
3625                 "name": <string>,
3626                 <optional> "description": <string>,
3627                 "tests": [...<AuditTestCase, AuditTestGroup>],
3628             }
3629
3630         `AuditTestCaseResult` JSON:
3631             {
3632                 "type": "test-case-result",
3633                 "name": <string>,
3634                 <optional> "description": <string>,
3635                 "level": <"pass", "warn", "fail", "error", "unsupported">,
3636                 "data": {
3637                     "domNodes": [...<stringified CSS path>],
3638                     "domAttributes": [...<string>],
3639                     "errors": [...<string>],
3640                 },
3641             }
3642
3643         `AuditTestGroupResult` JSON:
3644             {
3645                 "type": "test-group-result",
3646                 "name": <string>,
3647                 <optional> "description": <string>,
3648                 "results": [...<AuditTestCaseResult, AuditTestGroupResult>],
3649             }
3650
3651         More keys may be added in the future (especially for `AuditTestCaseResult.data`).
3652
3653         * UserInterface/Controllers/AuditManager.js:
3654         (WI.AuditManager):
3655         (WI.AuditManager.synthesizeError): Added.
3656         (WI.AuditManager.prototype.get tests): Added.
3657         (WI.AuditManager.prototype.get results): Added.
3658         (WI.AuditManager.prototype.get runningState): Added.
3659         (WI.AuditManager.prototype.start): Added.
3660         (WI.AuditManager.prototype.stop): Added.
3661         (WI.AuditManager.prototype.import): Added.
3662         (WI.AuditManager.prototype.export): Added.
3663         (WI.AuditManager.prototype._addTest): Added.
3664         (WI.AuditManager.prototype._addResult): Added.
3665         (WI.AuditManager.prototype.get testSuites): Deleted.
3666         (WI.AuditManager.prototype.get reports): Deleted.
3667         (WI.AuditManager.prototype.async runAuditTestByRepresentedObject): Deleted.
3668         (WI.AuditManager.prototype.reportForId): Deleted.
3669         (WI.AuditManager.prototype.removeAllReports): Deleted.
3670         (WI.AuditManager.prototype.async _runTestCase): Deleted.
3671
3672         * UserInterface/Models/AuditTestBase.js: Added.
3673         (WI.AuditTestBases):
3674         (WI.AuditTestBases.prototype.get name):
3675         (WI.AuditTestBases.prototype.get description):
3676         (WI.AuditTestBases.prototype.get runningState):
3677         (WI.AuditTestBases.prototype.get result):
3678         (WI.AuditTestBases.prototype.async start):
3679         (WI.AuditTestBases.prototype.stop):
3680         (WI.AuditTestBases.prototype.clearResult):
3681         (WI.AuditTestBases.prototype.saveIdentityToCookie):
3682         (WI.AuditTestBases.prototype.toJSON):
3683         (WI.AuditTestBases.prototype.async run):
3684
3685         * UserInterface/Models/AuditTestCase.js:
3686         (WI.AuditTestCase):
3687         (WI.AuditTestCase.fromPayload): Added.
3688         (WI.AuditTestCase.prototype.toJSON): Added.
3689         (WI.AuditTestCase.prototype.async run): Added.
3690         (WI.AuditTestCase.prototype.async run.setLevel): Added.
3691         (WI.AuditTestCase.prototype.async run.addError): Added.
3692         (WI.AuditTestCase.prototype.async run.checkResultProperty.addErrorForValueType): Added.
3693         (WI.AuditTestCase.prototype.async run.checkResultProperty): Added.
3694         (WI.AuditTestCase.prototype.async run.async resultArrayForEach): Added.
3695         (WI.AuditTestCase.prototype.get id): Deleted.
3696         (WI.AuditTestCase.prototype.get name): Deleted.
3697         (WI.AuditTestCase.prototype.get suite): Deleted.
3698         (WI.AuditTestCase.prototype.get setup): Deleted.
3699         (WI.AuditTestCase.prototype.get tearDown): Deleted.
3700         (WI.AuditTestCase.prototype.get errorDetails): Deleted.
3701
3702         * UserInterface/Models/AuditTestGroup.js: Added.
3703         (WI.AuditTestGroup):
3704         (WI.AuditTestGroup.fromPayload):
3705         (WI.AuditTestGroup.prototype.get tests):
3706         (WI.AuditTestGroup.prototype.stop):
3707         (WI.AuditTestGroup.prototype.clearResult):
3708         (WI.AuditTestGroup.prototype.async run):
3709         (WI.AuditTestGroup.prototype.toJSON):
3710         (WI.AuditTestGroup.prototype._updateResult):
3711         (WI.AuditTestGroup.prototype._handleTestCompleted):
3712         (WI.AuditTestGroup.prototype._handleTestProgress):
3713
3714         * UserInterface/Models/AuditTestResultBase.js: Added.
3715         (WI.AuditTestResultBase):
3716         (WI.AuditTestResultBase.prototype.get name):
3717         (WI.AuditTestResultBase.prototype.get description):
3718         (WI.AuditTestResultBase.prototype.get result):
3719         (WI.AuditTestResultBase.prototype.get didPass):
3720         (WI.AuditTestResultBase.prototype.get didWarn):
3721         (WI.AuditTestResultBase.prototype.get didFail):
3722         (WI.AuditTestResultBase.prototype.get didError):
3723         (WI.AuditTestResultBase.prototype.get unsupported):
3724         (WI.AuditTestResultBase.prototype.saveIdentityToCookie):
3725         (WI.AuditTestResultBase.prototype.toJSON):
3726
3727         * UserInterface/Models/AuditTestCaseResult.js: Added.
3728         (WI.AuditTestCaseResult):
3729         (WI.AuditTestCaseResult.fromPayload.checkArray):
3730         (WI.AuditTestCaseResult.fromPayload):
3731         (WI.AuditTestCaseResult.prototype.get level):
3732         (WI.AuditTestCaseResult.prototype.get data):
3733         (WI.AuditTestCaseResult.prototype.get didPass):
3734         (WI.AuditTestCaseResult.prototype.get didWarn):
3735         (WI.AuditTestCaseResult.prototype.get didFail):
3736         (WI.AuditTestCaseResult.prototype.get didError):
3737         (WI.AuditTestCaseResult.prototype.get unsupported):
3738         (WI.AuditTestCaseResult.prototype.toJSON):
3739
3740         * UserInterface/Models/AuditTestGroupResult.js: Added.
3741         (WI.AuditTestGroupResult):
3742         (WI.AuditTestGroupResult.fromPayload):
3743         (WI.AuditTestGroupResult.prototype.get results):
3744         (WI.AuditTestGroupResult.prototype.get levelCounts):
3745         (WI.AuditTestGroupResult.prototype.get didPass):
3746         (WI.AuditTestGroupResult.prototype.get didWarn):
3747         (WI.AuditTestGroupResult.prototype.get didFail):
3748         (WI.AuditTestGroupResult.prototype.get didError):
3749         (WI.AuditTestGroupResult.prototype.get unsupported):
3750         (WI.AuditTestGroupResult.prototype.toJSON):
3751
3752         * UserInterface/Views/AuditTabContentView.js: Added.
3753         (WI.AuditTabContentView):
3754         (WI.AuditTabContentView.tabInfo):
3755         (WI.AuditTabContentView.isTabAllowed):
3756         (WI.AuditTabContentView.prototype.get type):
3757         (WI.AuditTabContentView.prototype.get supportsSplitContentBrowser):
3758         (WI.AuditTabContentView.prototype.canShowRepresentedObject):
3759         (WI.AuditTabContentView.prototype.shown):
3760         (WI.AuditTabContentView.prototype.hidden):
3761         (WI.AuditTabContentView.prototype._handleSpace):
3762
3763         * UserInterface/Views/AuditNavigationSidebarPanel.js: Added.
3764         (WI.AuditNavigationSidebarPanel):
3765         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
3766         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3767         (WI.AuditNavigationSidebarPanel.prototype.closed):
3768         (WI.AuditNavigationSidebarPanel.prototype._addTest):
3769         (WI.AuditNavigationSidebarPanel.prototype._addResult):
3770         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
3771         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestAdded):
3772         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestCompleted):
3773         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
3774         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
3775         (WI.AuditNavigationSidebarPanel.prototype._handleStartStopButtonNavigationItemClicked):
3776         (WI.AuditNavigationSidebarPanel.prototype._handleImportButtonNavigationItemClicked):
3777         * UserInterface/Views/AuditNavigationSidebarPanel.css: Added.
3778         (.sidebar > .panel.navigation.audit > .content):
3779
3780         * UserInterface/Views/AuditTreeElement.js: Added.
3781         (WI.AuditTreeElement):
3782         (WI.AuditTreeElement.prototype.get result):
3783         (WI.AuditTreeElement.prototype.onattach):
3784         (WI.AuditTreeElement.prototype.ondetach):
3785         (WI.AuditTreeElement.prototype.onpopulate):
3786         (WI.AuditTreeElement.prototype.populateContextMenu):
3787         (WI.AuditTreeElement.prototype._start):
3788         (WI.AuditTreeElement.prototype._updateLevel):
3789         (WI.AuditTreeElement.prototype._showRunningSpinner):
3790         (WI.AuditTreeElement.prototype._showRunningProgress):
3791         (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
3792         (WI.AuditTreeElement.prototype._handleTestResultCleared):
3793         (WI.AuditTreeElement.prototype._handleTestCaseScheduled):
3794         (WI.AuditTreeElement.prototype._handleTestGroupCompleted):
3795         (WI.AuditTreeElement.prototype._handleTestGroupProgress):
3796         (WI.AuditTreeElement.prototype._handleTestGroupScheduled):
3797         (WI.AuditTreeElement.prototype._handleStatusClick):
3798         * UserInterface/Views/AuditTreeElement.css: Added.
3799         (.tree-outline .item.audit > .status):
3800         (.tree-outline .item.audit > .status > img):
3801         (.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img):
3802         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:not(:hover)):
3803         (.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status):
3804         (.tree-outline .item.audit > .status > img.pass):
3805         (.tree-outline .item.audit > .status > img.warn):
3806         (.tree-outline .item.audit > .status > img.fail):
3807         (.tree-outline .item.audit > .status > img.error):
3808         (.tree-outline .item.audit > .status > img.unsupported):
3809         (.audit.test-case .icon):
3810         (.audit.test-group .icon):
3811         (.audit.test-case-result .icon):
3812         (.audit.test-group-result .icon):
3813
3814         * UserInterface/Views/AuditTestContentView.js: Added.
3815         (WI.AuditTestContentView):
3816         (WI.AuditTestContentView.prototype.get navigationItems):
3817         (WI.AuditTestContentView.prototype.get headerView):
3818         (WI.AuditTestContentView.prototype.get contentView):
3819         (WI.AuditTestContentView.prototype.get supportsSave):
3820         (WI.AuditTestContentView.prototype.get saveData):
3821         (WI.AuditTestContentView.prototype.initialLayout):
3822         (WI.AuditTestContentView.prototype.layout):
3823         (WI.AuditTestContentView.prototype.shown):
3824         (WI.AuditTestContentView.prototype.hidden):
3825         (WI.AuditTestContentView.prototype.get placeholderElement):
3826         (WI.AuditTestContentView.prototype.set placeholderElement):
3827         (WI.AuditTestContentView.prototype.showRunningPlaceholder):
3828         (WI.AuditTestContentView.prototype.showStoppingPlaceholder):
3829         (WI.AuditTestContentView.prototype.showNoResultPlaceholder):
3830         (WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):
3831         (WI.AuditTestContentView.prototype.showFilteredPlaceholder):
3832         (WI.AuditTestContentView.prototype.hidePlaceholder):
3833         (WI.AuditTestContentView.prototype.applyFilter):
3834         (WI.AuditTestContentView.prototype.resetFilter):
3835         (WI.AuditTestContentView.prototype._exportAudit):
3836         (WI.AuditTestContentView.prototype._updateExportButtonNavigationItemState):
3837         (WI.AuditTestContentView.prototype._showPlaceholder):
3838         (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
3839         (WI.AuditTestContentView.prototype._handleTestChanged):
3840         * UserInterface/Views/AuditTestContentView.css: Added.
3841         (.content-view-container > .content-view.audit-test):
3842         (.content-view-container > .content-view.audit-test > header):
3843         (.content-view-container > .content-view.audit-test > header h1):
3844         (.content-view-container > .content-view.audit-test > header p):
3845         (.content-view.audit-test):
3846         (.content-view.audit-test h1):
3847         (.content-view.audit-test > header):
3848         (.content-view.audit-test > header p):
3849         (.content-view.audit-test .audit-test.filtered, .content-view.audit-test .audit-test .message-text-view):
3850         (.content-view.audit-test > section):
3851         (.content-view.audit-test > section > .message-text-view):
3852         (.content-view.audit-test.showing-placeholder):
3853         (.content-view.audit-test.showing-placeholder > section):
3854         (.content-view.audit-test.showing-placeholder > section > :not(.message-text-view)):
3855         (@media (prefers-dark-interface) .content-view.audit-test):
3856
3857         * UserInterface/Views/AuditTestCaseContentView.js: Added.
3858         (WI.AuditTestCaseContentView):
3859         (WI.AuditTestCaseContentView.prototype.initialLayout):
3860         (WI.AuditTestCaseContentView.prototype.layout):