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

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

Issue 401014: Merge 32115 - Mac: Draw entire Bookmark Bar every time to match API expectati... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 years, 1 month 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_toolbar_view.mm
===================================================================
--- chrome/browser/cocoa/bookmark_bar_toolbar_view.mm (revision 32225)
+++ chrome/browser/cocoa/bookmark_bar_toolbar_view.mm (working copy)
@@ -50,8 +50,18 @@
{
// CanvasPaint draws to the NSGraphicsContext during its destructor, so
// explicitly scope this.
- gfx::CanvasPaint canvas(rect, true);
- gfx::Rect area(0, 0, NSWidth(rect), NSHeight(rect));
+ //
+ // Paint the entire bookmark bar, even if the damage rect is much smaller
+ // because PaintBackgroundDetachedMode() assumes that area's origin is
+ // (0, 0) and that its size is the size of the bookmark bar.
+ //
+ // In practice, this sounds worse than it is because redraw time is still
+ // minimal compared to the pause between frames of animations. We were
+ // already repainting the rest of the bookmark bar below without setting a
+ // clip area, anyway. Also, the only time we weren't asked to redraw the
+ // whole bookmark bar is when the find bar is drawn over it.
+ gfx::CanvasPaint canvas(bounds, true);
+ gfx::Rect area(0, 0, NSWidth(bounds), NSHeight(bounds));
NtpBackgroundUtil::PaintBackgroundDetachedMode(themeProvider, &canvas,
area, [controller_ currentTabContentsHeight]);
« 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