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