2011-01-27 Leo Yang <leo.yang@torchmobile.com.cn>

        Reviewed by Dirk Schulze.

        SVG Use Cycle is not detected
        https://bugs.webkit.org/show_bug.cgi?id=52544

        Test for indirect <use> recursion. This test passes if
        no crash occurs.

        * svg/custom/recursive-use2-expected.txt: Added.
        * svg/custom/recursive-use2.svg: Added.
2011-01-27  Leo Yang  <leo.yang@torchmobile.com.cn>

        Reviewed by Dirk Schulze.

        SVG Use Cycle is not detected
        https://bugs.webkit.org/show_bug.cgi?id=52544

        We should check if SVGUseElement::buildInstanceTree finds problem
        for every child node. If it finds problem for any children we must
        return immediately because otherwise the foundProblem variable may
        be rewritten to false.

        Test: svg/custom/recursive-use2.svg

        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::buildInstanceTree):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2604a702
2011-01-27 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Dirk Schulze.
SVG Use Cycle is not detected
https://bugs.webkit.org/show_bug.cgi?id=52544
Test for indirect <use> recursion. This test passes if
no crash occurs.
* svg/custom/recursive-use2-expected.txt: Added.
* svg/custom/recursive-use2.svg: Added.
2011-01-27 Zhenyao Mo <zmo@google.com>
Reviewed by Kenneth Russell.
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<g id="g1">
<g id="g2">
<use xlink:href="#e2" id="e1" />
</g>
<use xlink:href="#e3" id="e4" />
</g>
<use xlink:href="#g1" id="e2" />
<use xlink:href="#g2" id="e3" />
<use xlink:href="#e1" id="e5" />
<use xlink:href="#e2" />
<use xlink:href="#e3" />
<text x="10" y="30">PASS without crash.</text>
</svg>
2011-01-27 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Dirk Schulze.
SVG Use Cycle is not detected
https://bugs.webkit.org/show_bug.cgi?id=52544
We should check if SVGUseElement::buildInstanceTree finds problem
for every child node. If it finds problem for any children we must
return immediately because otherwise the foundProblem variable may
be rewritten to false.
Test: svg/custom/recursive-use2.svg
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::buildInstanceTree):
2011-01-27 Zhenyao Mo <zmo@google.com>
Reviewed by Kenneth Russell.
......@@ -716,6 +716,8 @@ void SVGUseElement::buildInstanceTree(SVGElement* target, SVGElementInstance* ta
// Enter recursion, appending new instance tree nodes to the "instance" object.
buildInstanceTree(element, instancePtr, foundProblem);
if (foundProblem)
return;
}
if (!targetHasUseTag || !newTarget)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment