RESOLVED FIXED 53513
LayoutTests/animations/play-state.html has wrong behavior with accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=53513
Summary LayoutTests/animations/play-state.html has wrong behavior with accelerated co...
Chris Marrin
Reported 2011-02-01 11:36:37 PST
The top blue box is animated using -webkit-transform. It should stop after 2 sec and then continue from where it left off. But it continues to animation and then after 1 more second it hops back to where the red box is and continues its animation. The test passes because when we see the animation is stopped we simply return the current software value so we miss the fact that the animation is still running. This is most likely a regression caused by recent restructuring of the accelerated animation code. We are probably failing to remove the hardware animation when a pause comes in.
Attachments
Patch (4.14 KB, patch)
2011-02-04 16:52 PST, Chris Marrin
no flags
Patch (10.22 KB, patch)
2011-02-07 11:25 PST, Chris Marrin
no flags
Patch (7.46 KB, patch)
2011-02-08 10:45 PST, Chris Marrin
no flags
Patch (9.95 KB, patch)
2011-02-08 19:53 PST, Chris Marrin
simon.fraser: review+
Chris Marrin
Comment 1 2011-02-04 16:52:22 PST
Simon Fraser (smfr)
Comment 2 2011-02-07 10:50:25 PST
Comment on attachment 81322 [details] Patch The copy ctor should take a const&
Chris Marrin
Comment 3 2011-02-07 11:25:56 PST
Eric Seidel (no email)
Comment 4 2011-02-07 12:33:59 PST
This feels kinda strange to use Foo::create(*foo.get()). I wonder if an explicit ->copy() call would be claeaner since there you can do Foo::create(*this) which I think is more common to see. Not sure. I'm trying to think of places where we have objects was pass around as pointer and yet have copy constructors. I can't think of any.
James Robinson
Comment 5 2011-02-07 12:38:36 PST
Comment on attachment 81500 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=81500&action=review > Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1510 > + RefPtr<PlatformCAAnimation> newAnim = PlatformCAAnimation::create(*(curAnim.get())); nit: *curAnim should do the same thing as *(curAnim.get()) for all of the WTF smart pointer types thanks to the operator* overload on them.
Chris Marrin
Comment 6 2011-02-07 16:23:56 PST
(In reply to comment #5) > (From update of attachment 81500 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=81500&action=review > > > Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1510 > > + RefPtr<PlatformCAAnimation> newAnim = PlatformCAAnimation::create(*(curAnim.get())); > > nit: *curAnim should do the same thing as *(curAnim.get()) for all of the WTF smart pointer types thanks to the operator* overload on them. Good point. Actually this whole thing seems wrong. I put in my changelog that I was messing with the "copy constructor". Simon called me on it, saying that I was using the wrong signature for copy constructors, so I naively fixed that. The problem is that this isn't really a copy constructor at all. You can't call the constructor at all in fact. You have to go through the create method which doesn't have any implicit copy semantics as far as C++ is concerned. So I think I should go back to the old call signature. Maybe i should call this method "copy()" rather than "create()" although that would break with convention a bit.
Eric Seidel (no email)
Comment 7 2011-02-07 16:34:27 PST
You could just have a ->copy() method on the instance which returns a new instance, no?
Chris Marrin
Comment 8 2011-02-07 17:37:31 PST
(In reply to comment #7) > You could just have a ->copy() method on the instance which returns a new instance, no? Sure, I've never seen that pattern. Typically these functions are called create() with the same signature as the ctor. But I'll call it copy to avoid the local confusion.
Darin Adler
Comment 9 2011-02-07 20:18:10 PST
(In reply to comment #8) > Sure, I've never seen that pattern. Typically these functions are called create() with the same signature as the ctor. But I'll call it copy to avoid the local confusion. I looked around for examples, and found them in these files: CSSStyleDeclaration.h CSSValueList.h EditingStyle.h FormData.h HistoryItem.h SVGPathByteStream.h SVGRenderStyle.h SVGRenderStyleDefs.h SharedBuffer.h StorageAreaImpl.h StorageMap.h StorageNamespace.h StyleBackgroundData.h StyleBoxData.h StyleFlexibleBoxData.h StyleInheritedData.h StyleMarqueeData.h StyleMultiColData.h StyleRareInheritedData.h StyleRareNonInheritedData.h StyleSurroundData.h StyleTransformData.h StyleVisualData.h
Chris Marrin
Comment 10 2011-02-08 10:45:51 PST
Simon Fraser (smfr)
Comment 11 2011-02-08 10:54:35 PST
Comment on attachment 81659 [details] Patch copy() should be a const method on the original, that returns a copy.
Chris Marrin
Comment 12 2011-02-08 19:53:57 PST
Build Bot
Comment 13 2011-02-08 20:17:48 PST
Simon Fraser (smfr)
Comment 14 2011-02-08 20:55:46 PST
Comment on attachment 81736 [details] Patch r=me assuming you fix the Windows build failure: PlatformCAAnimationWin.cpp(190) : error C3861: 'setNonZeroBeginTimeFlag': identifier not found
Chris Marrin
Comment 15 2011-02-09 06:09:53 PST
Dean Jackson
Comment 16 2011-02-10 20:25:24 PST
*** Bug 54261 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.