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