| Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
|
| index b59b0e7829d0be9250136344ea6851260b6a3afb..d210b5870c2acf13397f0f62f4fc5ed36ede4d42 100644
|
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
|
| @@ -787,6 +787,7 @@ struct LayoutMetrics {
|
| CGFloat windowWidth = buttonWidth + padding_;
|
| NSPoint newWindowTopLeft = [self windowTopLeftForWidth:windowWidth
|
| height:height];
|
| +
|
| // Make sure as much of a submenu is exposed (which otherwise would be a
|
| // problem if the parent button is close to the bottom of the screen).
|
| if ([parentController_ isKindOfClass:[self class]]) {
|
| @@ -795,16 +796,26 @@ struct LayoutMetrics {
|
| height;
|
| newWindowTopLeft.y = MAX(newWindowTopLeft.y, minimumY);
|
| }
|
| +
|
| NSWindow* window = [self window];
|
| NSRect windowFrame = NSMakeRect(newWindowTopLeft.x,
|
| newWindowTopLeft.y - height,
|
| windowWidth, height);
|
| [window setFrame:windowFrame display:NO];
|
| +
|
| NSRect folderFrame = NSMakeRect(0, 0, windowWidth, height);
|
| [folderView_ setFrame:folderFrame];
|
| +
|
| + // For some reason, when opening a "large" bookmark folder (containing 12 or
|
| + // more items) using the keyboard, the scroll view seems to want to be
|
| + // offset by default: [ http://crbug.com/101099 ]. Explicitly reseting the
|
| + // scroll position here is a bit hacky, but it does seem to work.
|
| + [[scrollView_ contentView] scrollToPoint:NSMakePoint(0, 0)];
|
| +
|
| NSSize newSize = NSMakeSize(windowWidth, 0.0);
|
| [self adjustWindowLeft:newWindowTopLeft.x size:newSize scrollingBy:0.0];
|
| [self configureWindowLevel];
|
| +
|
| [window display];
|
| }
|
|
|
|
|