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