Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp

Issue 2243173002: SVG: Use counters for SMIL methods on animation elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698