Bug 249893

Summary: [css-nesting] Implement parsing for relative selector
Product: WebKit Reporter: Matthieu Dubet <m_dubet>
Component: WebKit Misc.Assignee: Matthieu Dubet <m_dubet>
Status: RESOLVED FIXED    
Severity: Normal CC: Hironori.Fujii, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Matthieu Dubet 2022-12-26 10:25:34 PST
In a nested context, selectors can be relative selectors (the anchor being the parent).

https://drafts.csswg.org/selectors-4/#typedef-relative-selector

https://drafts.csswg.org/css-nesting/#placement
Comment 1 Radar WebKit Bug Importer 2022-12-26 10:26:02 PST
<rdar://problem/103712211>
Comment 2 Matthieu Dubet 2022-12-26 10:34:39 PST
Pull request: https://github.com/WebKit/WebKit/pull/8071
Comment 3 EWS 2022-12-29 11:06:19 PST
Committed 258355@main (5f782c40ce1b): <https://commits.webkit.org/258355@main>

Reviewed commits have been landed. Closing PR #8071 and removing active labels.
Comment 4 Fujii Hironori 2022-12-31 03:59:09 PST
Debug builds are reporting an assertion failure after this change.

https://results.webkit.org/?suite=layout-tests&test=fast%2Fcss%2Ffont_property_normal.html

Buildbot: builder Apple-Ventura-Debug-AppleSilicon-WK2-Tests build 569
https://build.webkit.org/#/builders/704/builds/569

  fast/css/font_property_normal.html [ Crash ]
  fast/css/parsing-invalid-block-recovery.html [ Crash ]

ASSERTION FAILED: scopeCombinator != CSSSelector::Subselector
css/parser/CSSSelectorParser.cpp(329) : std::unique_ptr<CSSParserSelector> WebCore::CSSSelectorParser::consumeRelativeNestedSelector(WebCore::CSSParserTokenRange &)