| OLD | NEW |
| 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" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 PassRefPtrWillBeRawPtr<SVGAnimatedHref> SVGAnimatedHref::create(SVGElement* cont
extElement) | 14 RawPtr<SVGAnimatedHref> SVGAnimatedHref::create(SVGElement* contextElement) |
| 15 { | 15 { |
| 16 return adoptRefWillBeNoop(new SVGAnimatedHref(contextElement)); | 16 return new SVGAnimatedHref(contextElement); |
| 17 } | 17 } |
| 18 | 18 |
| 19 DEFINE_TRACE(SVGAnimatedHref) | 19 DEFINE_TRACE(SVGAnimatedHref) |
| 20 { | 20 { |
| 21 visitor->trace(m_xlinkHref); | 21 visitor->trace(m_xlinkHref); |
| 22 SVGAnimatedString::trace(visitor); | 22 SVGAnimatedString::trace(visitor); |
| 23 } | 23 } |
| 24 | 24 |
| 25 SVGAnimatedHref::SVGAnimatedHref(SVGElement* contextElement) | 25 SVGAnimatedHref::SVGAnimatedHref(SVGElement* contextElement) |
| 26 : SVGAnimatedString(contextElement, SVGNames::hrefAttr, SVGString::create()) | 26 : SVGAnimatedString(contextElement, SVGNames::hrefAttr, SVGString::create()) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 { | 77 { |
| 78 return useXLink() ? m_xlinkHref.get() : this; | 78 return useXLink() ? m_xlinkHref.get() : this; |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool SVGAnimatedHref::useXLink() const | 81 bool SVGAnimatedHref::useXLink() const |
| 82 { | 82 { |
| 83 return !SVGAnimatedString::isSpecified() && m_xlinkHref->isSpecified(); | 83 return !SVGAnimatedString::isSpecified() && m_xlinkHref->isSpecified(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| OLD | NEW |