| Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
|
| index 7ff80b10a00d55880e8f95ed861a88da79901032..5fe826d00caa76757ce73e45d710b982fc26a091 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
|
| @@ -284,9 +284,23 @@ const CGFloat kAnimationDuration = 0.2;
|
| }
|
|
|
| - (NSPoint)bubblePointForDecoration:(LocationBarDecoration*)decoration {
|
| - const NSRect frame =
|
| - [[self cell] frameForDecoration:decoration inFrame:[self bounds]];
|
| - const NSPoint point = decoration->GetBubblePointInFrame(frame);
|
| + NSPoint point;
|
| + if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
|
| + // Under MD, dialogs have no arrow and anchor to corner of the decoration
|
| + // frame, not a specific point within it. See http://crbug.com/566115.
|
| + BOOL isLeftDecoration;
|
| + const NSRect frame =
|
| + [[self cell] backgroundFrameForDecoration:decoration
|
| + inFrame:[self bounds]
|
| + isLeftDecoration:&isLeftDecoration];
|
| + point.y = NSMaxY(frame);
|
| + point.x = isLeftDecoration ? NSMinX(frame) : NSMaxX(frame);
|
| + } else {
|
| + const NSRect frame =
|
| + [[self cell] frameForDecoration:decoration inFrame:[self bounds]];
|
| + point = decoration->GetBubblePointInFrame(frame);
|
| + }
|
| +
|
| return [self convertPoint:point toView:nil];
|
| }
|
|
|
|
|