diff options
author | George Mount <mount@google.com> | 2012-08-15 07:45:26 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-15 07:45:27 -0700 |
commit | a04673be6f4b2022f86ac53bdf124f7b4da515bb (patch) | |
tree | c8005f7f313ffa47766cce24a9d12aa78c6c2777 /Source | |
parent | 682a85cb3ff0b200d4fe0f7ef41a4e1c57dea233 (diff) | |
parent | 55f4533e6fc4f50a0ac57b1b180276d679aa04fc (diff) | |
download | external_webkit-a04673be6f4b2022f86ac53bdf124f7b4da515bb.zip external_webkit-a04673be6f4b2022f86ac53bdf124f7b4da515bb.tar.gz external_webkit-a04673be6f4b2022f86ac53bdf124f7b4da515bb.tar.bz2 |
Merge "Use content size for scroll width calculation." into jb-mr1-dev
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 5 |
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()); } |