RESOLVED FIXED 74795
HTMLCollection: Simplify itemAfter().
https://bugs.webkit.org/show_bug.cgi?id=74795
Summary HTMLCollection: Simplify itemAfter().
Andreas Kling
Reported 2011-12-17 16:33:29 PST
SSIA
Attachments
Patch (10.09 KB, patch)
2011-12-17 16:48 PST, Andreas Kling
koivisto: review+
Andreas Kling
Comment 1 2011-12-17 16:48:58 PST
Antti Koivisto
Comment 2 2011-12-17 19:04:06 PST
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.
Antti Koivisto
Comment 3 2011-12-17 19:32:02 PST
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.
Andreas Kling
Comment 4 2011-12-17 19:42:00 PST
Note You need to log in before you can comment on or make changes to this bug.