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