Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-font-loading-3] FontFaceSet.clear() should not clear CSS-connected items #6553

Merged
merged 1 commit into from
Aug 30, 2021

Conversation

litherum
Copy link
Contributor

@litherum litherum commented Aug 28, 2021

The spec says in https://drafts.csswg.org/css-font-loading-3/#document-font-face-set:

The set entries for a document’s font source must be initially populated with all the CSS-connected FontFace objects from all of the CSS @font-face rules.

And in https://drafts.csswg.org/css-font-loading-3/#font-face-css-connection

There is a two-way connection between [FontFace objects and @font-face rules]: any change made to a @font-face descriptor is immediately reflected in the corresponding FontFace attribute, and vice versa.

And, finally, in https://drafts.csswg.org/css-font-loading-3/#dom-fontfaceset-clear

Remove all items from the FontFaceSet’s set entries.

It seems like clear() shouldn't delete CSS-connected FontFaces. This is also what Firefox and Chrome both do. I'm updating WebKit to do this in https://bugs.webkit.org/show_bug.cgi?id=229643.

…ed items

The spec says in https://drafts.csswg.org/css-font-loading-3/#document-font-face-set:

> The set entries for a document’s font source must be initially populated with all the CSS-connected FontFace objects from all of the CSS @font-face rules.

And in https://drafts.csswg.org/css-font-loading-3/#font-face-css-connection

> There is a two-way connection between [FontFace objects and @font-face rules]: any change made to a @font-face descriptor is immediately reflected in the corresponding FontFace attribute, and vice versa.

And, finally, in https://drafts.csswg.org/css-font-loading-3/#dom-fontfaceset-clear

> Remove all items from the FontFaceSet’s set entries.

It seems like clear() shouldn't delete CSS-connected FontFaces. This is also what Firefox and Chrome both do. I'm updating WebKit to do this in https://bugs.webkit.org/show_bug.cgi?id=229643.
Copy link
Contributor

@jfkthame jfkthame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice that delete method is explicit that it can not be used to remove CSS-connected faces; clear should similarly not affect them. So, LGTM.

@litherum
Copy link
Contributor Author

Is this ready to merge, or do I need additional reviews?

Copy link
Contributor

@svgeesus svgeesus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM also

@tabatkins
Copy link
Member

You submitted it late at night on a Friday, let me at least have Monday to look at it ^_^

@tabatkins tabatkins merged commit a22c4eb into w3c:main Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants