[webkit-reviews] review granted: [Bug 76393] Remove caching of mapped attribute count on NamedNodeMap. : [Attachment 122663] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 16 12:10:55 PST 2012


Antti Koivisto <koivisto at iki.fi> has granted Andreas Kling <kling at webkit.org>'s
request for review:
Bug 76393: Remove caching of mapped attribute count on NamedNodeMap.
https://bugs.webkit.org/show_bug.cgi?id=76393

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

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=122663&action=review


r=me, though this patch could be even more red

> Source/WebCore/css/CSSStyleSelector.cpp:1070
> +static inline bool mappedAttributesEquivalent(NamedNodeMap* a, NamedNodeMap*
b)
> +{
> +    ASSERT(a->mappedAttributeCount() == b->mappedAttributeCount());

Considering that canShareStyleWithElement seems to be only client for the
mappedAttributeCount(), I wonder if it should be eliminated completely and done
implicitly by this function. We don't even care about the actual count, just
that they are equivalent.


More information about the webkit-reviews mailing list