[Webkit-unassigned] [Bug 54360] Enable fast path selector checking for child and subselector combinators

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 14 10:05:37 PST 2011


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
  Attachment #82269|review?                     |review+
               Flag|                            |

--- Comment #2 from Darin Adler <darin at apple.com>  2011-02-14 10:05:32 PST ---
(From update of attachment 82269)
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.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list