Summary: | HTMLCollection: Simplify itemAfter(). | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||
Component: | DOM | Assignee: | Andreas Kling <kling> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Andreas Kling
2011-12-17 16:33:29 PST
Created attachment 119740 [details]
Patch
Comment on attachment 119740 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=119740&action=review > Source/WebCore/html/HTMLCollection.cpp:129 > +inline bool HTMLCollection::isAcceptableElement(Element* element) const > +{ > + switch (m_type) { Since m_type is not changing, I think this could be refactored to avoid repeated switching on type entirely. Comment on attachment 119740 [details]
Patch
r=me anyway as that's what the old code did too and the patch is an improvement. Refactoring can be done later too.
Committed r103165: <http://trac.webkit.org/changeset/103165> |