WebCore:
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Nov 2007 06:31:28 +0000 (06:31 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Nov 2007 06:31:28 +0000 (06:31 +0000)
commit4076e88d076d133088c23432a1890baa818de6aa
treeac5afff38b519bb8fdd0079e4b7cd7dd452a6b86
parentf03474c973d41d01d1ac7edd8570947a8b303c8d
WebCore:

        Reviewed by Oliver.

        Fix for <rdar://problem/5616052> SVGs with width or height of 100%
        hang when used as a background-image (16164)

        * platform/graphics/svg/SVGImage.cpp:
        (WebCore::SVGImage::size): Use valueAsPercentage() for percents
        instead of valueInSpecifiedUnits(). valueInSpecifiedUnits()
        returns, for example, 50 for 50%, so multiplying percentages by the
        default size of 300 x 150 led to ridiculously huge dimensions for
        SVG images, and the subsequent hang.

LayoutTests:

        Reviewed by Oliver.

        Test for <rdar://problem/5616052> SVGs with width or height of 100%
        hang when used as a background-image (16164)

        * fast/images/resources/width-100-percent.svg: Added.
        * fast/images/svg-width-100p-as-background.html: Added.
        * platform/mac/fast/images/svg-width-100p-as-background-expected.checksum: Added.
        * platform/mac/fast/images/svg-width-100p-as-background-expected.png: Added.
        * platform/mac/fast/images/svg-width-100p-as-background-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/images/resources/width-100-percent.svg [new file with mode: 0644]
LayoutTests/fast/images/svg-width-100p-as-background.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/svg-width-100p-as-background-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/svg-width-100p-as-background-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/svg-width-100p-as-background-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/graphics/svg/SVGImage.cpp