diff options
| author | Teng-Hui Zhu <ztenghui@google.com> | 2011-01-05 09:19:00 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-05 09:19:00 -0800 |
| commit | e4f41dc72cc58f16703b884ab3036bfa62b9a714 (patch) | |
| tree | f0afa21bc4842deb85036408347b0cbf5fbb9922 /WebCore | |
| parent | 350d99c7fa570aa943f3f142a4b279b9c1cc97b9 (diff) | |
| parent | cfd55bfb8f35d19b1b6e16bfab7df8df384304ac (diff) | |
| download | external_webkit-e4f41dc72cc58f16703b884ab3036bfa62b9a714.zip external_webkit-e4f41dc72cc58f16703b884ab3036bfa62b9a714.tar.gz external_webkit-e4f41dc72cc58f16703b884ab3036bfa62b9a714.tar.bz2 | |
Merge "clip rect fix for iframe when GL on"
Diffstat (limited to 'WebCore')
| -rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index 49cd4ca..91e38e5 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -475,13 +475,13 @@ void LayerAndroid::updatePositions() void LayerAndroid::updateGLPositions(const TransformationMatrix& parentMatrix, const FloatRect& clipping, float opacity) { - IntSize bounds(getSize().width(), getSize().height()); + IntSize layerSize(getSize().width(), getSize().height()); FloatPoint anchorPoint(getAnchorPoint().fX, getAnchorPoint().fY); FloatPoint position(getPosition().fX, getPosition().fY); - float centerOffsetX = (0.5f - anchorPoint.x()) * bounds.width(); - float centerOffsetY = (0.5f - anchorPoint.y()) * bounds.height(); - float originX = anchorPoint.x() * bounds.width(); - float originY = anchorPoint.y() * bounds.height(); + float centerOffsetX = (0.5f - anchorPoint.x()) * layerSize.width(); + float centerOffsetY = (0.5f - anchorPoint.y()) * layerSize.height(); + float originX = anchorPoint.x() * layerSize.width(); + float originY = anchorPoint.y() * layerSize.height(); TransformationMatrix localMatrix = parentMatrix; localMatrix.translate3d(originX + position.x(), originY + position.y(), @@ -501,10 +501,8 @@ void LayerAndroid::updateGLPositions(const TransformationMatrix& parentMatrix, setDrawOpacity(opacity); if (m_haveClip) { - FloatRect clip; - clip.setLocation(p); - clip.setWidth(getSize().width()); - clip.setHeight(getSize().height()); + FloatRect clip = (FloatRect) bounds(); + clip.intersect(clipping); setDrawClip(clip); } else { setDrawClip(clipping); |
