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 #include "config.h" | 5 #include "config.h" |
6 #include "core/animation/LengthStyleInterpolation.h" | 6 #include "core/animation/LengthStyleInterpolation.h" |
7 | 7 |
8 #include "core/animation/css/CSSAnimatableValueFactory.h" | 8 #include "core/animation/css/CSSAnimatableValueFactory.h" |
9 #include "core/css/CSSCalculationValue.h" | 9 #include "core/css/CSSCalculationValue.h" |
10 #include "core/css/resolver/StyleBuilder.h" | 10 #include "core/css/resolver/StyleBuilder.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 else if (typeIsPresent) | 119 else if (typeIsPresent) |
120 return false; | 120 return false; |
121 } | 121 } |
122 return result; | 122 return result; |
123 } | 123 } |
124 | 124 |
125 LengthStyleInterpolation::LengthSetter LengthStyleInterpolation::lengthSetterFor
Property(CSSPropertyID property) | 125 LengthStyleInterpolation::LengthSetter LengthStyleInterpolation::lengthSetterFor
Property(CSSPropertyID property) |
126 { | 126 { |
127 switch (property) { | 127 switch (property) { |
128 case CSSPropertyBottom: | 128 case CSSPropertyBottom: |
129 return &LayoutStyle::setBottom; | 129 return &ComputedStyle::setBottom; |
130 case CSSPropertyCx: | 130 case CSSPropertyCx: |
131 return &LayoutStyle::setCx; | 131 return &ComputedStyle::setCx; |
132 case CSSPropertyCy: | 132 case CSSPropertyCy: |
133 return &LayoutStyle::setCy; | 133 return &ComputedStyle::setCy; |
134 case CSSPropertyFlexBasis: | 134 case CSSPropertyFlexBasis: |
135 return &LayoutStyle::setFlexBasis; | 135 return &ComputedStyle::setFlexBasis; |
136 case CSSPropertyHeight: | 136 case CSSPropertyHeight: |
137 return &LayoutStyle::setHeight; | 137 return &ComputedStyle::setHeight; |
138 case CSSPropertyLeft: | 138 case CSSPropertyLeft: |
139 return &LayoutStyle::setLeft; | 139 return &ComputedStyle::setLeft; |
140 case CSSPropertyLineHeight: | 140 case CSSPropertyLineHeight: |
141 return &LayoutStyle::setLineHeight; | 141 return &ComputedStyle::setLineHeight; |
142 case CSSPropertyMarginBottom: | 142 case CSSPropertyMarginBottom: |
143 return &LayoutStyle::setMarginBottom; | 143 return &ComputedStyle::setMarginBottom; |
144 case CSSPropertyMarginLeft: | 144 case CSSPropertyMarginLeft: |
145 return &LayoutStyle::setMarginLeft; | 145 return &ComputedStyle::setMarginLeft; |
146 case CSSPropertyMarginRight: | 146 case CSSPropertyMarginRight: |
147 return &LayoutStyle::setMarginRight; | 147 return &ComputedStyle::setMarginRight; |
148 case CSSPropertyMarginTop: | 148 case CSSPropertyMarginTop: |
149 return &LayoutStyle::setMarginTop; | 149 return &ComputedStyle::setMarginTop; |
150 case CSSPropertyMaxHeight: | 150 case CSSPropertyMaxHeight: |
151 return &LayoutStyle::setMaxHeight; | 151 return &ComputedStyle::setMaxHeight; |
152 case CSSPropertyMaxWidth: | 152 case CSSPropertyMaxWidth: |
153 return &LayoutStyle::setMaxWidth; | 153 return &ComputedStyle::setMaxWidth; |
154 case CSSPropertyMinHeight: | 154 case CSSPropertyMinHeight: |
155 return &LayoutStyle::setMinHeight; | 155 return &ComputedStyle::setMinHeight; |
156 case CSSPropertyMinWidth: | 156 case CSSPropertyMinWidth: |
157 return &LayoutStyle::setMinWidth; | 157 return &ComputedStyle::setMinWidth; |
158 case CSSPropertyMotionOffset: | 158 case CSSPropertyMotionOffset: |
159 return &LayoutStyle::setMotionOffset; | 159 return &ComputedStyle::setMotionOffset; |
160 case CSSPropertyPaddingBottom: | 160 case CSSPropertyPaddingBottom: |
161 return &LayoutStyle::setPaddingBottom; | 161 return &ComputedStyle::setPaddingBottom; |
162 case CSSPropertyPaddingLeft: | 162 case CSSPropertyPaddingLeft: |
163 return &LayoutStyle::setPaddingLeft; | 163 return &ComputedStyle::setPaddingLeft; |
164 case CSSPropertyPaddingRight: | 164 case CSSPropertyPaddingRight: |
165 return &LayoutStyle::setPaddingRight; | 165 return &ComputedStyle::setPaddingRight; |
166 case CSSPropertyPaddingTop: | 166 case CSSPropertyPaddingTop: |
167 return &LayoutStyle::setPaddingTop; | 167 return &ComputedStyle::setPaddingTop; |
168 case CSSPropertyR: | 168 case CSSPropertyR: |
169 return &LayoutStyle::setR; | 169 return &ComputedStyle::setR; |
170 case CSSPropertyRx: | 170 case CSSPropertyRx: |
171 return &LayoutStyle::setRx; | 171 return &ComputedStyle::setRx; |
172 case CSSPropertyRy: | 172 case CSSPropertyRy: |
173 return &LayoutStyle::setRy; | 173 return &ComputedStyle::setRy; |
174 case CSSPropertyRight: | 174 case CSSPropertyRight: |
175 return &LayoutStyle::setRight; | 175 return &ComputedStyle::setRight; |
176 case CSSPropertyShapeMargin: | 176 case CSSPropertyShapeMargin: |
177 return &LayoutStyle::setShapeMargin; | 177 return &ComputedStyle::setShapeMargin; |
178 case CSSPropertyStrokeDashoffset: | 178 case CSSPropertyStrokeDashoffset: |
179 return &LayoutStyle::setStrokeDashOffset; | 179 return &ComputedStyle::setStrokeDashOffset; |
180 case CSSPropertyTop: | 180 case CSSPropertyTop: |
181 return &LayoutStyle::setTop; | 181 return &ComputedStyle::setTop; |
182 case CSSPropertyWidth: | 182 case CSSPropertyWidth: |
183 return &LayoutStyle::setWidth; | 183 return &ComputedStyle::setWidth; |
184 case CSSPropertyWebkitPerspectiveOriginX: | 184 case CSSPropertyWebkitPerspectiveOriginX: |
185 return &LayoutStyle::setPerspectiveOriginX; | 185 return &ComputedStyle::setPerspectiveOriginX; |
186 case CSSPropertyWebkitPerspectiveOriginY: | 186 case CSSPropertyWebkitPerspectiveOriginY: |
187 return &LayoutStyle::setPerspectiveOriginY; | 187 return &ComputedStyle::setPerspectiveOriginY; |
188 case CSSPropertyWebkitTransformOriginX: | 188 case CSSPropertyWebkitTransformOriginX: |
189 return &LayoutStyle::setTransformOriginX; | 189 return &ComputedStyle::setTransformOriginX; |
190 case CSSPropertyWebkitTransformOriginY: | 190 case CSSPropertyWebkitTransformOriginY: |
191 return &LayoutStyle::setTransformOriginY; | 191 return &ComputedStyle::setTransformOriginY; |
192 case CSSPropertyX: | 192 case CSSPropertyX: |
193 return &LayoutStyle::setX; | 193 return &ComputedStyle::setX; |
194 case CSSPropertyY: | 194 case CSSPropertyY: |
195 return &LayoutStyle::setY; | 195 return &ComputedStyle::setY; |
196 // These properties don't have a LayoutStyle setter with the signature void(
*)(const Length&). | 196 // These properties don't have a ComputedStyle setter with the signature voi
d(*)(const Length&). |
197 case CSSPropertyBaselineShift: | 197 case CSSPropertyBaselineShift: |
198 case CSSPropertyBorderBottomWidth: | 198 case CSSPropertyBorderBottomWidth: |
199 case CSSPropertyBorderLeftWidth: | 199 case CSSPropertyBorderLeftWidth: |
200 case CSSPropertyBorderRightWidth: | 200 case CSSPropertyBorderRightWidth: |
201 case CSSPropertyBorderTopWidth: | 201 case CSSPropertyBorderTopWidth: |
202 case CSSPropertyFontSize: | 202 case CSSPropertyFontSize: |
203 case CSSPropertyLetterSpacing: | 203 case CSSPropertyLetterSpacing: |
204 case CSSPropertyOutlineOffset: | 204 case CSSPropertyOutlineOffset: |
205 case CSSPropertyOutlineWidth: | 205 case CSSPropertyOutlineWidth: |
206 case CSSPropertyPerspective: | 206 case CSSPropertyPerspective: |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 StyleBuilder::applyProperty(m_id, state, fromInterpolableValue(*m_cached
Value, m_range).get()); | 325 StyleBuilder::applyProperty(m_id, state, fromInterpolableValue(*m_cached
Value, m_range).get()); |
326 } | 326 } |
327 } | 327 } |
328 | 328 |
329 DEFINE_TRACE(LengthStyleInterpolation) | 329 DEFINE_TRACE(LengthStyleInterpolation) |
330 { | 330 { |
331 StyleInterpolation::trace(visitor); | 331 StyleInterpolation::trace(visitor); |
332 } | 332 } |
333 | 333 |
334 } | 334 } |
OLD | NEW |