⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 202932 in webkit


Ignore:
Timestamp:
Jul 7, 2016, 2:26:33 PM (10 years ago)
Author:
timothy@apple.com
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.

Location:
trunk/Source/WebInspectorUI
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r202891 r202932  
     12016-07-07  Timothy Hatcher  <timothy@apple.com>
     2
     3        Web Inspector: scrolled Snapshot list is reset to top and drawn blank after switching back from Snapshot Comparison view
     4        https://bugs.webkit.org/show_bug.cgi?id=158218
     5        rdar://problem/26545000
     6
     7        Reviewed by Brian Burg.
     8
     9        * UserInterface/Views/ClusterContentView.js:
     10        (WebInspector.ClusterContentView.prototype.get scrollableElements): Added.
     11        A default implementation for all cluster views.
     12
     13        * UserInterface/Views/DOMStorageContentView.js:
     14        (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Deleted.
     15        This was duplicated in the class, removed one.
     16
     17        * UserInterface/Views/HeapAllocationsTimelineView.js:
     18        (WebInspector.HeapAllocationsTimelineView): Initialize _snapshotListScrollTop.
     19        (WebInspector.HeapAllocationsTimelineView.prototype.get scrollableElements): Added. Return elements
     20        based on what is showing.
     21
     22        (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList): Restore the scroll position
     23        of the DataGrid after it is added to the view.
     24
     25        (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord): Save the scroll position
     26        of the DataGrid before it is removed from the view.
     27
     28        * UserInterface/Views/ScriptClusterTimelineView.js:
     29        (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Deleted. Handled by the base class now.
     30
    1312016-07-06  Timothy Hatcher  <timothy@apple.com>
    232
  • trunk/Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js

    r192086 r202932  
    9898    }
    9999
     100    get scrollableElements()
     101    {
     102        if (!this._contentViewContainer.currentContentView)
     103            return [];
     104        return this._contentViewContainer.currentContentView.scrollableElements;
     105    }
     106
    100107    get selectionPathComponents()
    101108    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js

    r202133 r202932  
    118118    }
    119119
    120     get scrollableElements()
    121     {
    122         if (!this._dataGrid)
    123             return [];
    124         return [this._dataGrid.scrollContainer];
    125     }
    126 
    127120    // Private
    128121
  • trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js

    r202383 r202932  
    7878        this._heapSnapshotDiff = null;
    7979
     80        this._snapshotListScrollTop = 0;
    8081        this._showingSnapshotList = true;
    8182
     
    106107    // Public
    107108
     109    get scrollableElements()
     110    {
     111        if (this._showingSnapshotList)
     112            return [this._dataGrid.scrollContainer];
     113        if (this._contentViewContainer.currentContentView)
     114            return this._contentViewContainer.currentContentView.scrollableElements;
     115        return [];
     116    }
     117
    108118    showHeapSnapshotList()
    109119    {
     
    119129        this.addSubview(this._dataGrid);
    120130
     131        this._dataGrid.scrollContainer.scrollTop = this._snapshotListScrollTop;
     132
    121133        this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
    122134        this.dispatchEventToListeners(WebInspector.ContentView.Event.NavigationItemsDidChange);
     
    126138    {
    127139        if (this._showingSnapshotList) {
     140            this._snapshotListScrollTop = this._dataGrid.scrollContainer.scrollTop;
    128141            this.removeSubview(this._dataGrid);
    129142            this.addSubview(this._contentViewContainer);
  • trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js

    r200947 r202932  
    7272    get currentTime() { return this._contentViewContainer.currentContentView.currentTime; }
    7373    set currentTime(x) { this._contentViewContainer.currentContentView.currentTime = x; }
    74     get scrollableElements() { return this._contentViewContainer.currentContentView.scrollableElements; }
    7574    selectRecord(record) { this._contentViewContainer.currentContentView.selectRecord(record); }
    7675    updateFilter(filters) { return this._contentViewContainer.currentContentView.updateFilter(filters); }
Note: See TracChangeset for help on using the changeset viewer.