w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.44k stars 656 forks source link

[font-loading] FontFaceSet.ready never resolves if no font faces are requested #2733

Open jwatt opened 6 years ago

jwatt commented 6 years ago

As best I can tell from the text of https://drafts.csswg.org/css-font-loading/ a FontFaceSet's [[ReadyPromise]] slot (initialized to a fresh pending Promise) is never resolved if no FontFaces are created.

jwatt commented 6 years ago

This could be resolved by adding some text to the list after the text "Whenever a FontFaceSet goes from pending on the environment to not pending on the environment, the user agent must run the following steps:"

tabatkins commented 6 years ago

I think what needs to be done is to have the constructor attempt to set the ffs to loading? That'll get it properly stuck on the environment right away.

(I should also have it actually invoke the internal version of the add() method, so its internal stuff gets set up properly.)