haikuwebkit/LayoutTests/svg/custom/use-transfer-width-height-p...

13 lines
465 B
XML
Raw Permalink Normal View History

2011-03-21 Leo Yang <leo.yang@torchmobile.com.cn> Reviewed by Dirk Schulze. symbol display <use> at wrong scale https://bugs.webkit.org/show_bug.cgi?id=54538 SVG spec: http://www.w3.org/TR/SVG/struct.html#UseElement Quotation for referenced <symbol>: "If attributes 'width' and/or 'height' are provided on the 'use' element, then these attributes will be transferred to the generated 'svg'." Quotation for referenced <svg>: "If attributes 'width' and/or 'height' are provided on the 'use' element, then these values will override the corresponding attributes on the 'svg' in the generated tree." For above quotations, we should treat 'use' element as referencing 'use' element, just like Firefox 3.6 and Opera 11, instead of corrensponding 'use' element. Tests: svg/custom/use-transfer-width-height-properties-to-svg.svg svg/custom/use-transfer-width-height-properties-to-svg1.svg svg/custom/use-transfer-width-height-properties-to-svg2.svg svg/custom/use-transfer-width-height-properties-to-symbol.svg svg/custom/use-transfer-width-height-properties-to-symbol1.svg svg/custom/use-transfer-width-height-properties-to-symbol2.svg * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::SVGElementInstance): * svg/SVGElementInstance.h: (WebCore::SVGElementInstance::create): (WebCore::SVGElementInstance::correspondingUseElement): (WebCore::SVGElementInstance::directUseElement): (WebCore::SVGElementInstance::clearUseElements): * svg/SVGUseElement.cpp: (WebCore::updateContainerSize): (WebCore::SVGUseElement::updateContainerSizes): (WebCore::dumpInstanceTree): (WebCore::SVGUseElement::detachInstance): (WebCore::SVGUseElement::buildInstanceTree): 2011-03-21 Leo Yang <leo.yang@torchmobile.com.cn> Reviewed by Dirk Schulze. symbol display <use> at wrong scale https://bugs.webkit.org/show_bug.cgi?id=54538 Test cases for transfering width/height properties from 'use' element to 'svg' and 'symbol' elements. See: http://www.w3.org/TR/SVG/struct.html#UseElement * platform/mac/svg/custom/use-transfer-width-height-properties-to-svg-expected.checksum: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-svg-expected.png: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-svg1-expected.checksum: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-svg1-expected.png: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-svg2-expected.checksum: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-svg2-expected.png: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-symbol-expected.checksum: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-symbol-expected.png: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-symbol1-expected.checksum: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-symbol1-expected.png: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-symbol2-expected.checksum: Added. * platform/mac/svg/custom/use-transfer-width-height-properties-to-symbol2-expected.png: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-svg-expected.checksum: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-svg-expected.png: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-svg1-expected.checksum: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-svg1-expected.png: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-svg2-expected.checksum: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-svg2-expected.png: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-symbol-expected.checksum: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-symbol-expected.png: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-symbol1-expected.checksum: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-symbol1-expected.png: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-symbol2-expected.checksum: Added. * platform/qt/svg/custom/use-transfer-width-height-properties-to-symbol2-expected.png: Added. * svg/custom/use-transfer-width-height-properties-to-svg-expected.txt: Added. * svg/custom/use-transfer-width-height-properties-to-svg.svg: Added. * svg/custom/use-transfer-width-height-properties-to-svg1-expected.txt: Added. * svg/custom/use-transfer-width-height-properties-to-svg1.svg: Added. * svg/custom/use-transfer-width-height-properties-to-svg2-expected.txt: Added. * svg/custom/use-transfer-width-height-properties-to-svg2.svg: Added. * svg/custom/use-transfer-width-height-properties-to-symbol-expected.txt: Added. * svg/custom/use-transfer-width-height-properties-to-symbol.svg: Added. * svg/custom/use-transfer-width-height-properties-to-symbol1-expected.txt: Added. * svg/custom/use-transfer-width-height-properties-to-symbol1.svg: Added. * svg/custom/use-transfer-width-height-properties-to-symbol2-expected.txt: Added. * svg/custom/use-transfer-width-height-properties-to-symbol2.svg: Added. Canonical link: https://commits.webkit.org/71419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-21 14:21:41 +00:00
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="400" height="400">
<defs>
<svg id="s" viewBox="0 0 2 2">
<rect fill="green" x="0" y="0" width="1" height="1" />
</svg>
<svg id="s1" viewBox="0 0 2 2">
<use xlink:href="#s" x="0" y="0" width="1" height="1" />
</svg>
</defs>
<use xlink:href="#s1" />
</svg>