haikuwebkit/LayoutTests/svg/custom/image-width-height-auto-ini...

11 lines
487 B
XML
Raw Permalink Normal View History

[SVG2]: Add 'auto' behavior to the 'width' and 'height' properties of the SVG <image> element https://bugs.webkit.org/show_bug.cgi?id=202013 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-10-21 Reviewed by Simon Fraser. LayoutTests/imported/w3c: * web-platform-tests/svg/geometry/svg-image-intrinsic-size-with-cssstyle-auto-dynamic-image-change-expected.txt: * web-platform-tests/svg/geometry/svg-image-intrinsic-size-with-cssstyle-auto-expected.txt: Source/WebCore: The spec page is: https://www.w3.org/TR/SVG/geometry.html#Sizing Handle the case if the 'width' or the 'height' of an SVG <image> or both are missing. Tests: svg/custom/image-width-height-auto-dynamic.svg svg/custom/image-width-height-auto-initial.svg svg/custom/image-width-height-length-initial.svg * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::calculateObjectBoundingBox const): (WebCore::RenderSVGImage::updateImageViewport): * rendering/svg/RenderSVGImage.h: LayoutTests: * svg/custom/image-width-height-auto-dynamic-expected.svg: Added. * svg/custom/image-width-height-auto-dynamic.svg: Added. * svg/custom/image-width-height-auto-initial-expected.svg: Added. * svg/custom/image-width-height-auto-initial.svg: Added. * svg/custom/image-width-height-length-initial-expected.svg: Added. * svg/custom/image-width-height-length-initial.svg: Added. * svg/custom/resources/100x200-green.png: Added. Canonical link: https://commits.webkit.org/216616@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-21 20:25:49 +00:00
<svg xmlns="http://www.w3.org/2000/svg">
<rect id="rect-1" x="10" y="10" width="50" height="100" fill="green"/>
<rect id="rect-2" x="110" y="10" width="50" height="100" fill="green"/>
<rect id="rect-3" x="210" y="10" width="50" height="100" fill="green"/>
<rect id="rect-4" x="310" y="10" width="50" height="100" fill="green"/>
<use y="110" href="#rect-1"/>
<use y="110" href="#rect-2"/>
<use y="110" href="#rect-3"/>
<use y="110" href="#rect-4"/>
</svg>