[Webkit-unassigned] [Bug 15528] svg_dynamic_cast should be removed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 7 14:06:40 PST 2007
http://bugs.webkit.org/show_bug.cgi?id=15528
------- Comment #3 from rwlbuis at gmail.com 2007-12-07 14:06 PDT -------
Hi Darin,
(In reply to comment #2)
> (From update of attachment 17780 [edit])
> 918 if (node && node->isSVGElement())
> 919 textContent =
> static_cast<SVGTextContentElement*>(node);
>
> Why is isSVGElement() sufficient evidence that this is a SVGTextContentElement?
> What guarantees that?
It is not. Just that the old code basically did the same thing, only with an
extra assert and static_cast AFAICS.
> 83 target =
> ownerDocument()->getElementById(SVGURIReference::getTarget(m_href));
>
> Should just use document() here instead of ownerDocument(). ownerDocument() is
> a lsower was to do the same thing.
Ok, good to know, will fix.
> 85 target = parentNode();
> 8686 while (target) {
> 8787 if (target->nodeType() != ELEMENT_NODE)
> 8888 target = target->parentNode();
> 8989 else
> 9090 break;
> 9191 }
>
> This code seems unneeded to me. What node has a parent that's not an element?
Maybe a document(I didnt check so far)? I didnt want to change the existing
code much, except that obvious SVGAnimationElement cleanup.
> r=me
Thx! Will land after some sleep :)
Mfg,
Rob.
--
Configure bugmail: http://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