Bug 74692

Summary: invalidateNodeListsCacheAfterAttributeChanged has too many callers
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: adamk, arko, arv, darin, sam, tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 73853    
Attachments:
Description Flags
cleanup and fixes a bug
none
Fixed if for MICRODATA sam: review+

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>