RESOLVED FIXED 133473
CSS JIT: add support for the "any" pseudo class
https://bugs.webkit.org/show_bug.cgi?id=133473
Summary CSS JIT: add support for the "any" pseudo class
Yusuke Suzuki
Reported 2014-06-03 03:31:18 PDT
Add support for the "any" pseudo class.
Attachments
Patch (16.43 KB, patch)
2014-06-03 05:21 PDT, Yusuke Suzuki
no flags
Yusuke Suzuki
Comment 1 2014-06-03 05:21:36 PDT
Yusuke Suzuki
Comment 2 2014-06-03 05:27:45 PDT
Comment on attachment 232422 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232422&action=review Added comments. > Source/WebCore/cssjit/SelectorCompiler.cpp:160 > + Vector<Vector<SelectorFragment>> anyFilters; Used ">>" since C++11 is enabled. > Source/WebCore/cssjit/SelectorCompiler.cpp:461 > + // :any() may not contain complex selectors which have combinators. simple_selectors don't contain combinators. So fragmentList.size() always becomes 1. > Source/WebCore/cssjit/SelectorCompiler.cpp:467 > + subFragment.inFunctionalPseudoClass = true; Set `inFunctionalPseudoClass` true. > Source/WebCore/cssjit/SelectorCompiler.cpp:476 > + ASSERT(!anyFragments.isEmpty()); anyFragments always has fragments. > Source/WebCore/cssjit/SelectorCompiler.cpp:2621 > + RELEASE_ASSERT(!subFragments.isEmpty()); This is guaranteed in the construction phase. > Source/WebCore/cssjit/SelectorCompiler.cpp:2632 > + // At the last fragment, optimize the failure jump to jump to the non-local failure directly. Optimized path. At the last fragment, the failure jump should jump to the non-local failure site directly. This removes unnecessary trampolines. > LayoutTests/ChangeLog:11 > + * fast/selectors/pseudo-class-any.html: Added. :hover / :active tests are needed? If so, I'll add them.
Benjamin Poulain
Comment 3 2014-06-03 13:56:08 PDT
Comment on attachment 232422 [details] Patch The patch is great. There is an issue I also forgot about :not(), fragmentOnlyMatchesLinksInQuirksMode() should return false in those cases. Let's land this since it is complete and correct with the exception of fragmentOnlyMatchesLinksInQuirksMode(). I'll write a quick fix for fragmentOnlyMatchesLinksInQuirksMode.
WebKit Commit Bot
Comment 4 2014-06-03 14:27:21 PDT
Comment on attachment 232422 [details] Patch Clearing flags on attachment: 232422 Committed r169569: <http://trac.webkit.org/changeset/169569>
WebKit Commit Bot
Comment 5 2014-06-03 14:27:23 PDT
All reviewed patches have been landed. Closing bug.
Yusuke Suzuki
Comment 6 2014-06-03 19:28:39 PDT
(In reply to comment #3) > (From update of attachment 232422 [details]) > The patch is great. There is an issue I also forgot about :not(), fragmentOnlyMatchesLinksInQuirksMode() should return false in those cases. > Let's land this since it is complete and correct with the exception of fragmentOnlyMatchesLinksInQuirksMode(). I'll write a quick fix for fragmentOnlyMatchesLinksInQuirksMode. Oh! Thank you. I've commented your patch :) https://bugs.webkit.org/show_bug.cgi?id=133493
Note You need to log in before you can comment on or make changes to this bug.