Title: [202932] trunk/Source/WebInspectorUI
- Revision
- 202932
- Author
- [email protected]
- Date
- 2016-07-07 14:26:33 -0700 (Thu, 07 Jul 2016)
Log Message
Web Inspector: scrolled Snapshot list is reset to top and drawn blank after switching back from Snapshot Comparison view
https://bugs.webkit.org/show_bug.cgi?id=158218
rdar://problem/26545000
Reviewed by Brian Burg.
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get scrollableElements): Added.
A default implementation for all cluster views.
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.get scrollableElements): Deleted.
This was duplicated in the class, removed one.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView): Initialize _snapshotListScrollTop.
(WebInspector.HeapAllocationsTimelineView.prototype.get scrollableElements): Added. Return elements
based on what is showing.
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList): Restore the scroll position
of the DataGrid after it is added to the view.
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord): Save the scroll position
of the DataGrid before it is removed from the view.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Deleted. Handled by the base class now.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (202931 => 202932)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-07-07 21:24:45 UTC (rev 202931)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-07-07 21:26:33 UTC (rev 202932)
@@ -1,3 +1,33 @@
+2016-07-07 Timothy Hatcher <[email protected]>
+
+ Web Inspector: scrolled Snapshot list is reset to top and drawn blank after switching back from Snapshot Comparison view
+ https://bugs.webkit.org/show_bug.cgi?id=158218
+ rdar://problem/26545000
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Views/ClusterContentView.js:
+ (WebInspector.ClusterContentView.prototype.get scrollableElements): Added.
+ A default implementation for all cluster views.
+
+ * UserInterface/Views/DOMStorageContentView.js:
+ (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Deleted.
+ This was duplicated in the class, removed one.
+
+ * UserInterface/Views/HeapAllocationsTimelineView.js:
+ (WebInspector.HeapAllocationsTimelineView): Initialize _snapshotListScrollTop.
+ (WebInspector.HeapAllocationsTimelineView.prototype.get scrollableElements): Added. Return elements
+ based on what is showing.
+
+ (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList): Restore the scroll position
+ of the DataGrid after it is added to the view.
+
+ (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord): Save the scroll position
+ of the DataGrid before it is removed from the view.
+
+ * UserInterface/Views/ScriptClusterTimelineView.js:
+ (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Deleted. Handled by the base class now.
+
2016-07-06 Timothy Hatcher <[email protected]>
Web Inspector: REGRESSION: Hitting ⌘T in Web Inspector no longer opens in new tab in Safari
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js (202931 => 202932)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js 2016-07-07 21:24:45 UTC (rev 202931)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js 2016-07-07 21:26:33 UTC (rev 202932)
@@ -97,6 +97,13 @@
this._contentViewContainer.goForward();
}
+ get scrollableElements()
+ {
+ if (!this._contentViewContainer.currentContentView)
+ return [];
+ return this._contentViewContainer.currentContentView.scrollableElements;
+ }
+
get selectionPathComponents()
{
if (!this._contentViewContainer.currentContentView)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js (202931 => 202932)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js 2016-07-07 21:24:45 UTC (rev 202931)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js 2016-07-07 21:26:33 UTC (rev 202932)
@@ -117,13 +117,6 @@
this._sortDataGrid();
}
- get scrollableElements()
- {
- if (!this._dataGrid)
- return [];
- return [this._dataGrid.scrollContainer];
- }
-
// Private
_truncateValue(value)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js (202931 => 202932)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js 2016-07-07 21:24:45 UTC (rev 202931)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js 2016-07-07 21:26:33 UTC (rev 202932)
@@ -77,6 +77,7 @@
this._baselineHeapSnapshotTimelineRecord = null;
this._heapSnapshotDiff = null;
+ this._snapshotListScrollTop = 0;
this._showingSnapshotList = true;
this._snapshotListPathComponent = new WebInspector.HierarchicalPathComponent(WebInspector.UIString("Snapshot List"), "snapshot-list-icon", "snapshot-list", false, false);
@@ -105,6 +106,15 @@
// Public
+ get scrollableElements()
+ {
+ if (this._showingSnapshotList)
+ return [this._dataGrid.scrollContainer];
+ if (this._contentViewContainer.currentContentView)
+ return this._contentViewContainer.currentContentView.scrollableElements;
+ return [];
+ }
+
showHeapSnapshotList()
{
if (this._showingSnapshotList)
@@ -118,6 +128,8 @@
this.removeSubview(this._contentViewContainer);
this.addSubview(this._dataGrid);
+ this._dataGrid.scrollContainer.scrollTop = this._snapshotListScrollTop;
+
this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
this.dispatchEventToListeners(WebInspector.ContentView.Event.NavigationItemsDidChange);
}
@@ -125,6 +137,7 @@
showHeapSnapshotTimelineRecord(heapSnapshotTimelineRecord)
{
if (this._showingSnapshotList) {
+ this._snapshotListScrollTop = this._dataGrid.scrollContainer.scrollTop;
this.removeSubview(this._dataGrid);
this.addSubview(this._contentViewContainer);
this._contentViewContainer.shown();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js (202931 => 202932)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js 2016-07-07 21:24:45 UTC (rev 202931)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js 2016-07-07 21:26:33 UTC (rev 202932)
@@ -71,7 +71,6 @@
set endTime(x) { this._contentViewContainer.currentContentView.endTime = x; }
get currentTime() { return this._contentViewContainer.currentContentView.currentTime; }
set currentTime(x) { this._contentViewContainer.currentContentView.currentTime = x; }
- get scrollableElements() { return this._contentViewContainer.currentContentView.scrollableElements; }
selectRecord(record) { this._contentViewContainer.currentContentView.selectRecord(record); }
updateFilter(filters) { return this._contentViewContainer.currentContentView.updateFilter(filters); }
filterDidChange() { return this._contentViewContainer.currentContentView.filterDidChange(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes