summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-02-22 12:29:40 -0800
committerNicolas Roard <nicolasroard@google.com>2012-02-27 15:01:52 -0800
commita3d6f6aedc8ed044682d65258bb964c64fc7511b (patch)
tree4eea449a7a38a093cd32e0e84502286b817a3c3f /Source/WebKit/android/WebCoreSupport
parentdfdb101465a930f38ec4294b0b8063c1f0f1bdbc (diff)
downloadexternal_webkit-a3d6f6aedc8ed044682d65258bb964c64fc7511b.zip
external_webkit-a3d6f6aedc8ed044682d65258bb964c64fc7511b.tar.gz
external_webkit-a3d6f6aedc8ed044682d65258bb964c64fc7511b.tar.bz2
Fix iframe webkit positioning
Change-Id: I7b2b3a7312c89bc505d7f629380df0d3f24eee5f
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 41c0222..8e4f56c 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"
@@ -199,6 +201,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()