I realized another possible spec and implementation issue with CSS
transitions.  I'll have to bring it up on www-style soon, although
I'm not sure yet what I'm going to say there.

The question is what should happen (1) for CSS transitions on
elements that have display:none at one end of the transition or the
other, most importantly elements that are changing from display:none
to some other value of display and (2) for CSS transitions on
descendants of those elements, when the style changes are
simultaneous with the display change.

The easiest implementation definitely ignores (2), and probably (1)
as well, although supporting (1) wouldn't be as hard as (2).

In order to support (1) only, we would just need to initiate
transitions on style changes when elements are coming out of the
undisplayed map.  To support (2), we'd need to keep style data for
elements that are descendants of 'display:none' elements, which
would require some substantive architectural changes, or at the very
least, a significant expansion of the purpose of the undisplayed map
(which currently exists only to contain elements on which style
changes could cause the element to become displayed).


However, if we want to skip transitions on elements that are coming
from being 'display: none', also a real danger here that, if we want
real interoperability here, we'll need to standardize the definition
of what style changes are simultaneous.

Skipping transitions on things that are display:none (rather than
transitioning from it) also means computed style on subtrees inside
display:none elements would be inconsistent with those outside; it
seems like this could be a problem.

It seems to me that the *right* thing to do is to make the
architectural changes needed for transitions on elements that are or
were inside display:none elements.  However, that probably has
significant performance costs:  it would substantially reduce the
performance saving of making elements display:none (including the
cost of dynamic style changes that we currently skip processing for
subtrees inside display:none elements).


Then there's also the question of supporting transitions on elements
that aren't in the document.  I'm inclined not to care, although we
do support computed style on elements not in the document (i.e.,
without a parentNode chain up to the document object).

Thoughts?

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to