[Webkit-unassigned] [Bug 20651] svgElement.className.baseValue does not work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 7 14:34:02 PDT 2008


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





------- Comment #10 from eric at webkit.org  2008-10-07 14:34 PDT -------
(In reply to comment #9)
> (From update of attachment 24124 [edit])
> Can the test be changed into a dumpAsText test? I was able to do a number of
> SVG tests that were portable that way.

I didn't do so, but it probably could have been.  :(  Honestly I somehow missed
this line of your comment before commiting

> + if (attrName == HTMLNames::classAttr)
>
> I'm surprised you chose to explicitly qualify here rather than doing using
> namespace HTMLNames.

This was intentional, given that we're in an SVG file.

> StyledElement::classAttributeChanged would be better if it only called
> setChanged when there was an actual change. But that's not part of this fix, I
> guess.

I built a test which toggled classNames on an element to equivilent versions, I
didn't see extra redraws, but we might have been doing extra style resolutions?
 Or maybe my test was busted.

<style>
.foo {
    background-color: green;
}
.bar {
    width: 100px;
    height: 100px;
}
</style>
<div id="test" class="foo bar"></div>
<script>
var toggleCount = 0;
function toggleClassNames() {
    var div = document.getElementById("test");
    if (toggleCount % 2) {
        div.className = "foo bar";
    } else {
        div.className = " bar foo   ";
    }
    setTimeout(100, toggleClassNames);
}
toggleClassNames();
</script>


-- 
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