Index: ui/views/controls/textfield/native_textfield_views.cc |
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc |
index be33761ea6edb6c20c4b2ca06e6899aecc5a94b7..19f4c9b28790e87bc516ce2d74ffa27833bff5db 100644 |
--- a/ui/views/controls/textfield/native_textfield_views.cc |
+++ b/ui/views/controls/textfield/native_textfield_views.cc |
@@ -441,10 +441,7 @@ void NativeTextfieldViews::UpdateBorderColor() { |
} |
void NativeTextfieldViews::UpdateTextColor() { |
- gfx::StyleRange default_style(GetRenderText()->default_style()); |
- default_style.foreground = textfield_->GetTextColor(); |
- GetRenderText()->set_default_style(default_style); |
- GetRenderText()->ApplyDefaultStyle(); |
+ GetRenderText()->SetColor(textfield_->GetTextColor()); |
Alexei Svitkine (slow)
2013/01/23 16:52:54
Nit: Just call SetColor(textfield_->GetTextColor()
msw
2013/01/25 09:10:02
Done.
|
SchedulePaint(); |
} |
@@ -698,13 +695,25 @@ void NativeTextfieldViews::ExecuteCommand(int command_id) { |
OnAfterUserAction(); |
} |
-void NativeTextfieldViews::ApplyStyleRange(const gfx::StyleRange& style) { |
- GetRenderText()->ApplyStyleRange(style); |
+void NativeTextfieldViews::SetColor(SkColor value) { |
+ GetRenderText()->SetColor(value); |
SchedulePaint(); |
} |
-void NativeTextfieldViews::ApplyDefaultStyle() { |
- GetRenderText()->ApplyDefaultStyle(); |
+void NativeTextfieldViews::ApplyColor(SkColor value, const ui::Range& range) { |
+ GetRenderText()->ApplyColor(value, range); |
+ SchedulePaint(); |
+} |
+ |
+void NativeTextfieldViews::SetStyle(gfx::TextStyle style, bool value) { |
+ GetRenderText()->SetStyle(style, value); |
+ SchedulePaint(); |
+} |
+ |
+void NativeTextfieldViews::ApplyStyle(gfx::TextStyle style, |
+ bool value, |
+ const ui::Range& range) { |
+ GetRenderText()->ApplyStyle(style, value, range); |
SchedulePaint(); |
} |