summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2012-02-24 09:57:16 -0800
committerMichael Kolb <kolby@google.com>2012-02-24 10:02:31 -0800
commitfc8059b4fc435c673ee9fd5ba93322ce1f3e95ab (patch)
tree9d255bcfc637a8b53312901a8923f3ab31c91374 /Source
parentf9d87a966c18062f6338b3997533ef48b82d8d0a (diff)
downloadexternal_webkit-fc8059b4fc435c673ee9fd5ba93322ce1f3e95ab.zip
external_webkit-fc8059b4fc435c673ee9fd5ba93322ce1f3e95ab.tar.gz
external_webkit-fc8059b4fc435c673ee9fd5ba93322ce1f3e95ab.tar.bz2
fix scrollable layer inside scrollable layer
Bug: 6065371 take the layer offset out of the transformation matrix used for the children. Change-Id: I464eda636df50c98e2042687c80f4a2c4a9bddc3
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/LayerAndroid.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
index 79c02eb..83fb414 100644
--- a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
@@ -685,13 +685,16 @@ void LayerAndroid::updateGLPositionsAndScale(const TransformationMatrix& parentM
// now apply it to our children
+ TransformationMatrix childMatrix;
+ childMatrix = localMatrix;
+ childMatrix.translate3d(m_offset.x(), m_offset.y(), 0);
if (!m_childrenTransform.isIdentity()) {
- localMatrix.translate(getSize().width() * 0.5f, getSize().height() * 0.5f);
- localMatrix.multiply(m_childrenTransform);
- localMatrix.translate(-getSize().width() * 0.5f, -getSize().height() * 0.5f);
+ childMatrix.translate(getSize().width() * 0.5f, getSize().height() * 0.5f);
+ childMatrix.multiply(m_childrenTransform);
+ childMatrix.translate(-getSize().width() * 0.5f, -getSize().height() * 0.5f);
}
for (int i = 0; i < count; i++)
- this->getChild(i)->updateGLPositionsAndScale(localMatrix, drawClip(), opacity, scale);
+ this->getChild(i)->updateGLPositionsAndScale(childMatrix, drawClip(), opacity, scale);
}
void LayerAndroid::setContentsImage(SkBitmapRef* img)