I ran the AnimationTest in prod mode in Chrome 9 (stable), 10 (beta) and
11 (dev), as well as Firefox 4b12, IE8, Opera 11 and Safari 5.

I also checked that the moz- (resp. webkit-) -specific implementation
was correctly stripped out of the webkit (resp. gecko1_8) permutations.


http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/Animation.gwt.xml
File user/src/com/google/gwt/animation/Animation.gwt.xml (right):

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/Animation.gwt.xml#newcode25
user/src/com/google/gwt/animation/Animation.gwt.xml:25:
<property-provider name="animationTimingSupport"><![CDATA[
On 2011/03/03 21:32:11, jlabanca wrote:
You're right.  I missed the collapse-property in my review.

I moved it just after the define-property to make it more prominent.

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/Animation.gwt.xml#newcode37
user/src/com/google/gwt/animation/Animation.gwt.xml:37:
<when-property-is name="user.agent" value="ie6" />
On 2011/03/03 21:32:11, jlabanca wrote:
Does this need to be wrapped in <any>?

Done.

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/Animation.gwt.xml#newcode48
user/src/com/google/gwt/animation/Animation.gwt.xml:48:
<when-property-is name="animationTimingSupport" value="moz" />
On 2011/03/03 21:32:11, jlabanca wrote:
Adding the line would work, and wrap with an <any> tag.

Er, no; we want this to be used *only* when animationTimingSupport=moz
(not for any gecko1_8 out there). Given that this can only happen when
user.agent=gecko1_8, the added line would only be an optimization to
compile AnimationImplMozAnimTiming out in the case of webkit.
I.e. in webkit, only the AnimationImplTimer and
AnimationImplWebkitAnimTiming will be compiled in.

I added comments to (try to) make it clearer.

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/client/Animation.java
File user/src/com/google/gwt/animation/client/Animation.java (right):

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/client/Animation.java#newcode98
user/src/com/google/gwt/animation/client/Animation.java:98: * passed,
the animation will be synchronize as if it started at the specified
On 2011/03/03 19:26:22, jlabanca wrote:
will be synchronize => will run synchronously

Done.

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/client/Animation.java#newcode113
user/src/com/google/gwt/animation/client/Animation.java:113: * passed,
the animation will be synchronize as if it started at the specified
On 2011/03/03 19:26:22, jlabanca wrote:
will be synchronize => will run synchronously

Done.

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/client/AnimationImplMozAnimTiming.java
File
user/src/com/google/gwt/animation/client/AnimationImplMozAnimTiming.java
(right):

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/client/AnimationImplMozAnimTiming.java#newcode45
user/src/com/google/gwt/animation/client/AnimationImplMozAnimTiming.java:45:
if (!complete) {
On 2011/03/03 21:32:11, jlabanca wrote:
On 2011/03/03 20:59:06, tbroyer wrote:
> On 2011/03/03 19:26:22, jlabanca wrote:
> > If you check !cancelled here, it could result in a bad state if
the
Animation
> is
> > restarted synchronously.
>
> What would you propose?
>
> Would it also be an issue if 'cancelled' is checked before update()
is called
> (which should have been the case)

We probably need some kind of handle like webkit uses. You could wrap
callback
in an object and assign a static ID.  Then, check the ID when the
callback is
invoked.

private static int curId;

public void cancel() {
   curId++;
}

public void run(Animation animation, Element element) {
   curId++;
   nativeRun(animation, curId);
}

private native void nativeRun(Animation animation, double id) /*-{
   var self = this;
   var handle = id;
   var callback = $entry(function(time) {
     if (handle !=

[email protected]::curId)
{
       return; // canceled.
     }
   });
/*-}

Done.

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/client/AnimationImplTimer.java
File user/src/com/google/gwt/animation/client/AnimationImplTimer.java
(right):

http://gwt-code-reviews.appspot.com/1355805/diff/3003/user/src/com/google/gwt/animation/client/AnimationImplTimer.java#newcode81
user/src/com/google/gwt/animation/client/AnimationImplTimer.java:81: //
Restart the timer if there is the only animation
On 2011/03/03 19:26:22, jlabanca wrote:
if there is => if this is

Done.

http://gwt-code-reviews.appspot.com/1355805/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to