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