From ec32c90179236494792b58c6697160010520ba97 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 28 Feb 2013 14:07:18 +0100 Subject: [TexMap] REGRESSION(144183): It make negative delay tests fails https://bugs.webkit.org/show_bug.cgi?id=110989 Reviewed by Noam Rosenthal. Do not apply a negative offset to the animation starttime send to the GraphicLayerClient, it needs the actual animation start not a virtual start. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::addAnimation): Change-Id: I29824c949eb3975aa3ef56a966296e1fac436b50 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144204 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte --- .../platform/graphics/texmap/GraphicsLayerTextureMapper.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp index 136dc2169..5ba109066 100644 --- a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp +++ b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp @@ -543,8 +543,13 @@ bool GraphicsLayerTextureMapper::addAnimation(const KeyframeValueList& valueList if (valueList.property() == AnimatedPropertyWebkitTransform) listsMatch = validateTransformOperations(valueList, hasBigRotation) >= 0; - m_animationStartTime = WTF::currentTime() - timeOffset; - m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, m_animationStartTime, listsMatch)); + const double currentTime = WTF::currentTime(); + m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, currentTime - timeOffset, listsMatch)); + // m_animationStartTime is the time of the first real frame of animation, now or delayed by a negative offset. + if (timeOffset > 0) + m_animationStartTime = currentTime; + else + m_animationStartTime = currentTime - timeOffset; notifyChange(TextureMapperLayer::AnimationChange); m_animationStartedTimer.startOneShot(0); return true; -- cgit v1.2.3