[webkit-reviews] review denied: [Bug 100776] Avoid unnecessary style recalcs on class attribute mutation : [Attachment 171495] patch

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


Andreas Kling <kling at webkit.org> has denied Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 100776: Avoid unnecessary style recalcs on class attribute mutation
https://bugs.webkit.org/show_bug.cgi?id=100776

Attachment 171495: patch
https://bugs.webkit.org/attachment.cgi?id=171495&action=review

------- Additional Comments from Andreas Kling <kling at webkit.org>
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.


More information about the webkit-reviews mailing list