Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm |
=================================================================== |
--- chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (revision 152078) |
+++ chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (working copy) |
@@ -410,7 +410,6 @@ |
AutocompleteTextFieldCell* cell = [field_ cell]; |
NSRect frame = [cell frameForDecoration:decoration inFrame:[field_ bounds]]; |
- DCHECK(!NSIsEmptyRect(frame)); |
return frame; |
} |
@@ -421,8 +420,13 @@ |
return NSZeroPoint; |
NSRect frame = GetPageActionFrame(page_action); |
- if (NSIsEmptyRect(frame)) |
+ if (NSIsEmptyRect(frame)) { |
+ // The bubble point positioning assumes that the page action is visible. If |
+ // not, something else needs to be done otherwise the bubble will appear |
+ // near the top left corner (unanchored). |
+ NOTREACHED(); |
return NSZeroPoint; |
+ } |
NSPoint bubble_point = decoration->GetBubblePointInFrame(frame); |
return [field_ convertPoint:bubble_point toView:nil]; |