diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 18:36:40 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 18:36:40 +0000 |
commit | 7b3cb4b2b70c3b03e9a2ad2e7215894f0c8d8b36 (patch) | |
tree | 7fdd22c13aac31c789a8d496ca87f09f3119d31c /views | |
parent | 69bddafc2b2d88c282f92ee69d747f247ed9b347 (diff) | |
download | chromium_src-7b3cb4b2b70c3b03e9a2ad2e7215894f0c8d8b36.zip chromium_src-7b3cb4b2b70c3b03e9a2ad2e7215894f0c8d8b36.tar.gz chromium_src-7b3cb4b2b70c3b03e9a2ad2e7215894f0c8d8b36.tar.bz2 |
Fix font and selection issues for RenderText temporary code.
Remove unnecessary gfx namespace specifiers.
This should restore the large font size, and render the cursor and selection in their correct positions.
BUG=90426
TEST=touchui omnibox text interaction.
Review URL: http://codereview.chromium.org/7540036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/textfield/native_textfield_views.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc index c8ec99f..acbb972 100644 --- a/views/controls/textfield/native_textfield_views.cc +++ b/views/controls/textfield/native_textfield_views.cc @@ -73,6 +73,7 @@ NativeTextfieldViews::NativeTextfieldViews(Textfield* parent) default_style.font = textfield_->font(); default_style.foreground = textfield_->text_color(); GetRenderText()->set_default_style(default_style); + GetRenderText()->ApplyDefaultStyle(); set_context_menu_controller(this); set_drag_controller(this); @@ -367,6 +368,12 @@ void NativeTextfieldViews::UpdateReadOnly() { } void NativeTextfieldViews::UpdateFont() { + // Update the default text style. + gfx::StyleRange default_style(GetRenderText()->default_style()); + default_style.font = textfield_->font(); + GetRenderText()->set_default_style(default_style); + GetRenderText()->ApplyDefaultStyle(); + OnCaretBoundsChanged(); } |