W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: [css-display]? Compositing, expensive things, and laziness

From: Ali Juma <ajuma@chromium.org>
Date: Fri, 21 Jun 2013 11:20:06 -0400
Message-ID: <CANLC6v2CW5VT=32EUnMVPeA0V+52X5W44T9Q31qFUDoN-G1anA@mail.gmail.com>
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: Simon Fraser <smfr@me.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style <www-style@w3.org>, Jon Rimmer <jon.rimmer@gmail.com>, Ian Vollick <vollick@chromium.org>
On Thu, Jun 20, 2013 at 10:39 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Sat, Jun 1, 2013 at 1:57 PM, Ali Juma <ajuma@chromium.org> wrote:
>
>> On Fri, May 31, 2013 at 9:34 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
>>
>>> Is it important to notify the Web page when "the content is ready"? I
>>> thought we were going to do this entirely in the engine?
>>>
>>
>> Without getting such a notification, the page won't know when it's safe
>> to remove placeholder content, or to make other changes that depend on the
>> expensive content being visible (e.g. the page might want to stop a spinner
>> from spinning once the expensive content is visible).
>>
>
> How is that going to work, since the event must be processed on the main
> thread and therefore could happen arbitrarily late? Placeholder content and
> spinning could remain in place for a while after the optional content has
> been rendered.
>

There are a couple approaches that can be used:
1) The optional content can initially be given tiny opacity, such that it's
effectively invisible even after it's rendered. When the event is received
on the main thread, the opacity of the optional content can be changed (or
animated) to 1, and the placeholder content can be removed (and spinning
stopped).
2) Alternatively, if the spinner is part of the placeholder and if there is
no desired to fade-in the optional content, the optional content can be
given a higher z-index than the placeholder. This way, the placeholder
content will immediately disappear once the optional content is rendered
(assuming the optional content has opacity 1). Upon receiving the event,
the (now invisible) spinner can be stopped.

-Ali
Received on Friday, 21 June 2013 15:20:33 UTC

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