W3C home > Mailing lists > Public > www-style@w3.org > April 2015

Re: [css-font-loading] “whenever” algorithms

From: Cameron McCormack <cam@mcc.id.au>
Date: Thu, 9 Apr 2015 15:16:04 +1000
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Message-ID: <20150409051604.GQ29734@wok.mcc.id.au>
Tab Atkins Jr.:
> Good catches, and I agree that this needs to be nailed down more
> precisely.  Ordering bugs are terrible. :/
> However, I'm not sure how your suggestion (in the parent email) to
> handle this by hooking the FontFaceSet add/delete/clear() methods
> would work.  For example, "Whenever a FontFaceSet goes from having
> possibly pending font loads to having no pending font loads" triggers
> when fonts just finish loading, even if they've just been sitting in
> the set unmolested this whole time.

Yes, but we still have to follow the rules for the FontFace.load()
method if a FontFace starts loading due to matching text in the
document, so we still would have a place to explicitly invoke the
“whenever … to having no pending font loads” algorithm, which is in the
asynchronous part of the load() steps.

> Are you suggesting this as *part* of the solution?  I think I'd also
> have to hook the state-changing methods in FontFace, right?

Yes I should have said that. :-)  All of the algorithms that mess with
the status of a FontFace would need to explicitly invoke the algorithm.

(By the way, according to current Web IDL, FontFaceSet must override
add/delete/clear in the IDL because they have behaviour different from
the default functions that get generated (which only do the argument
type checking).  I really should add some terms to use from the add/
delete/clear steps to manipulate the “set entries” so that it will
forward those operations on to the backing Set.)

Cameron McCormack ≝ http://mcc.id.au/
Received on Thursday, 9 April 2015 05:16:31 UTC

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