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