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