Changeset 200947 in webkit
- Timestamp:
- May 16, 2016, 10:41:41 AM (9 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebInspectorUI/ChangeLog ¶
r200918 r200947 1 2016-05-14 Timothy Hatcher <timothy@apple.com> 2 3 Web Inspector: Many DataGrid instances do not save/restore their scroll position 4 https://bugs.webkit.org/show_bug.cgi?id=157709 5 rdar://problem/26286090 6 7 Reviewed by Brian Burg. 8 9 * UserInterface/Models/BackForwardEntry.js: 10 (WebInspector.BackForwardEntry.prototype.makeCopy): Added. 11 * UserInterface/Views/ContentViewContainer.js: 12 (WebInspector.ContentViewContainer.prototype.showContentView): Copy the last entry for the view. 13 * UserInterface/Views/DOMStorageContentView.js: 14 (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Added. 15 * UserInterface/Views/HeapSnapshotContentView.js: 16 (WebInspector.HeapSnapshotContentView.prototype.get scrollableElements): Added. 17 * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js: 18 (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get scrollableElements): Added. 19 * UserInterface/Views/MemoryTimelineView.js: 20 (WebInspector.MemoryTimelineView.prototype.get scrollableElements): Added. 21 * UserInterface/Views/ProfileView.js: 22 (WebInspector.ProfileView.prototype.get scrollableElements): Added. 23 (WebInspector.ProfileView.prototype._repopulateDataGridFromTree): Removed unused skipRefresh argument. 24 * UserInterface/Views/ScriptClusterTimelineView.js: 25 (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Added. 26 * UserInterface/Views/ScriptProfileTimelineView.js: 27 (WebInspector.ScriptProfileTimelineView.prototype.get scrollableElements): Added. 28 * UserInterface/Views/TimelineView.js: 29 (WebInspector.TimelineView.prototype.get scrollableElements): Added. 30 1 31 2016-05-14 Nikita Vasilyev <nvasilyev@apple.com> 2 32 -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Models/BackForwardEntry.js ¶
r196508 r200947 46 46 47 47 // Public 48 49 makeCopy(newCookie) 50 { 51 let copy = new WebInspector.BackForwardEntry(this._contentView, newCookie || this.cookie); 52 copy._tombstone = this._tombstone; 53 copy._scrollPositions = this._scrollPositions.slice(); 54 return copy; 55 } 48 56 49 57 get contentView() -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js ¶
r196508 r200947 89 89 this._takeOwnershipOfContentView(contentView); 90 90 91 var currentEntry = this.currentBackForwardEntry; 92 var provisionalEntry = new WebInspector.BackForwardEntry(contentView, cookie); 91 let currentEntry = this.currentBackForwardEntry; 92 93 // Try to find the last entry with the same content view so we can copy it 94 // to preserve the last scroll positions. The supplied cookie (if any) could 95 // still change the scroll position afterwards, but in most cases the cookie 96 // is undefined, so we want to show with a state last used. 97 let provisionalEntry = null; 98 for (let i = this._backForwardList.length - 1; i >= 0; --i) { 99 if (this._backForwardList[i].contentView === contentView) { 100 provisionalEntry = this._backForwardList[i].makeCopy(cookie); 101 break; 102 } 103 } 104 105 if (!provisionalEntry) 106 provisionalEntry = new WebInspector.BackForwardEntry(contentView, cookie); 107 93 108 // Don't do anything if we would have added an identical back/forward list entry. 94 109 if (currentEntry && currentEntry.contentView === contentView && Object.shallowEqual(provisionalEntry.cookie, currentEntry.cookie)) { … … 102 117 103 118 // Increment the current index to where we will insert the content view. 104 varnewIndex = this._currentIndex + 1;119 let newIndex = this._currentIndex + 1; 105 120 106 121 // Insert the content view at the new index. This will remove any content views greater than or equal to the index. 107 varremovedEntries = this._backForwardList.splice(newIndex, this._backForwardList.length - newIndex, provisionalEntry);122 let removedEntries = this._backForwardList.splice(newIndex, this._backForwardList.length - newIndex, provisionalEntry); 108 123 109 124 console.assert(newIndex === this._backForwardList.length - 1); … … 111 126 112 127 // Disassociate with the removed content views. 113 for ( vari = 0; i < removedEntries.length; ++i) {128 for (let i = 0; i < removedEntries.length; ++i) { 114 129 // Skip disassociation if this content view is still in the back/forward list. 115 varshouldDissociateContentView = !this._backForwardList.some(function(existingEntry) {130 let shouldDissociateContentView = !this._backForwardList.some(function(existingEntry) { 116 131 return existingEntry.contentView === removedEntries[i].contentView; 117 132 }); -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js ¶
r196342 r200947 61 61 } 62 62 63 get scrollableElements() 64 { 65 return [this._dataGrid.scrollContainer]; 66 } 67 63 68 itemsCleared(event) 64 69 { -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotContentView.js ¶
r200474 r200947 64 64 65 65 this._heapSnapshotDataGridTree.hidden(); 66 } 67 68 get scrollableElements() 69 { 70 return [this._dataGrid.scrollContainer]; 66 71 } 67 72 -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.js ¶
r199747 r200947 102 102 } 103 103 104 get scrollableElements() 105 { 106 return [this._dataGrid.scrollContainer]; 107 } 108 104 109 // Private 105 110 -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js ¶
r200708 r200947 152 152 } 153 153 154 get scrollableElements() 155 { 156 return [this.element]; 157 } 158 154 159 // Protected 155 160 -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js ¶
r200873 r200947 108 108 } 109 109 110 get scrollableElements() 111 { 112 return [this._dataGrid.scrollContainer]; 113 } 114 110 115 // Protected 111 116 … … 143 148 } 144 149 145 _repopulateDataGridFromTree( skipRefresh)150 _repopulateDataGridFromTree() 146 151 { 147 152 this._dataGrid.removeChildren(); -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js ¶
r200873 r200947 72 72 get currentTime() { return this._contentViewContainer.currentContentView.currentTime; } 73 73 set currentTime(x) { this._contentViewContainer.currentContentView.currentTime = x; } 74 74 get scrollableElements() { return this._contentViewContainer.currentContentView.scrollableElements; } 75 75 selectRecord(record) { this._contentViewContainer.currentContentView.selectRecord(record); } 76 76 updateFilter(filters) { return this._contentViewContainer.currentContentView.updateFilter(filters); } -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js ¶
r200873 r200947 62 62 63 63 // Public 64 65 get scrollableElements() { return this._profileView.scrollableElements; } 64 66 65 67 get showsLiveRecordingData() { return false; } -
TabularUnified trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js ¶
r200873 r200947 44 44 // Public 45 45 46 get scrollableElements() 47 { 48 if (!this._timelineDataGrid) 49 return []; 50 return [this._timelineDataGrid.scrollContainer]; 51 } 52 46 53 get showsLiveRecordingData() 47 54 {
Note:
See TracChangeset
for help on using the changeset viewer.