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