Re: [ResourcePriorities] Blocking content resources on CSS properties

On Tue, Nov 5, 2013 at 1:37 PM, Bruno Racineux <bruno@hexanet.net> wrote:
> On 11/5/13 10:38 AM, "Simon Sapin" <simon.sapin@exyr.org> wrote:
>>* Some browsers speculatively parse HTML to find images and other
>>resources and start fetching them as soon as possible. CSS properties
>>may not be resolved yet at that point. Waiting for them introduces
>>unnecessary delays.
>
> Delaying is the whole point here. The spec says:
> "until [...], or the element has been styled such that its display
> property is no longer set to none."
>
> That does not mean 'postpone' rely only on the css display property to
> show.
> It only means that 'display:none' is a mean to keep 'postponing' "until
> either the bounding box of the element is inside the User Agent's
> interpretation of the Document's viewport". i.e. CSS properties do not
> have to be necessarily resolved prior.

You're missing the point of the argument.  The mere *existence* of
this property, with its current definition, means that browsers have
to throw their preloaders away.  They can't use them at all, not if
external CSS can come along, seconds later, and declare that an image
shouldn't be loaded yet.

At the time the preload scanner is running, the browser has no clue
whether the image is in the viewport, or what its 'display' value is.
It has, roughly, the same information available to Media Queries, and
no more.

This criticism applies to both non-initial values of 'resource-priority'.

~TJ

Received on Tuesday, 5 November 2013 22:19:54 UTC