Bug 262907 - Do not prepend implicit type selectors to :host rules
Summary: Do not prepend implicit type selectors to :host rules
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2023-10-09 11:35 PDT by Ahmad Saleem
Modified: 2023-10-10 02:14 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>