Last Comment Bug 649400 - [css3-animations] should animate each property across the keyframes it's present in
: [css3-animations] should animate each property across the keyframes it's pres...
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: mozilla5
Assigned To: David Baron :dbaron: ⌚️UTC-8
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-12 10:34 PDT by David Baron :dbaron: ⌚️UTC-8
Modified: 2011-06-20 16:20 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
patch 2: main patch (23.25 KB, patch)
2011-04-21 18:52 PDT, David Baron :dbaron: ⌚️UTC-8
bzbarsky: review+
sayrer: approval‑mozilla‑aurora+
Details | Diff | Splinter Review
patch 1: make index names clearer (7.45 KB, patch)
2011-04-21 23:14 PDT, David Baron :dbaron: ⌚️UTC-8
bzbarsky: review+
sayrer: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description David Baron :dbaron: ⌚️UTC-8 2011-04-12 10:34:43 PDT
It turns out I misextrapolated what the css3-animations spec meant to say about how keyframes work:  what WebKit does, I think, is that the animation animates each property across all the keyframes that it's present in (and using the initial values at 0% and 100% if needed)... as though the other keyframes weren't there.  So any property in the animation is present throughout the animation.

This behavior does make more sense for authors; it just didn't occur to me while reading the spec that it was what the spec might have meant (perhaps partly because my understanding of what the spec meant evolved over time, after reading it, as I tested things).
Comment 1 David Baron :dbaron: ⌚️UTC-8 2011-04-21 18:52:17 PDT
Created attachment 527711 [details] [diff] [review]
patch 2: main patch

This fixes it.

In the new model, it wasn't clear to me how to handle inability to interpolate between some of the values.  The easiest thing to implement was to drop the entire property from the animation (even if there are some value pairs that we can interpolate between).  None of the other options felt particularly sensible with this model, and this was the easiest to implement.

I tested that the test fails without the patch and passes with it.
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2011-04-21 22:53:31 PDT
Comment on attachment 527711 [details] [diff] [review]
patch 2: main patch

r=me
Comment 3 David Baron :dbaron: ⌚️UTC-8 2011-04-21 23:14:44 PDT
Created attachment 527724 [details] [diff] [review]
patch 1: make index names clearer

I forgot I had this patch underneath the other one.  This fixes some index names that were getting a little out-of-hand.
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2011-04-22 10:41:20 PDT
Comment on attachment 527724 [details] [diff] [review]
patch 1: make index names clearer

r=me
Comment 6 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-04-23 00:22:23 PDT
Are we going to put this on Aurora?
Comment 7 Eric Shepherd [:sheppy] 2011-04-24 18:51:22 PDT
I'm documenting this as a change that will take place in Gecko 6.0; if it gets pulled into Gecko 5.0, someone please let me know.
Comment 8 Eric Shepherd [:sheppy] 2011-04-24 19:01:01 PDT
I've updated the documentation here:

https://developer.mozilla.org/index.php?title=en/CSS/%40keyframes#When_properties_are_left_out_of_some_keyframes

And mentioned on Firefox 6 for developers.
Comment 9 David Baron :dbaron: ⌚️UTC-8 2011-04-25 11:35:02 PDT
Comment on attachment 527724 [details] [diff] [review]
patch 1: make index names clearer

I'd like to get this in to Aurora -- it's pretty silly to ship animations and then change the behavior substantially in the next release when we could avoid doing so.

This code doesn't affect anything outside of animations (so if we turn off animations, it all gets disabled).
Comment 10 David Baron :dbaron: ⌚️UTC-8 2011-04-25 11:35:34 PDT
Comment on attachment 527711 [details] [diff] [review]
patch 2: main patch

... and same for this patch.
Comment 11 Eric Shepherd [:sheppy] 2011-04-27 11:46:01 PDT
I have updated the documentation to reflect that this has been accepted for Aurora.
Comment 13 Michael Mullany 2011-06-20 16:20:44 PDT
You should know that Safari and Chrome differ in their treatment of "missing properties". Chrome tries to interpolate, Safari uses the intrinsic properties. I think a strict reading of the spec is that the Safari behavior (and the "pre-bug-fix" Firefox behavior) is the correct one, although it makes less sense.

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