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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm

Issue 2562863002: [Mac] Prevent omnibox text bg from drawing over decoration, focus ring. (Closed)
Patch Set: Created 4 years 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 | « chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698