| Index: content/renderer/render_widget.cc
|
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
| index ce3ba1b91f5e4a92107fe3ccd85d1509cc2fc38c..8f15ebf060edeb903452408c2be41c1de9a314b6 100644
|
| --- a/content/renderer/render_widget.cc
|
| +++ b/content/renderer/render_widget.cc
|
| @@ -1292,10 +1292,7 @@ void RenderWidget::UpdateInputMethod() {
|
|
|
| ui::TextInputType new_type = GetTextInputType();
|
| bool new_can_compose_inline = CanComposeInline();
|
| - WebRect new_caret_bounds;
|
| -
|
| - if (webwidget_)
|
| - new_caret_bounds = webwidget_->caretOrSelectionBounds();
|
| + WebRect new_caret_bounds = GetCaretBounds();
|
|
|
| // Only sends text input type and caret bounds to the browser process if they
|
| // are changed.
|
| @@ -1309,6 +1306,13 @@ void RenderWidget::UpdateInputMethod() {
|
| }
|
| }
|
|
|
| +gfx::Rect RenderWidget::GetCaretBounds() {
|
| + if (!webwidget_)
|
| + return gfx::Rect();
|
| + return webwidget_->caretOrSelectionBounds();
|
| +}
|
| +
|
| +// Check WebKit::WebTextInputType and ui::TextInputType is kept in sync.
|
| COMPILE_ASSERT(int(WebKit::WebTextInputTypeNone) == \
|
| int(ui::TEXT_INPUT_TYPE_NONE), mismatching_enums);
|
| COMPILE_ASSERT(int(WebKit::WebTextInputTypeText) == \
|
|
|