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