OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 bool isAnimVal() const | 54 bool isAnimVal() const |
55 { | 55 { |
56 return m_propertyIsAnimVal == PropertyIsAnimVal; | 56 return m_propertyIsAnimVal == PropertyIsAnimVal; |
57 } | 57 } |
58 | 58 |
59 NewSVGPropertyTearOffBase* ownerList() const | 59 NewSVGPropertyTearOffBase* ownerList() const |
60 { | 60 { |
61 return m_ownerList; | 61 return m_ownerList; |
62 } | 62 } |
63 | 63 |
64 void setBelongingList(NewSVGPropertyTearOffBase* ownerList) | 64 void setOwnerList(NewSVGPropertyTearOffBase* ownerList) |
65 { | 65 { |
66 m_ownerList = ownerList; | 66 m_ownerList = ownerList; |
67 } | 67 } |
68 | 68 |
69 bool isReadOnlyProperty() const | 69 bool isReadOnlyProperty() const |
70 { | 70 { |
71 return m_isReadOnlyProperty; | 71 return m_isReadOnlyProperty; |
72 } | 72 } |
73 | 73 |
74 void setIsReadOnlyProperty() | 74 void setIsReadOnlyProperty() |
(...skipping 11 matching lines...) Expand all Loading... |
86 SVGElement* contextElement() | 86 SVGElement* contextElement() |
87 { | 87 { |
88 return m_contextElement; | 88 return m_contextElement; |
89 } | 89 } |
90 | 90 |
91 const QualifiedName& attributeName() | 91 const QualifiedName& attributeName() |
92 { | 92 { |
93 return m_attributeName; | 93 return m_attributeName; |
94 } | 94 } |
95 | 95 |
| 96 virtual AnimatedPropertyType type() const = 0; |
| 97 |
96 protected: | 98 protected: |
97 NewSVGPropertyTearOffBase(SVGElement* contextElement, PropertyIsAnimValType
propertyIsAnimVal, const QualifiedName& attributeName = nullQName()) | 99 NewSVGPropertyTearOffBase(SVGElement* contextElement, PropertyIsAnimValType
propertyIsAnimVal, const QualifiedName& attributeName = nullQName()) |
98 : m_contextElement(contextElement) | 100 : m_contextElement(contextElement) |
99 , m_ownerList(0) | 101 , m_ownerList(0) |
100 , m_propertyIsAnimVal(propertyIsAnimVal) | 102 , m_propertyIsAnimVal(propertyIsAnimVal) |
101 , m_isReadOnlyProperty(false) | 103 , m_isReadOnlyProperty(false) |
102 , m_attributeName(attributeName) | 104 , m_attributeName(attributeName) |
103 { | 105 { |
104 } | 106 } |
105 | 107 |
(...skipping 13 matching lines...) Expand all Loading... |
119 Property* target() | 121 Property* target() |
120 { | 122 { |
121 return m_target.get(); | 123 return m_target.get(); |
122 } | 124 } |
123 | 125 |
124 void setTarget(PassRefPtr<Property> target) | 126 void setTarget(PassRefPtr<Property> target) |
125 { | 127 { |
126 m_target = target; | 128 m_target = target; |
127 } | 129 } |
128 | 130 |
| 131 virtual AnimatedPropertyType type() const OVERRIDE |
| 132 { |
| 133 return Property::classType(); |
| 134 } |
| 135 |
129 protected: | 136 protected: |
130 NewSVGPropertyTearOff(PassRefPtr<Property> target, SVGElement* contextElemen
t, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeName =
nullQName()) | 137 NewSVGPropertyTearOff(PassRefPtr<Property> target, SVGElement* contextElemen
t, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeName =
nullQName()) |
131 : NewSVGPropertyTearOffBase(contextElement, propertyIsAnimVal, attribute
Name) | 138 : NewSVGPropertyTearOffBase(contextElement, propertyIsAnimVal, attribute
Name) |
132 , m_target(target) | 139 , m_target(target) |
133 { | 140 { |
134 ASSERT(m_target); | 141 ASSERT(m_target); |
135 } | 142 } |
136 | 143 |
137 private: | 144 private: |
138 RefPtr<Property> m_target; | 145 RefPtr<Property> m_target; |
139 }; | 146 }; |
140 | 147 |
141 } | 148 } |
142 | 149 |
143 #endif // NewSVGPropertyTearOff_h | 150 #endif // NewSVGPropertyTearOff_h |
OLD | NEW |