Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm |
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm |
index a8214d4425604dbd530206f7bfb07b08325878c4..6ba885e04741bd40c68c522c2f9f7110e6799b04 100644 |
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm |
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm |
@@ -598,6 +598,20 @@ NSMenuItem* PasteAndGoMenuItemForObserver( |
[[FindPasteboard sharedInstance] setFindText:[selection string]]; |
} |
+- (BOOL)isOpaque { |
+ // Even if you call -setDrawsBackground:NO, the background still gets drawn |
+ // when editing. This is a problem because the left edge of the background |
+ // overlaps the security decoration's hover rect. Return that the textview |
+ // is transparent, and follow up below by disabling any background drawing. |
+ // This will cause background drawing to fall through to the cell. See |
+ // https://crbug.com/669870 . |
+ return NO; |
+} |
+ |
+- (void)drawViewBackgroundInRect:(NSRect)aRect { |
+ // See the comment in -isOpaque. |
+} |
+ |
- (void)drawRect:(NSRect)rect { |
AutocompleteTextFieldObserver* observer = [self observer]; |
if (observer) |