Bug 270664 - @font-face rules in shadow trees should not leak outside to document
Summary: @font-face rules in shadow trees should not leak outside to document
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 148695
  Show dependency treegraph
 
Reported: 2024-03-07 15:00 PST by Alan Stearns
Modified: 2024-03-26 19:00 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Stearns 2024-03-07 15:00:26 PST
I have a PR up at WPT with a bunch of tests around @font-face and shadow trees:

https://github.com/web-platform-tests/wpt/pull/44993

These are based on the spec (https://drafts.csswg.org/css-scoping/#shadow-names) which WebKit gets right much more than the other engines (all but two of the tests pass) but @font-face names are meant to be tree-scoped, which WebKit does not do. So the two tests (001 and 005) that check that a @font-face rule defined in a shadow tree does not get used when referred to by the outside document fail in WebKit.
Comment 1 Radar WebKit Bug Importer 2024-03-14 16:01:23 PDT
<rdar://problem/124643482>
Comment 2 Matthieu Dubet 2024-03-20 10:48:11 PDT
Hi Alan,

Thank you very much for the detailed bug report, we will look into it.