summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 06:51:56 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 06:51:56 +0000
commit79d59e7a514e31f17c65309b403f4cd6ebfecff5 (patch)
tree51450a7df8b1f80ce7e9560d159288e35a82def4
parentf6a36845aa046a261e6a777e3e313066f6c99460 (diff)
downloadchromium_src-79d59e7a514e31f17c65309b403f4cd6ebfecff5.zip
chromium_src-79d59e7a514e31f17c65309b403f4cd6ebfecff5.tar.gz
chromium_src-79d59e7a514e31f17c65309b403f4cd6ebfecff5.tar.bz2
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
-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;
}