[Webkit-unassigned] [Bug 47810] [HTML5] Add DOMSettableTokenList

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 21 10:38:23 PDT 2010


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





--- Comment #19 from Erik Arvidsson <arv at chromium.org>  2010-10-21 10:38:23 PST ---
(From update of attachment 71395)
View in context: https://bugs.webkit.org/attachment.cgi?id=71395&action=review

> WebCore/dom/SpaceSplitString.cpp:110
> +            break;

The vector can contain duplicates so we cannot break here.

> WebCore/html/ClassList.cpp:95
> +    m_classNamesForQuirksMode.add(token);

This needs more work.

m_element.setAttribute(classAttr...) cause the SpaceSplitString to be reset already and by calling add we recreate the vector immediately, even if we will never need it. One of the power of the SpaceSplitString is that it does not create the vector until needed the first time. This is important because it is used a lot in style resolutions for matching class names.

In a follow up patch I would like classList add/remove to keep the SpaceSplitString but that requires changes to how we reset the SpaceSplitString which I think is out of scope for this patch.

> WebCore/html/ClassList.cpp:113
> +    m_classNamesForQuirksMode.remove(token);

same here

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