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
-rw-r--r--Source/WebKit/android/nav/WebView.cpp4
3 files changed, 16 insertions, 3 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 6e899c2..e300976 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -4021,8 +4021,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
}
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 4a172ea..624a696 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -1428,8 +1428,10 @@ static void nativeOnTrimMemory(JNIEnv *env, jobject obj, jint level)
// Texture to avoid ANR b/c framework may destroy the EGL context.
// Refer to WindowManagerImpl.java for conditions we followed.
if (level >= TRIM_MEMORY_MODERATE
- && !TilesManager::instance()->highEndGfx())
+ && !TilesManager::instance()->highEndGfx()) {
TilesManager::instance()->transferQueue()->emptyQueue();
+ TilesManager::instance()->setContextChanged(true);
+ }
bool freeAllTextures = (level > TRIM_MEMORY_UI_HIDDEN), glTextures = true;
TilesManager::instance()->discardTextures(freeAllTextures, glTextures);