Bug 74692 - invalidateNodeListsCacheAfterAttributeChanged has too many callers
Summary: invalidateNodeListsCacheAfterAttributeChanged has too many callers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 73853
  Show dependency treegraph
 
Reported: 2011-12-16 00:20 PST by Ryosuke Niwa
Modified: 2011-12-16 15:22 PST (History)
7 users (show)

See Also:


Attachments
cleanup and fixes a bug (17.20 KB, patch)
2011-12-16 01:02 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixed if for MICRODATA (17.20 KB, patch)
2011-12-16 01:06 PST, Ryosuke Niwa
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-12-16 00:20:48 PST
We shouldn't have to call invalidateNodeListsCacheAfterAttributeChanged in various places in DOM code.
Comment 1 Ryosuke Niwa 2011-12-16 01:02:55 PST
Created attachment 119581 [details]
cleanup and fixes a bug
Comment 2 Ryosuke Niwa 2011-12-16 01:06:46 PST
Created attachment 119582 [details]
Fixed if for MICRODATA
Comment 3 Ryosuke Niwa 2011-12-16 13:37:05 PST
Ping reviewers.
Comment 4 Sam Weinig 2011-12-16 14:26:58 PST
Comment on attachment 119582 [details]
Fixed if for MICRODATA

View in context: https://bugs.webkit.org/attachment.cgi?id=119582&action=review

> Source/WebCore/dom/Node.cpp:1038
> +    if (attrName != classAttr
> +#if ENABLE(MICRODATA)
> +        && attrName != itemscopeAttr
> +        && attrName != itempropAttr
> +#endif
> +        && attrName != nameAttr)
> +        return;

If this needs to be in sync with something, can we extract this logic into a shared function?
Comment 5 Ryosuke Niwa 2011-12-16 14:31:40 PST
Comment on attachment 119582 [details]
Fixed if for MICRODATA

View in context: https://bugs.webkit.org/attachment.cgi?id=119582&action=review

Thanks for the review!

>> Source/WebCore/dom/Node.cpp:1038
>> +        return;
> 
> If this needs to be in sync with something, can we extract this logic into a shared function?

It's hard to do at the moment because information is hidden in NodeListsNodeData but it'll be straight-forward once we turn NodeListsNodeData into a per-document cache (which I'm planning to do on the next patch).
Comment 6 Ryosuke Niwa 2011-12-16 15:15:15 PST
Committed r103116: <http://trac.webkit.org/changeset/103116>