From 79d59e7a514e31f17c65309b403f4cd6ebfecff5 Mon Sep 17 00:00:00 2001 From: "hbono@chromium.org" Date: Fri, 23 Jan 2009 06:51:56 +0000 Subject: A quick fix for "Issue 6252: Regression: IME candidate window showing far away from the input box". This issue is caused by a recent WebKit merge that changes the behavior of the ScrollView::contentsToWindow() function. To fix this issue, this change uses the SelectionController::absoluteCaretBounds() function instead of calling the ScrollView::contentsToWindow() function. BUG=6252 Review URL: http://codereview.chromium.org/17638 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8550 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/webview_impl.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'webkit/glue/webview_impl.cc') 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; } -- cgit v1.1