| Index: content/browser/renderer_host/render_widget_host_view_aura.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| index 5991147c90829ff2176083ab224bce3e3859276d..8dd32e196267945a65260f17f775f9e19753f24a 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| @@ -1516,11 +1516,11 @@ bool RenderWidgetHostViewAura::HasCompositionText() const {
|
| }
|
|
|
| bool RenderWidgetHostViewAura::GetTextRange(gfx::Range* range) const {
|
| - if (!text_input_manager_)
|
| + if (!text_input_manager_ || !GetFocusedWidget())
|
| return false;
|
|
|
| const TextInputManager::TextSelection* selection =
|
| - text_input_manager_->GetTextSelection();
|
| + text_input_manager_->GetTextSelection(GetFocusedWidget()->GetView());
|
| if (!selection)
|
| return false;
|
|
|
| @@ -1537,11 +1537,11 @@ bool RenderWidgetHostViewAura::GetCompositionTextRange(
|
| }
|
|
|
| bool RenderWidgetHostViewAura::GetSelectionRange(gfx::Range* range) const {
|
| - if (!text_input_manager_)
|
| + if (!text_input_manager_ || !GetFocusedWidget())
|
| return false;
|
|
|
| const TextInputManager::TextSelection* selection =
|
| - text_input_manager_->GetTextSelection();
|
| + text_input_manager_->GetTextSelection(GetFocusedWidget()->GetView());
|
| if (!selection)
|
| return false;
|
|
|
| @@ -1565,11 +1565,11 @@ bool RenderWidgetHostViewAura::DeleteRange(const gfx::Range& range) {
|
| bool RenderWidgetHostViewAura::GetTextFromRange(
|
| const gfx::Range& range,
|
| base::string16* text) const {
|
| - if (!text_input_manager_)
|
| + if (!text_input_manager_ || !GetFocusedWidget())
|
| return false;
|
|
|
| const TextInputManager::TextSelection* selection =
|
| - text_input_manager_->GetTextSelection();
|
| + text_input_manager_->GetTextSelection(GetFocusedWidget()->GetView());
|
| if (!selection)
|
| return false;
|
|
|
|
|