[webkit-reviews] review granted: [Bug 77845] HTMLCollection: Use Element's hasName/hasID flags to avoid unnecessary work. : [Attachment 125557] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 8 08:46:38 PST 2012
Geoffrey Garen <ggaren at apple.com> has granted Andreas Kling
<kling at webkit.org>'s request for review:
Bug 77845: HTMLCollection: Use Element's hasName/hasID flags to avoid
unnecessary work.
https://bugs.webkit.org/show_bug.cgi?id=77845
Attachment 125557: Patch
https://bugs.webkit.org/attachment.cgi?id=125557&action=review
------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
This patch makes me think the following refactoring would be a good idea:
(1) Change getIdAttribute() to check hasID() for you;
(2) Add a getNameAttribute() that works just like getIdAttribute().
Now, as long as you use these functions when getting name and/or id, everything
is fast, and you remove a lot of the code you've introduced in this patch.
More information about the webkit-reviews
mailing list