haikuwebkit/LayoutTests/svg/in-html/defs-after-use-expected.html

9 lines
207 B
HTML
Raw Permalink Normal View History

Only when the SVG is inline and only when a shape is referenced before it is defined, this shape will not be drawn. https://bugs.webkit.org/show_bug.cgi?id=139451. Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2014-12-19 Reviewed by Antti Koivisto. Source/WebCore: Tests: svg/in-html/defs-after-use.html. When parsing the children of an SVG element is finished, we need to notify the other SVG elements which have incomplete shadow trees because of early referencing to this element. The referencing elements need to rebuild their shadow trees and make new copies of the this element and its sub-tree. This is the case where a <use> tag references target elements before these target elements are defined. Updating the shadow DOM tree of a <use> element should update the corresponding shadow render tree as well. * svg/SVGElement.cpp: (WebCore::SVGElement::finishParsingChildren): Invalidate all the referencing elements of a target element whose sub-tree has just finished parsing. LayoutTests: Ensure that when a <use> element inside an inline SVG references another target SVG element, which has not been defined yet, gets its shadow DOM tree updated once the target element is created. Updating the shadow DOM tree of the <use> element should update the corresponding shadow render tree as well. * svg/in-html/defs-after-use-expected.html: Added. * svg/in-html/defs-after-use.html: Added. Canonical link: https://commits.webkit.org/157740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-12-19 18:36:27 +00:00
<html>
<body>
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="100" height="50" fill="lime"/>
<rect x="120" y="10" width="100" height="50" fill="lime"/>
</svg>
</body>
</html>