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

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

Issue 993383002: Oilpan: fix webkit unit tests after r191696 (d325d00a5). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 static CSSPrimitiveValue::UnitType toUnitType(int lengthUnitType) 201 static CSSPrimitiveValue::UnitType toUnitType(int lengthUnitType)
202 { 202 {
203 return static_cast<CSSPrimitiveValue::UnitType>(CSSPrimitiveValue::lengthUni tTypeToUnitType(static_cast<CSSPrimitiveValue::LengthUnitType>(lengthUnitType))) ; 203 return static_cast<CSSPrimitiveValue::UnitType>(CSSPrimitiveValue::lengthUni tTypeToUnitType(static_cast<CSSPrimitiveValue::LengthUnitType>(lengthUnitType))) ;
204 } 204 }
205 205
206 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> constructCalcExpression(con st InterpolableList* list) 206 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> constructCalcExpression(con st InterpolableList* list)
207 { 207 {
208 const InterpolableList* listOfValues = toInterpolableList(list->get(0)); 208 const InterpolableList* listOfValues = toInterpolableList(list->get(0));
209 const InterpolableList* listOfTypes = toInterpolableList(list->get(1)); 209 const InterpolableList* listOfTypes = toInterpolableList(list->get(1));
210 RefPtrWillBeRawPtr<CSSCalcExpressionNode> expression; 210 RefPtrWillBeRawPtr<CSSCalcExpressionNode> expression = nullptr;
211 for (size_t position = 0; position < CSSPrimitiveValue::LengthUnitTypeCount; position++) { 211 for (size_t position = 0; position < CSSPrimitiveValue::LengthUnitTypeCount; position++) {
212 const InterpolableNumber *subValueType = toInterpolableNumber(listOfType s->get(position)); 212 const InterpolableNumber *subValueType = toInterpolableNumber(listOfType s->get(position));
213 if (!subValueType->value()) 213 if (!subValueType->value())
214 continue; 214 continue;
215 double value = toInterpolableNumber(listOfValues->get(position))->value( ); 215 double value = toInterpolableNumber(listOfValues->get(position))->value( );
216 RefPtrWillBeRawPtr<CSSCalcExpressionNode> currentTerm = CSSCalcValue::cr eateExpressionNode(CSSPrimitiveValue::create(value, toUnitType(position))); 216 RefPtrWillBeRawPtr<CSSCalcExpressionNode> currentTerm = CSSCalcValue::cr eateExpressionNode(CSSPrimitiveValue::create(value, toUnitType(position)));
217 if (expression) 217 if (expression)
218 expression = CSSCalcValue::createExpressionNode(expression.release() , currentTerm.release(), CalcAdd); 218 expression = CSSCalcValue::createExpressionNode(expression.release() , currentTerm.release(), CalcAdd);
219 else 219 else
220 expression = currentTerm.release(); 220 expression = currentTerm.release();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 StyleBuilder::applyProperty(m_id, state, fromInterpolableValue(*m_cached Value, m_range).get()); 301 StyleBuilder::applyProperty(m_id, state, fromInterpolableValue(*m_cached Value, m_range).get());
302 } 302 }
303 } 303 }
304 304
305 DEFINE_TRACE(LengthStyleInterpolation) 305 DEFINE_TRACE(LengthStyleInterpolation)
306 { 306 {
307 StyleInterpolation::trace(visitor); 307 StyleInterpolation::trace(visitor);
308 } 308 }
309 309
310 } 310 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698