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