Chromium Code Reviews| Index: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp |
| diff --git a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp |
| index 2d3d2d3c6140763cd1bbebf5a2f1ebfc18ec43eb..55cf1c8b2e857a67c7d8ce0373ab5373d6d7b1f9 100644 |
| --- a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp |
| +++ b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp |
| @@ -30,6 +30,7 @@ |
| #include "core/dom/ElementTraversal.h" |
| #include "core/frame/FrameView.h" |
| #include "core/frame/Settings.h" |
| +#include "core/frame/UseCounter.h" |
| #include "core/svg/SVGSVGElement.h" |
| #include "core/svg/animation/SVGSMILElement.h" |
| #include <algorithm> |
| @@ -47,6 +48,7 @@ SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner) |
| , m_presetStartTime(0) |
| , m_frameSchedulingState(Idle) |
| , m_documentOrderIndexesDirty(false) |
| + , m_hasUpdatedAnimation(false) |
| , m_wakeupTimer(this, &SMILTimeContainer::wakeupTimerFired) |
| , m_animationPolicyOnceTimer(this, &SMILTimeContainer::animationPolicyTimerFired) |
| , m_ownerSVGElement(&owner) |
| @@ -512,6 +514,11 @@ SMILTime SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime) |
| return earliestFireTime; |
| } |
| + if (!m_hasUpdatedAnimation) { |
| + m_hasUpdatedAnimation = true; |
| + UseCounter::count(&document(), UseCounter::SVGSMILAnimationAppliedEffect); |
|
fs
2016/07/21 10:17:33
You could ditch the m_hasUpdatedAnimation - once t
suzyh_UTC10 (ex-contributor)
2016/07/25 03:16:00
Done.
|
| + } |
| + |
| // Apply results to target elements. |
| for (unsigned i = 0; i < animationsToApplySize; ++i) |
| animationsToApply[i]->applyResultsToTarget(); |