summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2011-03-02 09:34:43 -0500
committerCary Clark <cary@android.com>2011-03-02 09:45:34 -0500
commita069c0e2287c018552f58cd901306703986e3467 (patch)
tree11e49716a4f7642f19f415fd4f9ee6364bb9b8d8 /WebKit/android/jni
parent46319ccd782989cc691ea412e44cb4283d183ccb (diff)
downloadexternal_webkit-a069c0e2287c018552f58cd901306703986e3467.zip
external_webkit-a069c0e2287c018552f58cd901306703986e3467.tar.gz
external_webkit-a069c0e2287c018552f58cd901306703986e3467.tar.bz2
check for stacking context before scrolling layer
It doesn't make sense to scroll without a stacking context. bug:3494970 Change-Id: I59e951b3688aa21f5c99b16a953b6620b501442c
Diffstat (limited to 'WebKit/android/jni')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index a72864f..5744609 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -3680,7 +3680,10 @@ void WebViewCore::scrollRenderLayer(int layer, const SkRect& rect)
return;
RenderLayer* owner = target->owningLayer();
- if (owner)
+ if (!owner)
+ return;
+
+ if (owner->stackingContext())
owner->scrollToOffset(rect.fLeft, rect.fTop, true, false);
#endif
}