NEW 143488
[Gtk] Animation is not stopped when animation class is removed
https://bugs.webkit.org/show_bug.cgi?id=143488
Summary [Gtk] Animation is not stopped when animation class is removed
Eduard Kegulskiy
Reported 2015-04-07 11:20:59 PDT
Created attachment 250278 [details] HTML file showing the problem The problem is found with GTK port when accelerated Compositing is used. The attached test application is doing the following steps: 1. Apply translateZ(0) to <p> element 2. Apply CSS class called .delayedScrollingLabelA.animate to perform animation using -webkit-animation property. 3. Remove .delayedScrollingLabelA.animate class. At step (3), it is expected that animation should stop, however it continues. The problem does not happen if step (1) is omitted.
Attachments
HTML file showing the problem (1.83 KB, text/html)
2015-04-07 11:20 PDT, Eduard Kegulskiy
no flags
Eduard Kegulskiy
Comment 1 2015-04-07 11:31:02 PDT
The problem seems to be in GraphicsLayerTextureMapper class. Specifically, when animation is added, the GraphicsLayerTextureMapper::addAnimation() is called which does 2 things: 1. add new animation to m_animations set 2. calls notifyChange(AnimationChange) to notify m_layer that its own internal set of animations has been modified. However, when animation is removed via GraphicsLayerTextureMapper::removeAnimation(), the code only removes the animation from the m_animations set, but does not notify the m_layer. The proposed patch would be to add notifyChange(AnimationChange) call to both removeAnimation() and pauseAnimation() as following: void GraphicsLayerTextureMapper::pauseAnimation(const String& animationName, double timeOffset) { m_animations.pause(animationName, timeOffset); notifyChange(AnimationChange); } void GraphicsLayerTextureMapper::removeAnimation(const String& animationName) { m_animations.remove(animationName); notifyChange(AnimationChange); }
Eduard Kegulskiy
Comment 2 2015-04-09 11:48:35 PDT
Hi Alexei, do you think this bug is GTK-only? The GraphicsLayerTextureMapper class seems to be common code for all ports since it resides under webcore/platform/graphics/texmap folder? (sorry if I misunderstand something, I am new to webkit development community)
Note You need to log in before you can comment on or make changes to this bug.