- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 22 Dec 2014 11:21:15 -0800
- To: John Fischer <jfroffice@gmail.com>
- Cc: Benjamin Poulain <benjamin@webkit.org>, www-style list <www-style@w3.org>
On Sun, Dec 21, 2014 at 2:59 PM, John Fischer <jfroffice@gmail.com> wrote: > Benjamin, > > > Effectively this proposal seems to be a feature expensive as we need to > have 2 -passes of computation at minimal. > > :hover seems to be moreless the same problem . So. > > Maybe we could find a way to limit computation. :hover does indeed suffer from the "style depends on layout" problem, but there's an important difference that makes it okay to deal with: it passes through and depends on hit-detection as well, not just layout. This means that a single layout pass is always stable, because hit-detection information doesn't change during a single layout pass. Even if this layout changes which elements match :hover, it does so for the *next* layout. This also provides a natural place to break loops, if you want - just don't update hit-detection information until the mouse moves, for example. Anything with a "smaller" loop, particularly one that takes place solely in layout code, is much more difficult to deal with. You don't have a natural place to break loops, and layout doesn't have the ability to complete a full cycle with stable information, because it depends on its own computations. So one can't use :hover as an existence proof to support adding new "style depends on layout" abilities. ~TJ
Received on Monday, 22 December 2014 19:22:02 UTC