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

Side by Side Diff: Source/core/animation/LengthStyleInterpolation.cpp

Issue 991533003: Handle more <length> properties in animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: stroke-dashoffset setter exists + fixups + add tests Created 5 years, 9 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 #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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 &LayoutStyle::setBottom;
130 case CSSPropertyCx:
131 return &LayoutStyle::setCx;
132 case CSSPropertyCy:
133 return &LayoutStyle::setCy;
130 case CSSPropertyFlexBasis: 134 case CSSPropertyFlexBasis:
131 return &LayoutStyle::setFlexBasis; 135 return &LayoutStyle::setFlexBasis;
132 case CSSPropertyHeight: 136 case CSSPropertyHeight:
133 return &LayoutStyle::setHeight; 137 return &LayoutStyle::setHeight;
134 case CSSPropertyLeft: 138 case CSSPropertyLeft:
135 return &LayoutStyle::setLeft; 139 return &LayoutStyle::setLeft;
136 case CSSPropertyLineHeight: 140 case CSSPropertyLineHeight:
137 return &LayoutStyle::setLineHeight; 141 return &LayoutStyle::setLineHeight;
138 case CSSPropertyMarginBottom: 142 case CSSPropertyMarginBottom:
139 return &LayoutStyle::setMarginBottom; 143 return &LayoutStyle::setMarginBottom;
(...skipping 14 matching lines...) Expand all
154 case CSSPropertyMotionOffset: 158 case CSSPropertyMotionOffset:
155 return &LayoutStyle::setMotionOffset; 159 return &LayoutStyle::setMotionOffset;
156 case CSSPropertyPaddingBottom: 160 case CSSPropertyPaddingBottom:
157 return &LayoutStyle::setPaddingBottom; 161 return &LayoutStyle::setPaddingBottom;
158 case CSSPropertyPaddingLeft: 162 case CSSPropertyPaddingLeft:
159 return &LayoutStyle::setPaddingLeft; 163 return &LayoutStyle::setPaddingLeft;
160 case CSSPropertyPaddingRight: 164 case CSSPropertyPaddingRight:
161 return &LayoutStyle::setPaddingRight; 165 return &LayoutStyle::setPaddingRight;
162 case CSSPropertyPaddingTop: 166 case CSSPropertyPaddingTop:
163 return &LayoutStyle::setPaddingTop; 167 return &LayoutStyle::setPaddingTop;
168 case CSSPropertyR:
169 return &LayoutStyle::setR;
170 case CSSPropertyRx:
171 return &LayoutStyle::setRx;
172 case CSSPropertyRy:
173 return &LayoutStyle::setRy;
164 case CSSPropertyRight: 174 case CSSPropertyRight:
165 return &LayoutStyle::setRight; 175 return &LayoutStyle::setRight;
166 case CSSPropertyShapeMargin: 176 case CSSPropertyShapeMargin:
167 return &LayoutStyle::setShapeMargin; 177 return &LayoutStyle::setShapeMargin;
178 case CSSPropertyStrokeDashoffset:
179 return &LayoutStyle::setStrokeDashOffset;
168 case CSSPropertyTop: 180 case CSSPropertyTop:
169 return &LayoutStyle::setTop; 181 return &LayoutStyle::setTop;
170 case CSSPropertyWidth: 182 case CSSPropertyWidth:
171 return &LayoutStyle::setWidth; 183 return &LayoutStyle::setWidth;
184 case CSSPropertyX:
185 return &LayoutStyle::setX;
186 case CSSPropertyY:
187 return &LayoutStyle::setY;
172 // These properties don't have a LayoutStyle setter with the signature void( *)(const Length&). 188 // These properties don't have a LayoutStyle setter with the signature void( *)(const Length&).
173 case CSSPropertyBaselineShift: 189 case CSSPropertyBaselineShift:
174 case CSSPropertyBorderBottomWidth: 190 case CSSPropertyBorderBottomWidth:
175 case CSSPropertyBorderLeftWidth: 191 case CSSPropertyBorderLeftWidth:
176 case CSSPropertyBorderRightWidth: 192 case CSSPropertyBorderRightWidth:
177 case CSSPropertyBorderTopWidth: 193 case CSSPropertyBorderTopWidth:
178 case CSSPropertyFontSize: 194 case CSSPropertyFontSize:
179 case CSSPropertyLetterSpacing: 195 case CSSPropertyLetterSpacing:
180 case CSSPropertyOutlineOffset: 196 case CSSPropertyOutlineOffset:
181 case CSSPropertyOutlineWidth: 197 case CSSPropertyOutlineWidth:
182 case CSSPropertyPerspective: 198 case CSSPropertyPerspective:
183 case CSSPropertyStrokeDashoffset:
184 case CSSPropertyStrokeWidth: 199 case CSSPropertyStrokeWidth:
185 case CSSPropertyVerticalAlign: 200 case CSSPropertyVerticalAlign:
186 case CSSPropertyWebkitBorderHorizontalSpacing: 201 case CSSPropertyWebkitBorderHorizontalSpacing:
187 case CSSPropertyWebkitBorderVerticalSpacing: 202 case CSSPropertyWebkitBorderVerticalSpacing:
188 case CSSPropertyWebkitColumnGap: 203 case CSSPropertyWebkitColumnGap:
189 case CSSPropertyWebkitColumnRuleWidth: 204 case CSSPropertyWebkitColumnRuleWidth:
190 case CSSPropertyWebkitColumnWidth: 205 case CSSPropertyWebkitColumnWidth:
191 case CSSPropertyWordSpacing: 206 case CSSPropertyWordSpacing:
192 return nullptr; 207 return nullptr;
193 default: 208 default:
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 StyleBuilder::applyProperty(m_id, state, fromInterpolableValue(*m_cached Value, m_range).get()); 317 StyleBuilder::applyProperty(m_id, state, fromInterpolableValue(*m_cached Value, m_range).get());
303 } 318 }
304 } 319 }
305 320
306 DEFINE_TRACE(LengthStyleInterpolation) 321 DEFINE_TRACE(LengthStyleInterpolation)
307 { 322 {
308 StyleInterpolation::trace(visitor); 323 StyleInterpolation::trace(visitor);
309 } 324 }
310 325
311 } 326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698