OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef SVGPropertyHelper_h | 5 #ifndef SVGPropertyHelper_h |
6 #define SVGPropertyHelper_h | 6 #define SVGPropertyHelper_h |
7 | 7 |
8 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | |
9 #include "core/svg/properties/SVGProperty.h" | 8 #include "core/svg/properties/SVGProperty.h" |
10 | 9 |
11 namespace blink { | 10 namespace blink { |
12 | 11 |
13 template<typename Derived> | 12 template<typename Derived> |
14 class SVGPropertyHelper : public SVGPropertyBase { | 13 class SVGPropertyHelper : public SVGPropertyBase { |
15 public: | 14 public: |
16 SVGPropertyHelper() | 15 SVGPropertyHelper() |
17 : SVGPropertyBase(Derived::classType()) | 16 : SVGPropertyBase(Derived::classType()) |
18 { | 17 { |
19 } | 18 } |
20 | 19 |
21 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const Stri
ng& value) const | 20 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const Stri
ng& value) const |
22 { | 21 { |
23 RefPtrWillBeRawPtr<Derived> property = Derived::create(); | 22 RefPtrWillBeRawPtr<Derived> property = Derived::create(); |
24 property->setValueAsString(value, IGNORE_EXCEPTION); | 23 property->setValueAsString(value); |
25 return property.release(); | 24 return property.release(); |
26 } | 25 } |
27 }; | 26 }; |
28 | 27 |
29 } // namespace blink | 28 } // namespace blink |
30 | 29 |
31 #endif // SVGPropertyHelper_h | 30 #endif // SVGPropertyHelper_h |
OLD | NEW |