Ignore:
Timestamp:
Sep 9, 2013, 8:10:11 PM (12 years ago)
Author:
[email protected]
Message:

Generate more SVG type checks and conversions.
<https://webkit.org/b/121066>

Reviewed by Anders Carlsson.

Switch another slew of SVG elements to auto-generated isFooElement()
and toFooElement() helpers.

Removed now-unnecessary casts and assertions as appropriate.
Converted some simple loops to childrenOfType iteration instead of
traversing child Nodes.

PS. This patch also adds const versions of toFooElement().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/svg/SVGPatternElement.cpp

    r154957 r155412  
    230230
    231231        // Respect xlink:href, take attributes from referenced element
    232         Node* refNode = SVGURIReference::targetElementFromIRIString(current->href(), &document());
    233         if (refNode && refNode->hasTagName(SVGNames::patternTag)) {
    234             current = static_cast<const SVGPatternElement*>(const_cast<const Node*>(refNode));
     232        Element* refElement = SVGURIReference::targetElementFromIRIString(current->href(), &document());
     233        if (refElement && isSVGPatternElement(refElement)) {
     234            current = toSVGPatternElement(refElement);
    235235
    236236            // Cycle detection
Note: See TracChangeset for help on using the changeset viewer.