Commit a1b553cb authored by battre@chromium.org's avatar battre@chromium.org

Fix missing entry showing number of cookies in first domain of chrome://settings/cookies


BUG=130759
TEST=check that the chrome://settings/cookies dialog continues to work as expected


Review URL: https://chromiumcodereview.appspot.com/10832224

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152309 0039d316-1c4b-4281-b951-d872f2087c98
parent 3b79f08c
...@@ -597,7 +597,30 @@ cr.define('options', function() { ...@@ -597,7 +597,30 @@ cr.define('options', function() {
// This allows the list items to be garbage collected when they scroll // This allows the list items to be garbage collected when they scroll
// out of view (except the expanded item, which we cache). This is // out of view (except the expanded item, which we cache). This is
// transparent except in the setter and getter, where we handle it. // transparent except in the setter and getter, where we handle it.
this.parent_ = parent.listIndex; if (this.parent_ == undefined || parent.listIndex != -1) {
// Setting the parent is somewhat tricky because the CookieListItem
// constructor has side-effects on the |origin| that it wraps. Every
// time a CookieListItem is created for an |origin|, it registers
// itself as the parent of the |origin|.
// The List implementation may create a temporary CookieListItem item
// that wraps the |origin| of the very first entry of the CokiesList,
// when the List is redrawn the first time. This temporary
// CookieListItem is fresh (has listIndex = -1) and is never inserted
// into the List. Therefore it gets never updated. This destroys the
// chain of parent pointers.
// This is the stack trace:
// CookieListItem
// CookiesList.createItem
// List.measureItem
// List.getDefaultItemSize_
// List.getDefaultItemHeight_
// List.getIndexForListOffset_
// List.getItemsInViewPort
// List.redraw
// List.endBatchUpdates
// CookiesList.loadChildren
this.parent_ = parent.listIndex;
}
this.list_ = parent.list; this.list_ = parent.list;
parent.addEventListener('listIndexChange', parent.addEventListener('listIndexChange',
this.parentIndexChanged_.bind(this)); this.parentIndexChanged_.bind(this));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment