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

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