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