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

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

Issue 2610033003: [Mac] Prevent omnibox text bg from drawing over decoration, focus ring.
Patch Set: Created 3 years, 12 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
« 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 039eca8877e573123bdc5383c378acd9f5568446..422faee6961f818827a7a62aa5ff01b0753e8dd7 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
@@ -594,6 +594,20 @@ BOOL ThePasteboardIsTooDamnBig() {
[[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