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

Unified Diff: third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp

Issue 2132323002: Add some additional SMIL use counters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/animation/SVGSMILElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
index 4a0b73756cebe5719c9df47e1d3f24ff49437a5e..16e96c95d1fb07509a384b6befcf8532ec9280fe 100644
--- a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
@@ -317,6 +317,8 @@ Node::InsertionNotificationRequest SVGSMILElement::insertedInto(ContainerNode* r
return InsertionDone;
Deprecation::countDeprecation(document(), UseCounter::SVGSMILElementInDocument);
+ if (document().isLoadCompleted())
+ UseCounter::count(&document(), UseCounter::SVGSMILElementInsertedAfterLoad);
setAttributeName(constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr)));
SVGSVGElement* owner = ownerSVGElement();
@@ -470,14 +472,17 @@ bool SVGSMILElement::parseCondition(const String& value, BeginOrEnd beginOrEnd)
nameString = "repeatn";
type = Condition::EventBase;
} else if (nameString == "begin" || nameString == "end") {
+ UseCounter::count(&document(), UseCounter::SVGSMILBeginOrEndSyncbaseValue);
if (baseID.isEmpty())
return false;
shans 2016/07/11 22:49:24 Would it be worth counting after this point? Seems
suzyh_UTC10 (ex-contributor) 2016/07/13 06:04:44 Done.
type = Condition::Syncbase;
} else if (nameString.startsWith("accesskey(")) {
// FIXME: accesskey() support.
type = Condition::AccessKey;
- } else
+ } else {
+ UseCounter::count(&document(), UseCounter::SVGSMILBeginOrEndEventValue);
shans 2016/07/11 22:49:24 Interesting that this is the catch-all condition.
type = Condition::EventBase;
+ }
m_conditions.append(Condition::create(type, beginOrEnd, baseID, nameString, offset, repeat));
« 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