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

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

Issue 813233002: Animation: Fix loss of type information when interpolating value of 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Attempt no2 at fixing linux oilpan errors Created 6 years 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/DeferredLegacyStyleInterpolation.h" 6 #include "core/animation/DeferredLegacyStyleInterpolation.h"
7 7
8 #include "core/animation/LegacyStyleInterpolation.h" 8 #include "core/animation/LegacyStyleInterpolation.h"
9 #include "core/css/CSSImageValue.h" 9 #include "core/css/CSSImageValue.h"
10 #include "core/css/CSSPrimitiveValue.h" 10 #include "core/css/CSSPrimitiveValue.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 { 51 {
52 // FIXME: consider other types. 52 // FIXME: consider other types.
53 if (primitiveValue.isNumber() || primitiveValue.isPercentage() || primitiveV alue.isAngle() || primitiveValue.isRGBColor() || primitiveValue.isURI()) 53 if (primitiveValue.isNumber() || primitiveValue.isPercentage() || primitiveV alue.isAngle() || primitiveValue.isRGBColor() || primitiveValue.isURI())
54 return false; 54 return false;
55 55
56 if (primitiveValue.isLength()) 56 if (primitiveValue.isLength())
57 return primitiveValue.isFontRelativeLength() || primitiveValue.isViewpor tPercentageLength(); 57 return primitiveValue.isFontRelativeLength() || primitiveValue.isViewpor tPercentageLength();
58 58
59 if (primitiveValue.isCalculated()) { 59 if (primitiveValue.isCalculated()) {
60 CSSLengthArray lengthArray(CSSPrimitiveValue::LengthUnitTypeCount); 60 CSSLengthArray lengthArray(CSSPrimitiveValue::LengthUnitTypeCount);
61 primitiveValue.accumulateLengthArray(lengthArray); 61 CSSLengthTypeArray lengthTypeArray(CSSPrimitiveValue::LengthUnitTypeCoun t);
62 primitiveValue.accumulateLengthArray(lengthArray, lengthTypeArray);
samli 2014/12/22 03:38:04 lengthTypeArray not used here
62 return lengthArray[CSSPrimitiveValue::UnitTypeFontSize] != 0 63 return lengthArray[CSSPrimitiveValue::UnitTypeFontSize] != 0
63 || lengthArray[CSSPrimitiveValue::UnitTypeFontXSize] != 0 64 || lengthArray[CSSPrimitiveValue::UnitTypeFontXSize] != 0
64 || lengthArray[CSSPrimitiveValue::UnitTypeRootFontSize] != 0 65 || lengthArray[CSSPrimitiveValue::UnitTypeRootFontSize] != 0
65 || lengthArray[CSSPrimitiveValue::UnitTypeZeroCharacterWidth] != 0 66 || lengthArray[CSSPrimitiveValue::UnitTypeZeroCharacterWidth] != 0
66 || lengthArray[CSSPrimitiveValue::UnitTypeViewportWidth] != 0 67 || lengthArray[CSSPrimitiveValue::UnitTypeViewportWidth] != 0
67 || lengthArray[CSSPrimitiveValue::UnitTypeViewportHeight] != 0 68 || lengthArray[CSSPrimitiveValue::UnitTypeViewportHeight] != 0
68 || lengthArray[CSSPrimitiveValue::UnitTypeViewportMin] != 0 69 || lengthArray[CSSPrimitiveValue::UnitTypeViewportMin] != 0
69 || lengthArray[CSSPrimitiveValue::UnitTypeViewportMax] != 0; 70 || lengthArray[CSSPrimitiveValue::UnitTypeViewportMax] != 0;
70 } 71 }
71 72
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 136 }
136 137
137 void DeferredLegacyStyleInterpolation::trace(Visitor* visitor) 138 void DeferredLegacyStyleInterpolation::trace(Visitor* visitor)
138 { 139 {
139 visitor->trace(m_startCSSValue); 140 visitor->trace(m_startCSSValue);
140 visitor->trace(m_endCSSValue); 141 visitor->trace(m_endCSSValue);
141 StyleInterpolation::trace(visitor); 142 StyleInterpolation::trace(visitor);
142 } 143 }
143 144
144 } 145 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698