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

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

Issue 185013: [Mac] Drop shadow for Omnibox popup. (Closed)
Patch Set: Oops, another CL masked something. Created 11 years, 3 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/toolbar_controller.mm
diff --git a/chrome/browser/cocoa/toolbar_controller.mm b/chrome/browser/cocoa/toolbar_controller.mm
index f3c7b136d70bcd3dd5444f09f3d8316ae7f4ad6b..c1b66b4114057d5ff4f920c20d8852f20f89a9d2 100644
--- a/chrome/browser/cocoa/toolbar_controller.mm
+++ b/chrome/browser/cocoa/toolbar_controller.mm
@@ -446,14 +446,15 @@ class PrefObserverBridge : public NotificationObserver {
// The popup should span from the left edge of the star button to the right
// edge of the go button. The returned height is ignored.
NSRect locationFrame = [locationBar_ frame];
- int minX = NSMinX([starButton_ frame]);
- int maxX = NSMaxX([goButton_ frame]);
+ // TODO(shess): The buttons have an extra 2 pixels between the edge
+ // of the visual button and the edge of the logical button. This
+ // seems wrong.
+ int minX = NSMinX([starButton_ frame]) + 2.0;
+ int maxX = NSMaxX([goButton_ frame]) - 2.0;
DCHECK(minX < NSMinX(locationFrame));
DCHECK(maxX > NSMaxX(locationFrame));
- // TODO(shess): The + 1.0 is because the field's visual boundary
- // differs from its on-screen boundary.
- NSRect r = NSMakeRect(minX, NSMinY(locationFrame) + 1.0, maxX - minX, 0);
+ NSRect r = NSMakeRect(minX, NSMinY(locationFrame), maxX - minX, 0);
return gfx::Rect(NSRectToCGRect([[self view] convertRect:r toView:nil]));
}
@end

Powered by Google App Engine
This is Rietveld 408576698