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