Changeset 49833 in webkit


Ignore:
Timestamp:
Oct 19, 2009 8:19:22 PM (15 years ago)
Author:
eric@webkit.org
Message:

2009-10-19 Robin Qiu <robin.qiu@torchmobile.com.cn>

Reviewed by Nikolas Zimmermann.

Add a layout test for nested SVG <use> element which has a child.
https://bugs.webkit.org/show_bug.cgi?id=26117

  • svg/custom/use-on-use-with-child-expected.txt: Added.
  • svg/custom/use-on-use-with-child.svg: Added.

2009-10-19 Robin Qiu <robin.qiu@torchmobile.com.cn>

Reviewed by Nikolas Zimmermann.

Fixed a bug on nested SVG <use> elements.
https://bugs.webkit.org/show_bug.cgi?id=26117
When a <use> element refer to another <use> element which has
child/children, the instance tree built for this <use> element
is incorrect (more nodes than expected).

Test: svg/dom/use-on-use-with-child.svg

  • svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildInstanceTree):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r49831 r49833  
     12009-10-19  Robin Qiu  <robin.qiu@torchmobile.com.cn>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Add a layout test for nested SVG <use> element which has a child.
     6        https://bugs.webkit.org/show_bug.cgi?id=26117
     7
     8        * svg/custom/use-on-use-with-child-expected.txt: Added.
     9        * svg/custom/use-on-use-with-child.svg: Added.
     10
    1112009-10-19  Jeremy Orlow  <jorlow@chromium.org>
    212
  • trunk/WebCore/ChangeLog

    r49832 r49833  
     12009-10-19  Robin Qiu  <robin.qiu@torchmobile.com.cn>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Fixed a bug on nested SVG <use> elements.
     6        https://bugs.webkit.org/show_bug.cgi?id=26117
     7        When a <use> element refer to another <use> element which has
     8        child/children, the instance tree built for this <use> element
     9        is incorrect (more nodes than expected).
     10
     11        Test: svg/dom/use-on-use-with-child.svg
     12
     13        * svg/SVGUseElement.cpp:
     14        (WebCore::SVGUseElement::buildInstanceTree):
     15
    1162009-10-19  Oliver Hunt  <oliver@apple.com>
    217
  • trunk/WebCore/svg/SVGUseElement.cpp

    r49306 r49833  
    485485
    486486        // Enter recursion, appending new instance tree nodes to the "instance" object.
    487         if (element->hasChildNodes())
    488             buildInstanceTree(element, instancePtr.get(), foundProblem);
    489 
    490         // Spec: If the referenced object is itself a 'use', or if there are 'use' subelements within the referenced
    491         // object, the instance tree will contain recursive expansion of the indirect references to form a complete tree.
    492         if (element->hasTagName(SVGNames::useTag))
    493             handleDeepUseReferencing(static_cast<SVGUseElement*>(element), instancePtr.get(), foundProblem);
     487        buildInstanceTree(element, instancePtr.get(), foundProblem);
    494488    }
    495489
Note: See TracChangeset for help on using the changeset viewer.