Chromium Code Reviews| Index: third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp |
| diff --git a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp |
| index 08df54b3caadea6ab5b8d99a7f12821107baa6af..0db222f04de0d196c7177082ad41d6c8c5e1f088 100644 |
| --- a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp |
| +++ b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp |
| @@ -239,6 +239,7 @@ void SVGAnimationElement::animationAttributeChanged() |
| float SVGAnimationElement::getStartTime(ExceptionState& exceptionState) const |
| { |
| + UseCounter::count(document(), UseCounter::SVGSMILAnimationElementTiming); |
|
kouhei (in TOK)
2016/08/15 03:34:45
If you intend to only measure JS callers, you can
Eric Willigers
2016/08/15 04:31:49
Done.
|
| SMILTime startTime = intervalBegin(); |
| if (!startTime.isFinite()) { |
| exceptionState.throwDOMException(InvalidStateError, "No current interval."); |
| @@ -249,11 +250,13 @@ float SVGAnimationElement::getStartTime(ExceptionState& exceptionState) const |
| float SVGAnimationElement::getCurrentTime() const |
| { |
| + UseCounter::count(document(), UseCounter::SVGSMILAnimationElementTiming); |
| return narrowPrecisionToFloat(elapsed().value()); |
| } |
| float SVGAnimationElement::getSimpleDuration(ExceptionState& exceptionState) const |
| { |
| + UseCounter::count(document(), UseCounter::SVGSMILAnimationElementTiming); |
| SMILTime duration = simpleDuration(); |
| if (!duration.isFinite()) { |
| exceptionState.throwDOMException(NotSupportedError, "No simple duration defined."); |
| @@ -270,6 +273,7 @@ void SVGAnimationElement::beginElement() |
| void SVGAnimationElement::beginElementAt(float offset) |
| { |
| ASSERT(std::isfinite(offset)); |
| + UseCounter::count(document(), UseCounter::SVGSMILBeginEndAnimationElement); |
| SMILTime elapsed = this->elapsed(); |
| addBeginTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin); |
| } |
| @@ -282,6 +286,7 @@ void SVGAnimationElement::endElement() |
| void SVGAnimationElement::endElementAt(float offset) |
| { |
| ASSERT(std::isfinite(offset)); |
| + UseCounter::count(document(), UseCounter::SVGSMILBeginEndAnimationElement); |
| SMILTime elapsed = this->elapsed(); |
| addEndTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin); |
| } |