Re: [CSSOM] Revisiting transforms and getBoundingClientRect()

On Wed, Sep 7, 2011 at 7:02 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
> On Thu, Sep 8, 2011 at 4:55 AM, Erik Arvidsson <arv@chromium.org> wrote:
>>
>> Another thing that keeps coming up is to do these things async
>> (preferably with deferred/promises) so that we do not trigger
>> unexpected layouts. It is not uncommon for code to query the rect just
>> to set some style property. If multiple code snippets do this
>> consecutively then we get multiple layouts which lead to very slow
>> applications.
>
> If the layout changes between requesting the promise and forcing its
> evaluation, what should the result be? That sounds hard to spec and likely
> to make applications unreliable.
>
> I've always assume applications and libraries should be designed to avoid
> excessive layout flushing. What makes that hard?

Lack of information and explicit signals on when layout has been triggered.

jjb

>
> Rob
> --
> "If we claim to be without sin, we deceive ourselves and the truth is not in
> us. If we confess our sins, he is faithful and just and will forgive us our
> sins and purify us from all unrighteousness. If we claim we have not sinned,
> we make him out to be a liar and his word is not in us." [1 John 1:8-10]
>

Received on Thursday, 8 September 2011 02:13:08 UTC