Index: webkit/glue/webview_impl.cc |
=================================================================== |
--- webkit/glue/webview_impl.cc (revision 9719) |
+++ webkit/glue/webview_impl.cc (working copy) |
@@ -1183,7 +1183,10 @@ |
return false; |
*enable_ime = node->shouldUseInputMethod() && |
!controller->isInPasswordField(); |
- const IntRect rect(controller->absoluteCaretBounds()); |
+ const FrameView* view = node->document()->view(); |
+ if (!view) |
+ return false; |
+ const IntRect rect(view->contentsToWindow(controller->absoluteCaretBounds())); |
caret_rect->SetRect(rect.x(), rect.y(), rect.width(), rect.height()); |
return true; |
} |