Bug 207567 - :host() pseudo-selector reported as :host in CSSStyleRule
Summary: :host() pseudo-selector reported as :host in CSSStyleRule
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Minor
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks: 148695
  Show dependency treegraph
 
Reported: 2020-02-11 11:05 PST by jlo
Modified: 2021-05-25 01:59 PDT (History)
12 users (show)

See Also:


Attachments
Minimal reproduction case (420 bytes, text/html)
2020-02-11 11:05 PST, jlo
no flags Details
patch (3.24 KB, patch)
2020-08-27 09:19 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jlo 2020-02-11 11:05:32 PST
Created attachment 390393 [details]
Minimal reproduction case

Any |:host(selector)| rules in a stylesheet are incorrectly reported as plain |:host| pseudo-selectors when accessed through CSSStyleRule.prototype.cssText or CSSStyleRule.prototype.selectorText.

See the attached test case. In Chrome and FireFox the <pre> is populated with |:host(.hidden) { display: none; }|, using Safari (Mobile and Desktop) the output is |:host { display: none; }|.
Comment 1 Radar WebKit Bug Importer 2020-02-11 15:07:18 PST
<rdar://problem/59365547>
Comment 2 Antti Koivisto 2020-08-26 08:59:39 PDT
https://github.com/WebKit/webkit/blob/master/Source/WebCore/css/CSSSelector.cpp#L670  is missing the code to build the argument string
Comment 3 Antti Koivisto 2020-08-27 09:19:35 PDT
Created attachment 407411 [details]
patch
Comment 4 EWS 2020-08-27 10:28:09 PDT
Committed r266245: <https://trac.webkit.org/changeset/266245>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407411 [details].
Comment 5 jlo 2020-12-01 08:31:23 PST
I see the fix for this has been merged for quite some time, but the issue is still occurring on the latest Safari releases. Has the fix been included in a Safari release yet?
Comment 6 Jonathan Bedard 2020-12-01 09:30:50 PST
Looks like this missed the branch cut-off (which was r266022) and never got cherry-picked to the release branch.
Comment 7 jlo 2020-12-01 09:35:24 PST
Okay, thanks for the update. Does this mean it should make it into the next release (14.1)?
Comment 8 MC 2021-05-24 09:39:30 PDT
(In reply to Jonathan Bedard from comment #6)
> Looks like this missed the branch cut-off (which was r266022) and never got
> cherry-picked to the release branch.

Hello. We have projects that depend on this bug fix getting pushed in safari. Can this fix please be included in the next release soon??

Thanks
Comment 9 Antti Koivisto 2021-05-25 01:59:50 PDT
The fix was in macOS 11.3/iOS 14.5