haikuwebkit/LayoutTests/svg/custom/rect-radius-length-initial-...

10 lines
409 B
XML
Raw Permalink Normal View History

Source/WebCore: [SVG2]: Add auto behavior for rx and ry to the SVG <ellipse> and<rect> elements https://bugs.webkit.org/show_bug.cgi?id=199843 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-19 Reviewed by Simon Fraser, Nikolas Zimmermann. The specification is: https://www.w3.org/TR/SVG2/geometry.html#RxProperty. Change the initial value of rx and ry to be "auto". Change the parser to parse LengthOrAuto for these properties. Handle the case if one of them is missing. Tests: svg/custom/ellipse-radius-auto-dynamic.svg svg/custom/ellipse-radius-auto-initial.svg svg/custom/ellipse-radius-length-initial.svg svg/custom/rect-radius-auto-dynamic.svg svg/custom/rect-radius-auto-initial.svg svg/custom/rect-radius-length-initial.svg * css/CSSProperties.json: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeRxOrRy): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::initialRadius): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): LayoutTests: [SVG2]: Add auto behavior for rx and ry to the SVG <ellipse> and <rect> elements https://bugs.webkit.org/show_bug.cgi?id=199843 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-09-19 Reviewed by Simon Fraser, Nikolas Zimmermann. Add tests which exercise the initial setting for rx and ry: length, 'auto'. Add tests to dynamically change the values of these properties from length to 'auto'. Skip the tests with dynamic changes till webkit.org/b/201918 is fixed. * TestExpectations: * svg/css/parse-length-expected.txt: * svg/css/parse-length.html: * svg/custom/ellipse-radius-auto-dynamic-expected.svg: Added. * svg/custom/ellipse-radius-auto-dynamic.svg: Added. * svg/custom/ellipse-radius-auto-initial-expected.svg: Added. * svg/custom/ellipse-radius-auto-initial.svg: Added. * svg/custom/ellipse-radius-length-initial-expected.svg: Added. * svg/custom/ellipse-radius-length-initial.svg: Added. * svg/custom/rect-radius-auto-dynamic-expected.svg: Added. * svg/custom/rect-radius-auto-dynamic.svg: Added. * svg/custom/rect-radius-auto-initial-expected.svg: Added. * svg/custom/rect-radius-auto-initial.svg: Added. * svg/custom/rect-radius-length-initial-expected.svg: Added. * svg/custom/rect-radius-length-initial.svg: Added. Canonical link: https://commits.webkit.org/215618@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-19 20:52:30 +00:00
<svg xmlns="http://www.w3.org/2000/svg">
<g id="rects">
<rect x="20" y="40" width="40" height="40" rx="20" fill="green"/>
<rect x="60" y="30" width="60" height="60" ry="30" fill="green"/>
<rect x="120" y="20" width="80" height="80" ry="40" fill="green"/>
<rect x="200" y="10" width="100" height="100" rx="50" fill="green"/>
</g>
<use y="100" href="#rects"/>
</svg>