X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Fanimation%2Fcss%2FCSSPendingAnimations.cpp;h=2156055407e9926ea0b37d63d2a15785bc3a676b;hb=8be7648e3bc188a587d5050c5a945c1099957e8b;hp=86fcff510045f48d8ba016d0512aa938308dd534;hpb=3cb1527a1d0111fd75188ac2c34c117944473076;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/animation/css/CSSPendingAnimations.cpp b/src/third_party/WebKit/Source/core/animation/css/CSSPendingAnimations.cpp index 86fcff5..2156055 100644 --- a/src/third_party/WebKit/Source/core/animation/css/CSSPendingAnimations.cpp +++ b/src/third_party/WebKit/Source/core/animation/css/CSSPendingAnimations.cpp @@ -34,6 +34,7 @@ #include "core/animation/Animation.h" #include "core/animation/DocumentTimeline.h" #include "core/frame/FrameView.h" +#include "core/page/Page.h" #include "core/rendering/RenderLayer.h" namespace WebCore { @@ -41,6 +42,14 @@ namespace WebCore { void CSSPendingAnimations::add(AnimationPlayer* player) { ASSERT(player->source()->isAnimation()); + + Page* page = player->timeline()->document()->page(); + bool visible = page && page->visibilityState() == PageVisibilityStateVisible; + if (!player->hasStartTime() && !visible) { + player->setStartTime(player->timeline()->currentTime()); + return; + } + m_pending.append(player); }