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

Re: [ResourcePriorities] Blocking content resources on CSS properties

From: Jake Archibald <jakearchibald@google.com>
Date: Tue, 11 Feb 2014 11:18:17 +0000
Message-ID: <CAPy=JooOo_p1g7KK1Z8qEzm2ejJ+_dJP_4Q3PG+0TnoPvHgGNQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Jatinder Mann <jmann@microsoft.com>, Simon Sapin <simon.sapin@exyr.org>, "public-web-perf@w3.org" <public-web-perf@w3.org>, Ivan Kotenkov <kotenkov@yandex-team.ru>, www-style <www-style@w3.org>
Sorry to drag this up, just saw it in the spec. What was the resolution of
this thread?

I agree that the CSS property should apply to CSS-defined resources only
(background-image etc). Although it could apply to <img>s that are added to
the document after styles have loaded, I think it's pretty confusing & will
cause race conditions on initial load.

> I agree that the spec should clarify that if a developer sets the IDL
attribute via script after the UA has already started downloading a
resource that
nothing should happen (e.g., download shouldn't be cancelled).

Maybe some guidance on how the UA may cancel downloads would cover more
cases. Eg, if <img src="huge-image.jpg" postpone> enters the viewport, then
the user scrolls farrrrr away, the browser may (based on content-length)
decide that there's an advantage to cancelling/pausing the download. This
could also happen if the attribute is changed with script.


On Wed, Nov 6, 2013 at 7:17 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Wed, Nov 6, 2013 at 11:04 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> > On 11/6/13 1:41 PM, Tab Atkins Jr. wrote:
> >> Nah, I'm fine with applying it to content resources, with the caveat
> >> outlined above that UAs may ignore it and preload anyway during the
> >> initial load
> >
> > I'm not, because this requires UAs to synchronously perform style
> > computation after onload in cases when they don't have to do it right
> now...
> > and we don't want to require that sort of thing synchronously. It's
> > especially bad in subframes, where style computation means doing a sync
> > layout on the ancestor document and all its ancestors because that
> affects
> > media queries which affects style computations...
>
> That's a new argument from what was expressed before, and is quite
> reasonable.
>
> ~TJ
>
>
Received on Tuesday, 11 February 2014 11:18:46 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC