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