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