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

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

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month 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
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 void setFillSize(FillLayer* fillLayer, const AnimatableValue* value, const Style ResolverState& state) 139 void setFillSize(FillLayer* fillLayer, const AnimatableValue* value, const Style ResolverState& state)
140 { 140 {
141 if (value->isLengthSize()) 141 if (value->isLengthSize())
142 fillLayer->setSize(FillSize(SizeLength, animatableValueToLengthSize(valu e, state, ValueRangeNonNegative))); 142 fillLayer->setSize(FillSize(SizeLength, animatableValueToLengthSize(valu e, state, ValueRangeNonNegative)));
143 else 143 else
144 state.styleMap().mapFillSize(fillLayer, toAnimatableUnknown(value)->toCS SValue().get()); 144 state.styleMap().mapFillSize(fillLayer, toAnimatableUnknown(value)->toCS SValue().get());
145 } 145 }
146 146
147 PassRefPtr<SVGLength> animatableValueToNonNegativeSVGLength(const AnimatableValu e* value) 147 PassRefPtrWillBeRawPtr<SVGLength> animatableValueToNonNegativeSVGLength(const An imatableValue* value)
148 { 148 {
149 RefPtr<SVGLength> length = toAnimatableSVGLength(value)->toSVGLength(); 149 RefPtrWillBeRawPtr<SVGLength> length = toAnimatableSVGLength(value)->toSVGLe ngth();
150 if (length->valueInSpecifiedUnits() < 0) 150 if (length->valueInSpecifiedUnits() < 0)
151 length->setValueInSpecifiedUnits(0); 151 length->setValueInSpecifiedUnits(0);
152 return length.release(); 152 return length.release();
153 } 153 }
154 154
155 template <CSSPropertyID property> 155 template <CSSPropertyID property>
156 void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR esolverState& state) 156 void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR esolverState& state)
157 { 157 {
158 const WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> >& values = toAni matableRepeatable(value)->values(); 158 const WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> >& values = toAni matableRepeatable(value)->values();
159 ASSERT(!values.isEmpty()); 159 ASSERT(!values.isEmpty());
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 return; 615 return;
616 case CSSPropertyZoom: 616 case CSSPropertyZoom:
617 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std ::numeric_limits<float>::denorm_min())); 617 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std ::numeric_limits<float>::denorm_min()));
618 return; 618 return;
619 default: 619 default:
620 ASSERT_NOT_REACHED(); 620 ASSERT_NOT_REACHED();
621 } 621 }
622 } 622 }
623 623
624 } // namespace blink 624 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/SVGCSSComputedStyleDeclaration.cpp ('k') | Source/core/css/resolver/ElementStyleResources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698