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