summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-02-27 15:28:21 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-27 15:28:21 -0800
commit6753735b5cf1b2396d387b9f876a11a5fd2b3c3d (patch)
tree8d41427725d0a0c8567353446fe41385901e2f3d /Source/WebKit/android/WebCoreSupport
parent5015ffe477809860e6a9e05779afb1855aa994f2 (diff)
parenta3d6f6aedc8ed044682d65258bb964c64fc7511b (diff)
downloadexternal_webkit-6753735b5cf1b2396d387b9f876a11a5fd2b3c3d.zip
external_webkit-6753735b5cf1b2396d387b9f876a11a5fd2b3c3d.tar.gz
external_webkit-6753735b5cf1b2396d387b9f876a11a5fd2b3c3d.tar.bz2
Merge "Fix iframe webkit positioning"
Diffstat (limited to 'Source/WebKit/android/WebCoreSupport')
-rw-r--r--Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp12
1 files changed, 12 insertions, 0 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()