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

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

Issue 1024473004: Do not treat '0' as 'none' for font-size-adjust (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comments 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/StringKeyframe.h" 6 #include "core/animation/StringKeyframe.h"
7 7
8 #include "core/animation/ColorStyleInterpolation.h" 8 #include "core/animation/ColorStyleInterpolation.h"
9 #include "core/animation/CompositorAnimations.h" 9 #include "core/animation/CompositorAnimations.h"
10 #include "core/animation/ConstantStyleInterpolation.h" 10 #include "core/animation/ConstantStyleInterpolation.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 // FIXME: Handle keywords e.g. 'smaller', 'larger'. 210 // FIXME: Handle keywords e.g. 'smaller', 'larger'.
211 if (property == CSSPropertyFontSize) 211 if (property == CSSPropertyFontSize)
212 fallBackToLegacy = true; 212 fallBackToLegacy = true;
213 213
214 // FIXME: Handle keywords e.g. 'baseline', 'sub'. 214 // FIXME: Handle keywords e.g. 'baseline', 'sub'.
215 if (property == CSSPropertyBaselineShift) 215 if (property == CSSPropertyBaselineShift)
216 fallBackToLegacy = true; 216 fallBackToLegacy = true;
217 217
218 break; 218 break;
219 case CSSPropertyFontSizeAdjust:
220 // FIXME: Requires special handing for 0.
221 fallBackToLegacy = true;
222 break;
223 case CSSPropertyOrphans: 219 case CSSPropertyOrphans:
224 case CSSPropertyWidows: 220 case CSSPropertyWidows:
225 case CSSPropertyZIndex: 221 case CSSPropertyZIndex:
226 case CSSPropertyWebkitColumnCount: 222 case CSSPropertyWebkitColumnCount:
227 case CSSPropertyShapeImageThreshold: 223 case CSSPropertyShapeImageThreshold:
228 case CSSPropertyFillOpacity: 224 case CSSPropertyFillOpacity:
229 case CSSPropertyFloodOpacity: 225 case CSSPropertyFloodOpacity:
226 case CSSPropertyFontSizeAdjust:
230 case CSSPropertyOpacity: 227 case CSSPropertyOpacity:
231 case CSSPropertyStopOpacity: 228 case CSSPropertyStopOpacity:
232 case CSSPropertyStrokeOpacity: 229 case CSSPropertyStrokeOpacity:
233 case CSSPropertyStrokeMiterlimit: 230 case CSSPropertyStrokeMiterlimit:
234 if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyl eInterpolation::canCreateFrom(*toCSSValue)) 231 if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyl eInterpolation::canCreateFrom(*toCSSValue))
235 return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, toCSSPrimitiveValue(fromCSSValue)->primitiveType(), setRange(property) ); 232 return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, toCSSPrimitiveValue(fromCSSValue)->primitiveType(), setRange(property) );
233
dstockwell 2015/03/22 22:51:04 Nit. extra blank line.
changseok 2015/03/23 02:51:25 Done.
236 break; 234 break;
237 235
238 case CSSPropertyMotionRotation: { 236 case CSSPropertyMotionRotation: {
239 RefPtrWillBeRawPtr<Interpolation> interpolation = DoubleStyleInterpolati on::maybeCreateFromMotionRotation(*fromCSSValue, *toCSSValue, property); 237 RefPtrWillBeRawPtr<Interpolation> interpolation = DoubleStyleInterpolati on::maybeCreateFromMotionRotation(*fromCSSValue, *toCSSValue, property);
240 if (interpolation) 238 if (interpolation)
241 return interpolation.release(); 239 return interpolation.release();
242 break; 240 break;
243 } 241 }
244 case CSSPropertyVisibility: 242 case CSSPropertyVisibility:
245 if (VisibilityStyleInterpolation::canCreateFrom(*fromCSSValue) && Visibi lityStyleInterpolation::canCreateFrom(*toCSSValue) && (VisibilityStyleInterpolat ion::isVisible(*fromCSSValue) || VisibilityStyleInterpolation::isVisible(*toCSSV alue))) 243 if (VisibilityStyleInterpolation::canCreateFrom(*fromCSSValue) && Visibi lityStyleInterpolation::canCreateFrom(*toCSSValue) && (VisibilityStyleInterpolat ion::isVisible(*fromCSSValue) || VisibilityStyleInterpolation::isVisible(*toCSSV alue)))
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 402 }
405 403
406 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) 404 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe)
407 { 405 {
408 visitor->trace(m_value); 406 visitor->trace(m_value);
409 visitor->trace(m_animatableValueCache); 407 visitor->trace(m_animatableValueCache);
410 Keyframe::PropertySpecificKeyframe::trace(visitor); 408 Keyframe::PropertySpecificKeyframe::trace(visitor);
411 } 409 }
412 410
413 } 411 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698