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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp

Issue 1373753002: Change CSSToStyleMap functions to take const CSSValue&s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fix for mask Created 5 years, 2 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return LengthSize( 143 return LengthSize(
144 animatableValueToLength(animatableLengthSize->width(), state, range), 144 animatableValueToLength(animatableLengthSize->width(), state, range),
145 animatableValueToLength(animatableLengthSize->height(), state, range)); 145 animatableValueToLength(animatableLengthSize->height(), state, range));
146 } 146 }
147 147
148 void setFillSize(FillLayer* fillLayer, const AnimatableValue* value, StyleResolv erState& state) 148 void setFillSize(FillLayer* fillLayer, const AnimatableValue* value, StyleResolv erState& state)
149 { 149 {
150 if (value->isLengthSize()) 150 if (value->isLengthSize())
151 fillLayer->setSize(FillSize(SizeLength, animatableValueToLengthSize(valu e, state, ValueRangeNonNegative))); 151 fillLayer->setSize(FillSize(SizeLength, animatableValueToLengthSize(valu e, state, ValueRangeNonNegative)));
152 else 152 else
153 CSSToStyleMap::mapFillSize(state, fillLayer, toAnimatableUnknown(value)- >toCSSValue().get()); 153 CSSToStyleMap::mapFillSize(state, fillLayer, *toAnimatableUnknown(value) ->toCSSValue());
154 } 154 }
155 155
156 template <CSSPropertyID property> 156 template <CSSPropertyID property>
157 void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR esolverState& state) 157 void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR esolverState& state)
158 { 158 {
159 const Vector<RefPtr<AnimatableValue>>& values = toAnimatableRepeatable(value )->values(); 159 const Vector<RefPtr<AnimatableValue>>& values = toAnimatableRepeatable(value )->values();
160 ASSERT(!values.isEmpty()); 160 ASSERT(!values.isEmpty());
161 FillLayer* fillLayer = &fillLayers; 161 FillLayer* fillLayer = &fillLayers;
162 FillLayer* prev = 0; 162 FillLayer* prev = 0;
163 for (size_t i = 0; i < values.size(); ++i) { 163 for (size_t i = 0; i < values.size(); ++i) {
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 case CSSPropertyRy: 694 case CSSPropertyRy:
695 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative )); 695 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative ));
696 return; 696 return;
697 697
698 default: 698 default:
699 ASSERT_NOT_REACHED(); 699 ASSERT_NOT_REACHED();
700 } 700 }
701 } 701 }
702 702
703 } // namespace blink 703 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698