[Webkit-unassigned] [Bug 100776] Avoid unnecessary style recalcs on class attribute mutation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 30 12:29:08 PDT 2012


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


Andreas Kling <kling at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #171495|review?                     |review-
               Flag|                            |




--- Comment #2 from Andreas Kling <kling at webkit.org>  2012-10-30 12:30:26 PST ---
(From update of attachment 171495)
View in context: https://bugs.webkit.org/attachment.cgi?id=171495&action=review

Cool idea!

r- for causing unnecessary conversions from immutable to mutable attribute data, rest looks good.

> Source/WebCore/css/RuleFeature.cpp:46
> +    end = other.classesInRules.end();
> +    for (HashSet<AtomicStringImpl*>::iterator it = other.classesInRules.begin(); it != end; ++it)
> +        classesInRules.add(*it);

Looks like we could be using const_iterators in this function.

> Source/WebCore/dom/Element.cpp:786
> +        SpaceSplitString oldClasses = mutableAttributeData()->classNames();

This will force promotion from ImmutableElementAttributeData to MutableElementAttributeData for all elements with a class attribute the first time they're parsed.

> Source/WebCore/dom/SpaceSplitString.cpp:122
> +    // FIXME: add() does not allow duplicates but createVector() does.

Huh.

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