Bug 262907

Summary: Do not prepend implicit type selectors to :host rules
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ntim, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar, WPTImpact
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=214462

Description Ahmad Saleem 2023-10-09 11:35:23 PDT
HI Team,

While going through WPT Failures, another came up, which if we merge below Blink commit, we progress one WPT and slightly another one.

Blink Commit: https://chromium-review.googlesource.com/c/chromium/src/+/518019

WebKit Source: https://searchfox.org/wubkat/source/Source/WebCore/css/parser/CSSSelectorParser.cpp#1175

Change to this:

bool isHostPseudo = compoundSelector.isHostPseudoSelector();
    if (isHostPseudo && elementName.isNull() && namespacePrefix.isNull())
        return;
    if (tag != anyQName() || isHostPseudo || isShadowDOM)
        compoundSelector.prependTagSelector(tag, determinedPrefix == nullAtom() && determinedElementName == starAtom() && !isHostPseudo);


____

Progress following WPT: http://wpt.live/css/css-scoping/host-with-default-namespace-001.html

and slightly progress this (matching Firefox but still failing): http://wpt.live/css/css-scoping/css-scoping-shadow-host-namespace.html

___

@Tim - any suggestion or we should merge since it progresses at least one WPT Test case.

Thanks!
Comment 1 EWS 2023-10-10 02:13:09 PDT
Committed 269134@main (f92a593eb387): <https://commits.webkit.org/269134@main>

Reviewed commits have been landed. Closing PR #18857 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2023-10-10 02:14:14 PDT
<rdar://problem/116727323>