Bug 76393 - Remove caching of mapped attribute count on NamedNodeMap.
Summary: Remove caching of mapped attribute count on NamedNodeMap.
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
Depends on:
Reported: 2012-01-16 10:50 PST by Andreas Kling
Modified: 2012-01-17 00:52 PST (History)
4 users (show)

See Also:

Patch (11.74 KB, patch)
2012-01-16 10:51 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2012-01-16 10:50:47 PST
Comment 1 Andreas Kling 2012-01-16 10:51:30 PST
Created attachment 122663 [details]
Comment 2 Antti Koivisto 2012-01-16 12:10:55 PST
Comment on attachment 122663 [details]

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.
Comment 3 Andreas Kling 2012-01-16 12:28:35 PST
Comment on attachment 122663 [details]

Clearing flags on attachment: 122663

Committed r105084: <http://trac.webkit.org/changeset/105084>
Comment 4 Andreas Kling 2012-01-16 12:28:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Andreas Kling 2012-01-16 13:53:50 PST
Committed r105089: <http://trac.webkit.org/changeset/105089>
Comment 7 Andreas Kling 2012-01-16 14:44:05 PST
(In reply to comment #6)
> Reopen, because it broke dozens of tests on all platform:
> chromium: http://build.webkit.org/results/Chromium%20Win%20Release%20%28Tests%29/r105085%20%2822886%29/results.html
> GTK: http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r105091%20%2816354%29/results.html
> Qt: http://build.webkit.org/results/Qt%20Linux%20Release/r105089%20%2842162%29/results.html
> Could you guys fix it?

Seems like a reasonable suggestion.
Comment 8 Andreas Kling 2012-01-16 15:38:23 PST
Committed r105095: <http://trac.webkit.org/changeset/105095>
Comment 9 Csaba Osztrogonác 2012-01-17 00:52:55 PST
(In reply to comment #8)
> Committed r105095: <http://trac.webkit.org/changeset/105095>
and http://trac.webkit.org/changeset/105089