W3C home > Mailing lists > Public > www-style@w3.org > September 2014

[css-font-loading] resolving the [[ReadyPromise]] etc. when there are no pending font loads

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 29 Sep 2014 07:40:07 +1000
Message-ID: <54288037.7070401@mcc.id.au>
To: www-style@w3.org
The spec currently says that when we go from there being "possibly 
pending font loads" to "no pending font loads", we set the FontFaceSet's 
status to loaded, dispatch some events, and resolve or the [[ReadyPromise]].

When the FontFaceSet has no FontFace objects in it, this will result in 
loadingdone events being dispatched after every restyle or relayout done 
in the document.  I don't think that's what we want.

Instead, I think we need to track whether we previously went from "no 
pending font loads" to "possibly pending font loads" only due to a 
scheduled restyle or relayout, and if so, and we don't subsequently have 
any FontFace objects start loading, the transition back to "no pending 
font loads" shouldn't run those steps.  (There's probably a simpler way 
to formulate that in the spec.)
Received on Sunday, 28 September 2014 21:40:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:46 UTC