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

Unified Diff: Source/core/svg/SVGAnimatedString.cpp

Issue 1086873004: Add UseCounter for SVGURIReference.href.baseVal/animVal. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: move to SVGAnimatedString Created 5 years, 8 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
« Source/core/svg/SVGAnimatedString.h ('K') | « Source/core/svg/SVGAnimatedString.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimatedString.cpp
diff --git a/Source/core/svg/SVGAnimatedString.cpp b/Source/core/svg/SVGAnimatedString.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0628979262603f4a67b850e01a425bc8811d0557
--- /dev/null
+++ b/Source/core/svg/SVGAnimatedString.cpp
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "core/svg/SVGAnimatedString.h"
+
+#include "core/XLinkNames.h"
+#include "core/frame/UseCounter.h"
+#include "core/svg/SVGElement.h"
+
+namespace blink {
+
+WTF::String SVGAnimatedString::baseVal()
+{
+ if (this->attributeName() == XLinkNames::hrefAttr)
+ UseCounter::count(this->contextElement()->document(), UseCounter::SVGHrefBaseVal);
+ return SVGAnimatedProperty<SVGString>::baseVal();
+}
+
+void SVGAnimatedString::setBaseVal(WTF::String value, blink::ExceptionState& exceptionState)
+{
+ if (this->attributeName() == XLinkNames::hrefAttr)
+ UseCounter::count(this->contextElement()->document(), UseCounter::SVGHrefBaseVal);
+ return SVGAnimatedProperty<SVGString>::setBaseVal(value, exceptionState);
+}
+
+WTF::String SVGAnimatedString::animVal()
+{
+ if (this->attributeName() == XLinkNames::hrefAttr)
+ UseCounter::count(this->contextElement()->document(), UseCounter::SVGHrefAnimVal);
+ return SVGAnimatedProperty<SVGString>::animVal();
+}
+
+} // namespace blink
« Source/core/svg/SVGAnimatedString.h ('K') | « Source/core/svg/SVGAnimatedString.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698