[webkit-reviews] review granted: [Bug 54360] Enable fast path selector checking for child and subselector combinators : [Attachment 82269] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 14 10:05:31 PST 2011
Darin Adler <darin at apple.com> has granted Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 54360: Enable fast path selector checking for child and subselector
combinators
https://bugs.webkit.org/show_bug.cgi?id=54360
Attachment 82269: patch
https://bugs.webkit.org/attachment.cgi?id=82269&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=82269&action=review
Are enough of these cases covered by existing tests?
> Source/WebCore/css/CSSStyleSelector.cpp:2146
> +template <class SelectorChecker>
> +inline bool fastCheckSingleSelector(const CSSSelector*& selector, const
Element*& element, const CSSSelector*& topChildOrSubselector, const Element*&
topChildOrSubselectorMatchElement)
We can pass functions as template arguments. Wrapping each function in a class
is unnecessary.
template<bool selectorChecker(const Element*, AtomicStringImpl*)>
> Source/WebCore/css/CSSStyleSelector.cpp:2149
> + while (element) {
I think this would read slightly better as a for loop.
> Source/WebCore/css/CSSStyleSelector.cpp:2157
> + };
Excess semicolon here.
More information about the webkit-reviews
mailing list