Bug 130961

Summary: Upgrade to SelectorFailsAllSiblings failure when Child selector is failed
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, benjamin, commit-queue, esprehn+autocc, glenn, gyuyoung.kim, macpherson, menard
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch benjamin: review+

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]
Patch
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]
Patch

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!