Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1397)

Unified Diff: chrome/browser/cocoa/cookies_window_controller.mm

Issue 554151: [Mac] Reduce jank in the cookie manager by lazily creating child nodes for the UI. (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/cookies_window_controller.mm
diff --git a/chrome/browser/cocoa/cookies_window_controller.mm b/chrome/browser/cocoa/cookies_window_controller.mm
index c99753708abff7e633178f16785fea584953dc29..bb4e8a2f43925cec1089e3d37c32538b1ffcfe64 100644
--- a/chrome/browser/cocoa/cookies_window_controller.mm
+++ b/chrome/browser/cocoa/cookies_window_controller.mm
@@ -306,6 +306,13 @@ bool CookiesTreeModelObserverBridge::HasCocoaModel() {
children = [item childNodes];
DCHECK_EQ([children count], 1U);
[outlineView expandItem:[children lastObject]];
+ // Select the first node in that child set.
+ NSTreeNode* folderChild = [children lastObject];
+ if ([[folderChild childNodes] count] > 0) {
+ NSTreeNode* firstCookieChild =
+ [[folderChild childNodes] objectAtIndex:0];
+ [treeController_ setSelectionIndexPath:[firstCookieChild indexPath]];
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698