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

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

Issue 2436793002: Simplify SVGAnimated* initialization (Closed)
Patch Set: Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/svg/properties/SVGAnimatedProperty.h" 36 #include "core/svg/properties/SVGAnimatedProperty.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class SVGAnimatedString : public SVGAnimatedProperty<SVGString>, 40 class SVGAnimatedString : public SVGAnimatedProperty<SVGString>,
41 public ScriptWrappable { 41 public ScriptWrappable {
42 DEFINE_WRAPPERTYPEINFO(); 42 DEFINE_WRAPPERTYPEINFO();
43 43
44 public: 44 public:
45 static SVGAnimatedString* create(SVGElement* contextElement, 45 static SVGAnimatedString* create(SVGElement* contextElement,
46 const QualifiedName& attributeName, 46 const QualifiedName& attributeName) {
47 SVGString* initialValue) { 47 return new SVGAnimatedString(contextElement, attributeName);
48 return new SVGAnimatedString(contextElement, attributeName, initialValue);
49 } 48 }
50 49
51 virtual String baseVal(); 50 virtual String baseVal();
52 virtual void setBaseVal(const String&, ExceptionState&); 51 virtual void setBaseVal(const String&, ExceptionState&);
53 virtual String animVal(); 52 virtual String animVal();
54 53
55 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 54 DECLARE_VIRTUAL_TRACE_WRAPPERS();
56 55
57 protected: 56 protected:
58 SVGAnimatedString(SVGElement* contextElement, 57 SVGAnimatedString(SVGElement* contextElement,
59 const QualifiedName& attributeName, 58 const QualifiedName& attributeName)
60 SVGString* initialValue)
61 : SVGAnimatedProperty<SVGString>(contextElement, 59 : SVGAnimatedProperty<SVGString>(contextElement,
62 attributeName, 60 attributeName,
63 initialValue) {} 61 SVGString::create()) {}
64 }; 62 };
65 63
66 } // namespace blink 64 } // namespace blink
67 65
68 #endif // SVGAnimatedString_h 66 #endif // SVGAnimatedString_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698