summaryrefslogtreecommitdiffstats
path: root/Source/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp12
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp3
2 files changed, 13 insertions, 2 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp
index 0a4d828..b684a1a 100644
--- a/Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp
+++ b/Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp
@@ -35,6 +35,8 @@
#include "KeyGeneratorClient.h"
#include "MemoryUsage.h"
#include "PluginView.h"
+#include "RenderLayer.h"
+#include "RenderView.h"
#include "Settings.h"
#include "WebCookieJar.h"
#include "WebRequestContext.h"
@@ -171,6 +173,16 @@ void PlatformBridge::setScrollPosition(ScrollView* scrollView, int x, int y) {
android::WebViewCore *webViewCore = android::WebViewCore::getWebViewCore(scrollView);
if (webViewCore->mainFrame()->view() == scrollView)
webViewCore->scrollTo(x, y);
+ else {
+ FrameView* frameView = scrollView->frameView();
+ if (frameView) {
+ RenderView* renderer = frameView->frame()->contentRenderer();
+ if (renderer) {
+ RenderLayer* layer = renderer->layer();
+ layer->scrollToOffset(x, y);
+ }
+ }
+ }
}
int PlatformBridge::lowMemoryUsageMB()
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 31e8506..b9a21de 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -4161,8 +4161,7 @@ void WebViewCore::scrollRenderLayer(int layer, const SkRect& rect)
if (!owner)
return;
- if (owner->stackingContext())
- owner->scrollToOffset(rect.fLeft, rect.fTop);
+ owner->scrollToOffset(rect.fLeft, rect.fTop);
#endif
}