WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jun 2008 16:55:13 +0000 (16:55 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jun 2008 16:55:13 +0000 (16:55 +0000)
commitf248058d38a62dc66e05153b342b8420fca69de1
tree6c5fad58424c9b608ea35ca25a4aa80fe6a33c58
parentd53ccb9caecdbbd2d6d9570636e5d6e757fd4cdf
WebCore:

        Reviewed by Darin Adler.

        - fix https://bugs.webkit.org/show_bug.cgi?id=19397
          REGRESSION (3.1-TOT): Box-shadow renders weird when rotating a div with border radius

        Test: fast/transforms/shadows.html

        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setPlatformShadow): In Core Graphics, shadow
        dimensions are always in device space. Account for that, and apply the
        current context transform to shadow offset, and multiply the blur radius
        by the inverse of the operator norm of the inverse transform (which is
        the radius of the circle inscribed in the transformed unit circle).
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::paintBoxShadow): Added 1px separation between
        the edge of the filled shape and the edge of the clipped-out shape,
        because in a transformed context, due to antialiasing, the fill can
        bleed into the clip if they touch.

LayoutTests:

        Reviewed by Darin Adler.

        - pixel test for https://bugs.webkit.org/show_bug.cgi?id=19397
          REGRESSION (3.1-TOT): Box-shadow renders weird when rotating a div with border radius

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/transforms/shadows.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/shadows-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/shadows-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/transforms/shadows-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/graphics/cg/GraphicsContextCG.cpp
WebCore/rendering/RenderObject.cpp