According to the CSS Animation proposed specification (http://webkit.org/specs/CSSVisualEffects/CSSAnimation.html part 3.8), the animation-delay property, if set to a negative value, is supposed to start an element's animation immediately, but from an offset position within the animation.
For example, a value of -0.4s would create an animation that starts immediately, at 0.4 seconds until the end of the animation.
The provided URL demonstrates an intended use of this; notice that the segments of the "wheel" are pulsing in unison, however their starting-frames are supposed to be staggered so that the pulsing effect will move around the wheel, starting from "About" and then proceeding anti-clockwise to "Gallery" before starting again. This can be achieved by using equivalent positive delays, however
It doesn't do to only half implement your own standards! =D
Otherwise great job though, the animation's are great.
Created attachment 44350 [details]
Simplified testcase. The second square has a -webkit-animation-delay of -1s, but its spin is synchronized with the first, implying a delay of 0.
Created attachment 44463 [details]
style-queue ran check-webkit-style on attachment 44463 [details] without any errors.
It's great to see progress on this, and to think the solution can be so small and elegant, thanks Mihai Parparita and Shinichiro Hamaji!
Comment on attachment 44463 [details]
This patch works well for software-animated properties like 'left', but does not work for properties animated via GraphicsLayerCA, like -webkit-transform and opacity (you'll have to be on Mac OS X to test these).
Created attachment 44517 [details]
Thanks for the review! I added a similar fix for hardware animation
case and added a testcase where GraphicsLayerCA is used on Leopard.
Could you take a look again?
Created attachment 44642 [details]
This patch is on top of the patch in bug 32387, which touches the same code.
It also adds a testcase for transitions with negative delay, which are affected by this change, and fixes the language in some comments.
Thanks for improving the patch! This looks great after you changed the semantics of setAnimationOnLayer.