[iOS WK2] Animations on vox.com look wrong
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 May 2014 17:29:22 +0000 (17:29 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 May 2014 17:29:22 +0000 (17:29 +0000)
commit5a8da3d1729957f0311cb76fd70952dd9c434680
tree591a9027311bd0029b737a11aecec98755056bf3
parent07a915d9dd5a9836b1c7e9a1ab65f63581372034
[iOS WK2] Animations on vox.com look wrong
https://bugs.webkit.org/show_bug.cgi?id=132462
<rdar://problem/16731884>

Reviewed by Sam Weinig.

PlatformCALayerRemote was managing animations incorrectly; aninations
would stick around in m_properties.addedAnimations and get added a second
time by mistake.

Animations have to be managed a little differently to other properties,
since they are not steady-state things. A given commit has to send over
the added and removed animations, and then clear the layer properties.

Do this by adding PlatformCALayerRemote::didCommit(), which is called
after the layer properties have been encoded, and have it clear the lists
of added and removed animations.

removeAnimationForKey() also has to remove the animation from addedAnimations
so that an add/remove in the same commit doesn't send the animation to the
UI process.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::didCommit):
(WebKit::PlatformCALayerRemote::removeAnimationForKey):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm