| Index: chrome/browser/ui/cocoa/download/download_show_all_button.mm
|
| diff --git a/chrome/browser/ui/cocoa/download/download_show_all_button.mm b/chrome/browser/ui/cocoa/download/download_show_all_button.mm
|
| index 6a915433865bcc19b141c6fc23acfb0d18decdb5..df7ab45baa4aa732817fb2ff2b7b9e737cb4ba56 100644
|
| --- a/chrome/browser/ui/cocoa/download/download_show_all_button.mm
|
| +++ b/chrome/browser/ui/cocoa/download/download_show_all_button.mm
|
| @@ -44,7 +44,18 @@
|
|
|
| - (void)drawRect:(NSRect)rect {
|
| NSView* downloadShelfView = [self ancestorWithViewID:VIEW_ID_DOWNLOAD_SHELF];
|
| - [self cr_drawUsingAncestor:downloadShelfView inRect:rect];
|
| + // Previously the show all button used cr_drawUsingAncestor:inRect: to use
|
| + // the download shelf to draw its background. However when the download
|
| + // shelf has zero height, the shelf's drawing methods don't work as expected
|
| + // because they constrain their drawing to the shelf's bounds rect. This
|
| + // situation occurs sometimes when the shelf is about to become visible,
|
| + // and the result is a very dark show all button
|
| + //
|
| + // To work around this problem, we'll call a variant of that method which
|
| + // does restrict drawing to the ancestor view's bounds.
|
| + [self cr_drawUsingAncestor:downloadShelfView
|
| + inRect:rect
|
| + clippedToAncestorBounds:NO];
|
| [super drawRect:rect];
|
| }
|
|
|
|
|