Bug 130961 - Upgrade to SelectorFailsAllSiblings failure when Child selector is failed
Summary: Upgrade to SelectorFailsAllSiblings failure when Child selector is failed
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2014-03-31 01:02 PDT by Yusuke Suzuki
Modified: 2014-04-05 00:37 PDT (History)
8 users (show)

See Also:

Patch (2.26 KB, patch)
2014-03-31 01:07 PDT, Yusuke Suzuki
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2014-03-31 01:02:44 PDT
When Child selector fails, we should resume matching from the closest Descendant selector.
So upgrading SelectorFailsLocally to SelectorFailsAllSibling at least to prevent unnecessary direct/indirect adjacent selectors matching.
Comment 1 Yusuke Suzuki 2014-03-31 01:07:17 PDT
Created attachment 228158 [details]
Comment 2 Yusuke Suzuki 2014-03-31 09:49:39 PDT
To clearify the executing model in my mind, I've created a small patch to match markRecursively's resuming strategy to CSS JIT's.
Comment 3 Benjamin Poulain 2014-04-04 15:28:41 PDT
Comment on attachment 228158 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=228158&action=review

Great idea!

> Source/WebCore/css/SelectorChecker.cpp:219
> +            nextContext.elementStyle = 0;

You can change this to nullptr now that WebKit supports C++ 11.
Comment 4 Benjamin Poulain 2014-04-04 15:31:12 PDT
Committed r166808: <http://trac.webkit.org/changeset/166808>
Comment 5 Yusuke Suzuki 2014-04-05 00:37:31 PDT
Thank you for your review and fixing 0 to nullptr!