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