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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGAnimatedHref.cpp

Issue 1917843002: Return the 'active' value for SVGURIReference.href.animVal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just a note Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/dom/href-semantics.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/svg/SVGAnimatedHref.h" 5 #include "core/svg/SVGAnimatedHref.h"
6 6
7 #include "core/SVGNames.h" 7 #include "core/SVGNames.h"
8 #include "core/XLinkNames.h" 8 #include "core/XLinkNames.h"
9 #include "core/frame/UseCounter.h" 9 #include "core/frame/UseCounter.h"
10 #include "core/svg/SVGElement.h" 10 #include "core/svg/SVGElement.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 void SVGAnimatedHref::setBaseVal(const String& value, ExceptionState& exceptionS tate) 58 void SVGAnimatedHref::setBaseVal(const String& value, ExceptionState& exceptionS tate)
59 { 59 {
60 UseCounter::count(contextElement()->document(), UseCounter::SVGHrefBaseVal); 60 UseCounter::count(contextElement()->document(), UseCounter::SVGHrefBaseVal);
61 return backingString()->SVGAnimatedString::setBaseVal(value, exceptionState) ; 61 return backingString()->SVGAnimatedString::setBaseVal(value, exceptionState) ;
62 } 62 }
63 63
64 String SVGAnimatedHref::animVal() 64 String SVGAnimatedHref::animVal()
65 { 65 {
66 UseCounter::count(contextElement()->document(), UseCounter::SVGHrefAnimVal); 66 UseCounter::count(contextElement()->document(), UseCounter::SVGHrefAnimVal);
67 // We should only animate (non-XLink) 'href'. 67 return backingString()->SVGAnimatedString::animVal();
68 return SVGAnimatedString::animVal();
69 } 68 }
70 69
71 SVGAnimatedString* SVGAnimatedHref::backingString() 70 SVGAnimatedString* SVGAnimatedHref::backingString()
72 { 71 {
73 return useXLink() ? m_xlinkHref.get() : this; 72 return useXLink() ? m_xlinkHref.get() : this;
74 } 73 }
75 74
76 const SVGAnimatedString* SVGAnimatedHref::backingString() const 75 const SVGAnimatedString* SVGAnimatedHref::backingString() const
77 { 76 {
78 return useXLink() ? m_xlinkHref.get() : this; 77 return useXLink() ? m_xlinkHref.get() : this;
79 } 78 }
80 79
81 bool SVGAnimatedHref::useXLink() const 80 bool SVGAnimatedHref::useXLink() const
82 { 81 {
83 return !SVGAnimatedString::isSpecified() && m_xlinkHref->isSpecified(); 82 return !SVGAnimatedString::isSpecified() && m_xlinkHref->isSpecified();
84 } 83 }
85 84
86 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/dom/href-semantics.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698