#include "core/animation/Animation.h"
#include "core/animation/DocumentTimeline.h"
#include "core/frame/FrameView.h"
+#include "core/rendering/RenderLayer.h"
namespace WebCore {
// The actual start time is either this value, or the time that
// this animation, or an animation that it is synchronized with
// is started on the compositor.
- const double defaultStartTime = player->timeline().currentTime();
+ const double defaultStartTime = player->timeline()->currentTime();
m_pending.append(std::make_pair(player, defaultStartTime));
}
bool CSSPendingAnimations::startPendingAnimations()
{
+ // FIXME: This is called from within style recalc, at which point compositor state is not up to date.
+ // https://code.google.com/p/chromium/issues/detail?id=339847
+ DisableCompositingQueryAsserts disabler;
+
bool startedOnCompositor = false;
for (size_t i = 0; i < m_pending.size(); ++i) {
if (m_pending[i].first->maybeStartAnimationOnCompositor())
for (size_t i = 0; i < m_pending.size(); ++i)
m_waitingForCompositorAnimationStart.append(m_pending[i].first);
} else {
- for (size_t i = 0; i < m_pending.size(); ++i)
+ for (size_t i = 0; i < m_pending.size(); ++i) {
m_pending[i].first->setStartTime(m_pending[i].second);
+ m_pending[i].first->update();
+ }
}
m_pending.clear();
{
for (size_t i = 0; i < m_waitingForCompositorAnimationStart.size(); ++i) {
Player* player = m_waitingForCompositorAnimationStart[i].get();
- player->setStartTime(monotonicAnimationStartTime - player->timeline().zeroTime());
+ player->setStartTime(monotonicAnimationStartTime - player->timeline()->zeroTime());
+ player->update();
}
m_waitingForCompositorAnimationStart.clear();