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