Changeset 143209 in webkit
- Timestamp:
- Feb 18, 2013 6:10:27 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r143207 r143209 1 2013-02-18 Alexander Pavlov <apavlov@chromium.org> 2 3 Web Inspector: [Resources] Only remember the tree element selection if explicitly made by user 4 https://bugs.webkit.org/show_bug.cgi?id=110105 5 6 Reviewed by Pavel Feldman. 7 8 This change instructs the Resources panel to remember the selected tree element only if it has been 9 selected by the user (not automatically, like selecting a parent when its child is removed). 10 All onselect() overrides pass the selectedByUser argument value 11 to BaseStorageTreeElement.prototype.onselect. 12 Drive-by: Use === comparisons everywhere. 13 14 * inspector/front-end/ResourcesPanel.js: 15 (WebInspector.ResourcesPanel.prototype._reset): Do not detach [immutable] category views. 16 (WebInspector.BaseStorageTreeElement.prototype.onselect): Remember itemURL on user gesture only. 17 (WebInspector.StorageCategoryTreeElement.prototype.onselect): 18 (WebInspector.FrameTreeElement.prototype.onselect): 19 (WebInspector.FrameResourceTreeElement.prototype.onselect): 20 (WebInspector.DatabaseTreeElement.prototype.onselect): 21 (WebInspector.DatabaseTableTreeElement.prototype.onselect): 22 (WebInspector.IDBDatabaseTreeElement.prototype.onselect): 23 (WebInspector.IDBObjectStoreTreeElement.prototype.onselect): 24 (WebInspector.IDBIndexTreeElement.prototype.onselect): 25 (WebInspector.DOMStorageTreeElement): 26 (WebInspector.DOMStorageTreeElement.prototype.onselect): 27 (WebInspector.CookieTreeElement.prototype.onselect): 28 (WebInspector.ApplicationCacheManifestTreeElement.prototype.onselect): 29 (WebInspector.ApplicationCacheFrameTreeElement.prototype.onselect): 30 (WebInspector.FileSystemTreeElement.prototype.onselect): 31 (WebInspector.FileSystemTreeElement.prototype.clear): 32 (WebInspector.ResourcesSearchController.prototype.nextSearchResult): 33 1 34 2013-02-18 Vladislav Kaznacheev <kaznacheev@chromium.org> 2 35 -
trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js
r142161 r143209 194 194 this.cookieListTreeElement.removeChildren(); 195 195 196 if (this.visibleView )196 if (this.visibleView && !(this.visibleView instanceof WebInspector.StorageCategoryView)) 197 197 this.visibleView.detach(); 198 198 … … 934 934 }, 935 935 936 onselect: function() 937 { 936 onselect: function(selectedByUser) 937 { 938 if (!selectedByUser) 939 return; 938 940 var itemURL = this.itemURL; 939 941 if (itemURL) … … 996 998 }, 997 999 998 onselect: function( )999 { 1000 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1000 onselect: function(selectedByUser) 1001 { 1002 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1001 1003 this._storagePanel.showCategoryView(this._categoryName); 1002 1004 }, … … 1053 1055 }, 1054 1056 1055 onselect: function( )1056 { 1057 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1057 onselect: function(selectedByUser) 1058 { 1059 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1058 1060 this._storagePanel.showCategoryView(this.displayName); 1059 1061 … … 1161 1163 }, 1162 1164 1163 onselect: function( )1164 { 1165 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1165 onselect: function(selectedByUser) 1166 { 1167 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1166 1168 this._storagePanel._showResourceView(this._resource); 1167 1169 }, … … 1328 1330 }, 1329 1331 1330 onselect: function( )1331 { 1332 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1332 onselect: function(selectedByUser) 1333 { 1334 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1333 1335 this._storagePanel._showDatabase(this._database); 1334 1336 }, … … 1372 1374 }, 1373 1375 1374 onselect: function( )1375 { 1376 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1376 onselect: function(selectedByUser) 1377 { 1378 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1377 1379 this._storagePanel._showDatabase(this._database, this._tableName); 1378 1380 }, … … 1644 1646 }, 1645 1647 1646 onselect: function( )1647 { 1648 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1648 onselect: function(selectedByUser) 1649 { 1650 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1649 1651 if (!this._view) 1650 1652 this._view = new WebInspector.IDBDatabaseView(this._database); … … 1745 1747 }, 1746 1748 1747 onselect: function( )1748 { 1749 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1749 onselect: function(selectedByUser) 1750 { 1751 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1750 1752 if (!this._view) 1751 1753 this._view = new WebInspector.IDBDataView(this._model, this._databaseId, this._objectStore, null); … … 1825 1827 }, 1826 1828 1827 onselect: function( )1828 { 1829 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1829 onselect: function(selectedByUser) 1830 { 1831 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1830 1832 if (!this._view) 1831 1833 this._view = new WebInspector.IDBDataView(this._model, this._databaseId, this._objectStore, this._index); … … 1859 1861 }, 1860 1862 1861 onselect: function( )1862 { 1863 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1863 onselect: function(selectedByUser) 1864 { 1865 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1864 1866 this._storagePanel._showDOMStorage(this._domStorage); 1865 1867 }, … … 1884 1886 }, 1885 1887 1886 onselect: function( )1887 { 1888 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1888 onselect: function(selectedByUser) 1889 { 1890 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1889 1891 this._storagePanel.showCookies(this, this._cookieDomain); 1890 1892 }, … … 1916 1918 }, 1917 1919 1918 onselect: function( )1919 { 1920 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1920 onselect: function(selectedByUser) 1921 { 1922 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1921 1923 this._storagePanel.showCategoryView(this._manifestURL); 1922 1924 }, … … 1969 1971 }, 1970 1972 1971 onselect: function( )1972 { 1973 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );1973 onselect: function(selectedByUser) 1974 { 1975 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 1974 1976 this._storagePanel.showApplicationCache(this._frameId); 1975 1977 }, … … 2002 2004 }, 2003 2005 2004 onselect: function( )2005 { 2006 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this );2006 onselect: function(selectedByUser) 2007 { 2008 WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser); 2007 2009 this._fileSystemView = new WebInspector.FileSystemView(this._fileSystem); 2008 2010 this._storagePanel.showFileSystem(this._fileSystemView); … … 2011 2013 clear: function() 2012 2014 { 2013 if (this.fileSystemView && this._storagePanel.visibleView == this.fileSystemView)2015 if (this.fileSystemView && this._storagePanel.visibleView === this.fileSystemView) 2014 2016 this._storagePanel.closeVisibleView(); 2015 2017 }, … … 2069 2071 return this._searchResult(currentTreeElement, 0); 2070 2072 2071 if (this._lastIndex == currentTreeElement.searchMatchesCount - 1)2073 if (this._lastIndex === currentTreeElement.searchMatchesCount - 1) 2072 2074 return this._searchResult(this._traverser.next(currentTreeElement), 0, this._currentMatchIndex % this._matchesCount + 1); 2073 2075
Note: See TracChangeset
for help on using the changeset viewer.