summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 3324bfd..fd5e9c4 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -3006,7 +3006,7 @@ void WebViewCore::scrollFocusedTextInput(float xPercent, int y)
}
int x = (int)round(xPercent * (renderText->scrollWidth() -
- renderText->clientWidth()));
+ renderText->contentWidth()));
renderText->setScrollLeft(x);
renderText->setScrollTop(y);
focus->document()->frame()->selection()->recomputeCaretRect();
@@ -3417,6 +3417,9 @@ WebCore::IntRect WebViewCore::absoluteClientRect(WebCore::Node* node,
RenderBox* renderBox = toRenderBox(render);
clientRect = renderBox->clientBoxRect();
+ IntRect contentBox = renderBox->contentBoxRect();
+ clientRect.setX(contentBox.x());
+ clientRect.setWidth(contentBox.width());
FloatPoint absPos = renderBox->localToAbsolute(FloatPoint());
clientRect.move(absPos.x() - offset.x(), absPos.y() - offset.y());
}