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