[Webkit-unassigned] [Bug 16854] display title in tooltip onmouseover in SVG

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 21 10:34:59 PDT 2010


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





--- Comment #23 from Jeff Schiller <codedread at gmail.com>  2010-04-21 10:34:58 PST ---
Hi Nico,

>> +    Element* titleElement = firstElementChild();
>> +    for (; titleElement; titleElement = titleElement->nextElementSibling()) {
>> +        if (titleElement->hasTagName(SVGNames::titleTag) && titleElement->isSVGElement())
>> +            break;
>> +    }
>Ok, you are beginning with the firstElementChild() of a certain
>SVGStyledElement. You loop over all children, take this as example:
>
><rect>
>   <animateColor/>
></rect>
>
>The titleElement->hasTagName(SVGNames::titleTag) check won't be true, as it's
>an <animateColor> element. As there is no next sibling,
>you will just exit the loop, w/o breaking early. That means "titleElement" now
>stores the pointer to the <animateColor> element.

Agreed, the loop will not break early because the if condition is not true. 
However, the for-loop should then set titleElement = nextElementSibling() which
would be null and the loop would stop executing.

i.e. the loop will keep on going until we reach a <svg:title> element
or there are no more children (in which case titleElement is null on
the last call to nextElementSibling()).

Am I missing something still? :)

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



More information about the webkit-unassigned mailing list