WebCore:
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2007 19:05:55 +0000 (19:05 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2007 19:05:55 +0000 (19:05 +0000)
commit639b30cc71286ef614e0dea5b8b3d4ace80ea2e8
treeac17ae3d935a346e6f2cff20c97ea1907f697ef7
parent508ec803991354d0d3393949f968277cf4dde237
WebCore:

        Reviewed by Oliver.

        Fix for <rdar://problem/5586370> CSS Transform - incorrect matrix
        math leads to crazy problems

        Transform matrices accept the first four parameters as CSS lengths.
        CSS lengths get mapped into WebCore::Lengths as percents by
        WebCore::convertToLength(). Percent lengths cannot call value(). It
        does not yield a correct result and it asserts on Debug builds.

        * rendering/RenderStyle.h:
        (WebCore::MatrixTransformOperation::apply): Instead of calling
        value() on the lengths, call calcValue. This fixes the assert and
        the bad rendering.

LayoutTests:

        Reviewed by Oliver.

        Test for <rdar://problem/5586370> CSS Transform - incorrect matrix
        math leads to crazy problems

        * fast/transforms/identity-matrix.html: Added.
        * platform/mac/fast/transforms/identity-matrix-expected.checksum: Added.
        * platform/mac/fast/transforms/identity-matrix-expected.png: Added.
        * platform/mac/fast/transforms/identity-matrix-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/transforms/identity-matrix.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/identity-matrix-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/identity-matrix-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/identity-matrix-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderStyle.h