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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 24 matching lines...) Expand all
35 #include "core/svg/properties/SVGProperty.h" 35 #include "core/svg/properties/SVGProperty.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class SVGString : public SVGPropertyBase { 39 class SVGString : public SVGPropertyBase {
40 public: 40 public:
41 // SVGString does not have a tear-off type. 41 // SVGString does not have a tear-off type.
42 typedef void TearOffType; 42 typedef void TearOffType;
43 typedef String PrimitiveType; 43 typedef String PrimitiveType;
44 44
45 static PassRefPtrWillBeRawPtr<SVGString> create() 45 static RawPtr<SVGString> create()
46 { 46 {
47 return adoptRefWillBeNoop(new SVGString()); 47 return new SVGString();
48 } 48 }
49 49
50 static PassRefPtrWillBeRawPtr<SVGString> create(const String& value) 50 static RawPtr<SVGString> create(const String& value)
51 { 51 {
52 return adoptRefWillBeNoop(new SVGString(value)); 52 return new SVGString(value);
53 } 53 }
54 54
55 PassRefPtrWillBeRawPtr<SVGString> clone() const { return create(m_value); } 55 RawPtr<SVGString> clone() const { return create(m_value); }
56 PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const String& valu e) const override 56 RawPtr<SVGPropertyBase> cloneForAnimation(const String& value) const overrid e
57 { 57 {
58 return create(value); 58 return create(value);
59 } 59 }
60 60
61 String valueAsString() const override { return m_value; } 61 String valueAsString() const override { return m_value; }
62 SVGParsingError setValueAsString(const String& value) 62 SVGParsingError setValueAsString(const String& value)
63 { 63 {
64 m_value = value; 64 m_value = value;
65 return SVGParseStatus::NoError; 65 return SVGParseStatus::NoError;
66 } 66 }
67 67
68 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; 68 void add(RawPtr<SVGPropertyBase>, SVGElement*) override;
69 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio nValue, SVGElement*) override; 69 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, RawPtr<SVGPropertyBase> from, RawPtr<SVGPropertyBase> to, RawPtr<S VGPropertyBase> toAtEndOfDurationValue, SVGElement*) override;
70 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme nt*) override; 70 float calculateDistance(RawPtr<SVGPropertyBase> to, SVGElement*) override;
71 71
72 const String& value() const { return m_value; } 72 const String& value() const { return m_value; }
73 void setValue(const String& value) { m_value = value; } 73 void setValue(const String& value) { m_value = value; }
74 74
75 static AnimatedPropertyType classType() { return AnimatedString; } 75 static AnimatedPropertyType classType() { return AnimatedString; }
76 76
77 private: 77 private:
78 SVGString() 78 SVGString()
79 : SVGPropertyBase(classType()) 79 : SVGPropertyBase(classType())
80 { 80 {
81 } 81 }
82 82
83 explicit SVGString(const String& value) 83 explicit SVGString(const String& value)
84 : SVGPropertyBase(classType()) 84 : SVGPropertyBase(classType())
85 , m_value(value) 85 , m_value(value)
86 { 86 {
87 } 87 }
88 88
89 String m_value; 89 String m_value;
90 }; 90 };
91 91
92 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGString); 92 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGString);
93 93
94 } // namespace blink 94 } // namespace blink
95 95
96 #endif // SVGString_h 96 #endif // SVGString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGStopElement.h ('k') | third_party/WebKit/Source/core/svg/SVGString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698