summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/webview_impl.cc')
-rw-r--r--webkit/glue/webview_impl.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index a4678da..5e7fbf3 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -1130,7 +1130,7 @@ bool WebViewImpl::ImeUpdateStatus(bool* enable_ime,
const Editor* editor = focused->editor();
if (!editor || !editor->canEdit())
return false;
- const SelectionController* controller = focused->selection();
+ SelectionController* controller = focused->selection();
if (!controller)
return false;
const Node* node = controller->start().node();
@@ -1138,10 +1138,7 @@ bool WebViewImpl::ImeUpdateStatus(bool* enable_ime,
return false;
*enable_ime = node->shouldUseInputMethod() &&
!controller->isInPasswordField();
- const FrameView* view = node->document()->view();
- if (!view)
- return false;
- const IntRect rect(view->contentsToWindow(controller->localCaretRect()));
+ const IntRect rect(controller->absoluteCaretBounds());
caret_rect->SetRect(rect.x(), rect.y(), rect.width(), rect.height());
return true;
}