diff options
author | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 09:33:45 +0000 |
---|---|---|
committer | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 09:33:45 +0000 |
commit | a4293e8cb1774d1722922da0c04ff8d960d74b77 (patch) | |
tree | 02227a82ffdc91768694aeef17ce646c0f646238 | |
parent | 9ece372c8509a6b261ba3b068950e610a834f353 (diff) | |
download | chromium_src-a4293e8cb1774d1722922da0c04ff8d960d74b77.zip chromium_src-a4293e8cb1774d1722922da0c04ff8d960d74b77.tar.gz chromium_src-a4293e8cb1774d1722922da0c04ff8d960d74b77.tar.bz2 |
Revert 119011 - ui/list.js: prevent to set removed item to pinnedItem.
ensureAllItemSizesInCache() creates temporary list items and caches them, but temporary list items are removed from the list. Removed item is not belong to the list, so that it cannot be a pinnedItem.
BUG=none
TEST=manual
Review URL: http://codereview.chromium.org/9159016
TBR=yoshiki@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9271039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119041 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/resources/shared/js/cr/ui/list.js | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/chrome/browser/resources/shared/js/cr/ui/list.js b/chrome/browser/resources/shared/js/cr/ui/list.js index 6405011..8766f11 100644 --- a/chrome/browser/resources/shared/js/cr/ui/list.js +++ b/chrome/browser/resources/shared/js/cr/ui/list.js @@ -972,12 +972,6 @@ cr.define('cr.ui', function() { while (currentIndex < lastIndex) insert(this); - - - for (var i in newCachedItems) { - if (!newCachedItems[i].parentElement) - console.log("I'm hogehgoe! " + i); - } }, /** @@ -1089,10 +1083,7 @@ cr.define('cr.ui', function() { this.removeChild(this.pinnedItem_); this.pinnedItem_ = undefined; } - if (!this.pinnedItem_ && cachedItems[leadIndex] && - cachedItems[leadIndex].parentNode == this) { - this.pinnedItem_ = cachedItems[leadIndex]; - } + this.pinnedItem_ = this.pinnedItem_ || cachedItems[leadIndex]; this.mergeItems(firstIndex, lastIndex, cachedItems, newCachedItems); |