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

Re: [css3-fonts] rethinking font load events

From: Glenn Adams <glenn@skynav.com>
Date: Fri, 7 Sep 2012 12:08:46 +0800
Message-ID: <CACQ=j+fDBaYpX-bXA0-Um6fxnQ26VRQp=ft8T1H4CoMgMO-8bA@mail.gmail.com>
To: John Daggett <jdaggett@mozilla.com>
Cc: www-style list <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
On Fri, Sep 7, 2012 at 11:03 AM, John Daggett <jdaggett@mozilla.com> wrote:

>
> Glenn Adams wrote:
>
> >>>>   // notify completion, even if no fonts load
> >>>>   void notifyAfterCompletion();
> >>>
> >>> The utility of this method seems particularly questionable. What
> should a UA
> >>> do when this is called?
> >>
> >> If FontLoader.readyState is "loading", nothing.
> >>
> >> If it's "idle", fire an "allcomplete" event anyway.
> >
> > Then what is the point? Why have the client code call a method to
> > that only translates to firing allcomplete when the client code can
> > invoke the same allcomplete handler?
>
> This API is a way of sync'ing with layout changes that might or might not
> initiate font loads.  The client code can't call the allcomplete handler
> until
> layout changes are processed.  In most cases the code below would work but
> it would be nicer to have this done by the user agent:
>
>   setTimeout(function () { if (document.fontloader.readyState == "idle")
> doStuff(); }, 100);
>
> Ping me on irc if you want to discuss.
>

I fail to see the relation between load completion and layout completion.
FontLoader should not be sensitive to layout state, just font loading
state. Again, I don't see a use case for the notify method as has been
described thus far. I'd prefer to discuss on this ML for the record.
Received on Friday, 7 September 2012 04:09:33 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT