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