Summary: | Avoid unnecessary HTML Collection invalidations for id and name attribute changes | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
Component: | New Bugs | Assignee: | Ryosuke Niwa <rniwa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, kling, koivisto | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 129365 | ||||||
Attachments: |
|
Description
Ryosuke Niwa
2014-02-25 20:50:58 PST
Created attachment 225218 [details]
Fixes the bug
Comment on attachment 225218 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=225218&action=review > Source/WebCore/dom/NodeRareData.h:233 > + for (auto it = m_atomicNameCaches.begin(), end = m_atomicNameCaches.end(); it != end; ++it) { You could use a for-each loop here and in the following loops. > Source/WebCore/dom/NodeRareData.h:237 > + list.invalidateCache(0); Shouldn't you just call list.invalidateCache() here? Thanks for the review. (In reply to comment #2) > (From update of attachment 225218 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=225218&action=review > > > Source/WebCore/dom/NodeRareData.h:233 > > + for (auto it = m_atomicNameCaches.begin(), end = m_atomicNameCaches.end(); it != end; ++it) { > > You could use a for-each loop here and in the following loops. Fixed. > > Source/WebCore/dom/NodeRareData.h:237 > > + list.invalidateCache(0); > > Shouldn't you just call list.invalidateCache() here? Fixed. Committed r164707: <http://trac.webkit.org/changeset/164707> |