W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: [css3-animations] display:none, visibility:hidden and animations

From: L. David Baron <dbaron@dbaron.org>
Date: Sun, 2 Oct 2011 10:04:01 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Sylvain Galineau <sylvaing@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20111002170401.GA17852@pickering.dbaron.org>
On Sunday 2011-10-02 09:24 -0700, Tab Atkins Jr. wrote:
> I'm somewhat confused, probably due to lacking some crucial bit of
> knowledge.  You still have to do full selector matching and cascading
> on display:none elements in order to tell when they shouldn't be
> display:none anymore, right?  What optimizations surround this that
> make starting animations so hard?

Yes, but you don't have to do any selector matching and cascading on
their descendants.  This means, from a CSS perspective, that the
performance characteristics of a display:none *subtree* are pretty
much like that subtree weren't there (since it's only the cost of a
single element).  Authors do rely on those performance
characteristics.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Sunday, 2 October 2011 17:04:39 GMT

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