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

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

Issue 3027021: The scrollability of a bookmark menu should be reconsidered whenever there is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/bookmark_bar_folder_controller.mm
===================================================================
--- chrome/browser/cocoa/bookmark_bar_folder_controller.mm (revision 53429)
+++ chrome/browser/cocoa/bookmark_bar_folder_controller.mm (working copy)
@@ -393,15 +393,17 @@
// We'll scroll to allow the user to see all the content.
NSRect screenFrame = [[[self window] screen] frame];
screenFrame = NSInsetRect(screenFrame, 0, kScrollWindowVerticalMargin);
+ BOOL wasScrollable = scrollable_;
if (!NSContainsRect(screenFrame, windowFrame)) {
scrollable_ = YES;
windowFrame = NSIntersectionRect(screenFrame, windowFrame);
} else {
scrollable_ = NO;
}
- [[self window] setFrame:windowFrame display:YES];
+ NSWindow* window = [self window];
+ [window setFrame:windowFrame display:YES];
// If scrollable then offset the view and show the arrows.
- if (scrollable_) {
+ if (wasScrollable != scrollable_) {
[mainView_ scrollPoint:NSMakePoint(0, (NSHeight(mainViewFrame) -
NSHeight(windowFrame)))];
[self showOrHideScrollArrows];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698