[Webkit-unassigned] [Bug 25217] Clean up SVGLocatable.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 15 12:29:22 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25217





------- Comment #2 from simon.fraser at apple.com  2009-04-15 12:29 PDT -------
(From update of attachment 29511)

> +static bool isViewportElement(Node* node)
>  {
> -    Node* n = e->parentNode();
> -    while (n && !n->isDocumentNode()) {
> -        if (n->hasTagName(SVGNames::svgTag) || n->hasTagName(SVGNames::symbolTag) ||
> -            n->hasTagName(SVGNames::imageTag))
> -            return static_cast<SVGElement*>(n);
> +    if (node->hasTagName(SVGNames::svgTag)
> +        || node->hasTagName(SVGNames::symbolTag)
>  #if ENABLE(SVG_FOREIGN_OBJECT)
> -        if (n->hasTagName(SVGNames::foreignObjectTag))
> -            return static_cast<SVGElement*>(n);
> +        || node->hasTagName(SVGNames::foreignObjectTag)
>  #endif
> +        || node->hasTagName(SVGNames::imageTag))
> +            return true;
> +    return false;

You could just do

   return node->hasTagName(SVGNames::svgTag) || .......

r=me either way.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list