getComputedStyle returns wrong value for CSS3 2D transformations
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 17:23:20 +0000 (17:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 17:23:20 +0000 (17:23 +0000)
commitf51e7233a31ced3d985539e97222081cb45efdfa
treeeadda4055f7f1bccc99dcc08396f333f2c911ab2
parent29058a78a9ff35434ae9c1343220ab6db32eb275
getComputedStyle returns wrong value for CSS3 2D transformations
https://bugs.webkit.org/show_bug.cgi?id=94211

Patch by Alexander Shalamov <alexander.shalamov@intel.com> on 2012-08-23
Reviewed by Simon Fraser.

Source/WebCore:

When computed style is calculated for CSS3 2D transformation, content
box size is used. According to W3C specification, object's bounding
box should be used. This patch fixes transformation matrix calculation.

Layout tests getComputedStyle-transform.html and computed-style-origin.html
were modified to test changes.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computedTransform):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::pixelSnappedSizingBox): Removed unused method

LayoutTests:

This change fixes getComputedStyle-transform.html test.
Before this change, the test doesn't do anything.
When new transformation value is set, it immediately read
back as an old value, thus computed style is equal to
an old style. Moreover, expected result is never checked.
Added new test case to computed-style-origin.html layout test.

* fast/css/getComputedStyle/getComputedStyle-transform-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-transform.html:
* transforms/2d/computed-style-origin-expected.txt:
* transforms/2d/computed-style-origin.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/getComputedStyle/getComputedStyle-transform-expected.txt
LayoutTests/fast/css/getComputedStyle/getComputedStyle-transform.html
LayoutTests/transforms/2d/computed-style-origin-expected.txt
LayoutTests/transforms/2d/computed-style-origin.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp