Bug 102843

Summary: HTMLCollection's cache should not be invalidated when id or name attributes are changed
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: New BugsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, koivisto, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 78909    
Attachments:
Description Flags
Fixes the bug eric: review+

Ryosuke Niwa
Reported 2012-11-20 15:03:21 PST
HTMLCollection's cache should not be invalidated when id or name attributes are changed
Attachments
Fixes the bug (4.71 KB, patch)
2012-11-20 15:09 PST, Ryosuke Niwa
eric: review+
Ryosuke Niwa
Comment 1 2012-11-20 15:09:52 PST
Created attachment 175286 [details] Fixes the bug
Eric Seidel (no email)
Comment 2 2012-11-20 15:22:14 PST
Comment on attachment 175286 [details] Fixes the bug YES. This is easy to test though. Just iterate over table.rows and set a name on each. It will be O(N^2) w/o this fix. Ojan's order-of-magnitude framework makes this trivial.
Ryosuke Niwa
Comment 3 2012-11-20 15:29:22 PST
(In reply to comment #2) > (From update of attachment 175286 [details]) > YES. This is easy to test though. Just iterate over table.rows and set a name on each. It will be O(N^2) w/o this fix. Ojan's order-of-magnitude framework makes this trivial. I've tried that but my test was consistently flaky.
Eric Seidel (no email)
Comment 4 2012-11-20 15:35:23 PST
I didn't have that trouble with his framework, but I guess YMMV? Sadly the tests I wrote in this style are on a different machine I may not have access to for a week.
Rafael Brandao
Comment 5 2012-11-20 15:35:55 PST
Comment on attachment 175286 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=175286&action=review > Source/WebCore/dom/DynamicNodeList.h:83 > + void invalididateIdNameCacheMaps() const; Typo on "invalididate", should be "invalidate", right?
Ryosuke Niwa
Comment 6 2012-11-20 15:41:20 PST
Ryosuke Niwa
Comment 7 2012-11-20 16:08:09 PST
Note You need to log in before you can comment on or make changes to this bug.