Chromium Code Reviews| Index: Source/core/animation/css/CSSPendingAnimations.cpp |
| diff --git a/Source/core/animation/css/CSSPendingAnimations.cpp b/Source/core/animation/css/CSSPendingAnimations.cpp |
| index eac01ad63e92e40fb9a85025b31055a8a511189d..d4ca6f4e792de05fdd277069db6e2621d206e2dc 100644 |
| --- a/Source/core/animation/css/CSSPendingAnimations.cpp |
| +++ b/Source/core/animation/css/CSSPendingAnimations.cpp |
| @@ -41,22 +41,14 @@ namespace WebCore { |
| void CSSPendingAnimations::add(Player* player) |
| { |
| ASSERT(player->source()->isAnimation()); |
| - // 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(); |
| - m_pending.append(std::make_pair(player, defaultStartTime)); |
| + m_pending.append(player); |
| } |
| 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; |
|
abarth-chromium
2014/02/20 19:32:31
Ah, I missed this. Great!
|
| - |
| bool startedOnCompositor = false; |
| for (size_t i = 0; i < m_pending.size(); ++i) { |
| - if (m_pending[i].first->maybeStartAnimationOnCompositor()) |
| + if (m_pending[i]->maybeStartAnimationOnCompositor()) |
| startedOnCompositor = true; |
| } |
| @@ -65,11 +57,11 @@ bool CSSPendingAnimations::startPendingAnimations() |
| // start immediately. |
| if (startedOnCompositor) { |
| for (size_t i = 0; i < m_pending.size(); ++i) |
| - m_waitingForCompositorAnimationStart.append(m_pending[i].first); |
| + m_waitingForCompositorAnimationStart.append(m_pending[i]); |
| } else { |
| 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[i]->setStartTime(m_pending[i]->timeline()->currentTime()); |
| + m_pending[i]->update(); |
| } |
| } |
| m_pending.clear(); |