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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 941523002: Rename: background_is_transparent -> subpixel_rendering_enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win fix Created 5 years, 10 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 | « ui/gfx/render_text_harfbuzz.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 87b053e030ae3096e57f8a646563e4a9eaae25e8..3cef41a6d2409317ed1ec45cd328433d413e6c5f 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1648,7 +1648,11 @@ void Textfield::AccessibilitySetValue(const base::string16& new_value) {
void Textfield::UpdateBackgroundColor() {
const SkColor color = GetBackgroundColor();
set_background(Background::CreateSolidBackground(color));
- GetRenderText()->set_background_is_transparent(SkColorGetA(color) != 0xFF);
+ // Disable subpixel rendering when the background color is transparent
+ // because it draws incorrect colors around the glyphs in that case.
+ // See crbug.com/115198
+ GetRenderText()->set_subpixel_rendering_suppressed(
+ SkColorGetA(color) != 0xFF);
SchedulePaint();
}
« no previous file with comments | « ui/gfx/render_text_harfbuzz.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698