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

Side by Side Diff: third_party/WebKit/Source/core/svg/properties/SVGPropertyHelper.h

Issue 1544673003: Refactor propagation of parsing errors for SVG attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698