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