Last Comment Bug 780340 - Allow compositor-drive animation of visibility
: Allow compositor-drive animation of visibility
Product: Core
Classification: Components
Component: Layout (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla17
Assigned To: David Zbarsky (:dzbarsky)
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2012-08-03 19:50 PDT by David Zbarsky (:dzbarsky)
Modified: 2012-08-30 13:31 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (980 bytes, patch)
2012-08-03 19:52 PDT, David Zbarsky (:dzbarsky)
matt.woodrow: review+
Details | Diff | Splinter Review

Description User image David Zbarsky (:dzbarsky) 2012-08-03 19:50:51 PDT
Visibility does not actually affect the animation, since the element is always visible except for possibly the start and end states.  When the element is hidden, that is handled by layout.  This allows transitions like to be async.
Comment 1 User image David Zbarsky (:dzbarsky) 2012-08-03 19:52:18 PDT
Created attachment 648934 [details] [diff] [review]
Comment 2 User image Ed Morley [:emorley] 2012-08-04 10:14:38 PDT
Backed out as part of the mass tree revert due to bustage caused by other landings:

Once the tree is open again, this can reland :-)
Comment 3 User image David Zbarsky (:dzbarsky) 2012-08-05 10:04:15 PDT
Comment 4 User image Ryan VanderMeulen [:RyanVM] 2012-08-05 17:40:16 PDT
Comment 5 User image David Baron :dbaron: ⌚️UTC-8 2012-08-05 17:57:07 PDT
What if it's a CSS animation involving keyframes, and the visibility state needs to change somewhere in the middle due to what's specified in the keyframes (or due to repetition from animation-iteration-count)?
Comment 6 User image David Zbarsky (:dzbarsky) 2012-08-05 18:52:15 PDT
Are you talking about something like
That doesn't work in Firefox currently.  In my testing, I could only get visibility to work for transitions, never for animations.

However, in theory since the animation is also sampled by the main thread, layout will set the frame invisible if it needs to, which will rebuild the layer tree.
Comment 7 User image David Zbarsky (:dzbarsky) 2012-08-05 19:35:00 PDT
So when I fix the 30%% thing, it does actually work as expected, even with async animations, because of what I said in my previous comment.
Comment 8 User image David Baron :dbaron: ⌚️UTC-8 2012-08-05 19:55:49 PDT
Maybe that's because we're not doing anything to suppress the animation running normally in addition to running on the compositor thread?  But once we do, won't it be a problem?
Comment 9 User image David Zbarsky (:dzbarsky) 2012-08-05 19:59:46 PDT
That is correct.  At that point we can just sample the visibility on the compositor and set a scale(0,0) transform matrix on the layer if it should be invisible.  Or do you think we should do that now?
Comment 10 User image David Baron :dbaron: ⌚️UTC-8 2012-08-30 13:31:58 PDT
This was backed out in bug 784239 (which is good, I think).

Note You need to log in before you can comment on or make changes to this bug.