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

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

Issue 1387113002: Change StyleResolverState.styleImage() to take a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODOs to replace the members with const members 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
index d6e7b9216989bf7170095dd24ea1d7613678eef9..00b6bc48378585ecc62880a843483ac5240a8667 100644
--- a/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
@@ -168,7 +168,7 @@ void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR
case CSSPropertyBackgroundImage:
case CSSPropertyWebkitMaskImage:
if (layerValue->isImage()) {
- fillLayer->setImage(state.styleImage(property, toAnimatableImage(layerValue)->toCSSValue()));
+ fillLayer->setImage(state.styleImage(property, *toAnimatableImage(layerValue)->toCSSValue()));
} else {
ASSERT(toAnimatableUnknown(layerValue)->toCSSValueID() == CSSValueNone);
fillLayer->setImage(nullptr);
@@ -325,7 +325,7 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
style->setBorderImageSlicesFill(toAnimatableLengthBoxAndBool(value)->flag());
return;
case CSSPropertyBorderImageSource:
- style->setBorderImageSource(state.styleImage(property, toAnimatableImage(value)->toCSSValue()));
+ style->setBorderImageSource(state.styleImage(property, *toAnimatableImage(value)->toCSSValue()));
return;
case CSSPropertyBorderImageWidth:
style->setBorderImageWidth(animatableValueToBorderImageLengthBox(value, state));
@@ -423,7 +423,7 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
style->setLineHeight(Length(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0), Percent));
return;
case CSSPropertyListStyleImage:
- style->setListStyleImage(state.styleImage(property, toAnimatableImage(value)->toCSSValue()));
+ style->setListStyleImage(state.styleImage(property, *toAnimatableImage(value)->toCSSValue()));
return;
case CSSPropertyLetterSpacing:
style->setLetterSpacing(clampTo<float>(toAnimatableDouble(value)->toDouble()));
@@ -567,7 +567,7 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
style->setMaskBoxImageSlicesFill(toAnimatableLengthBoxAndBool(value)->flag());
return;
case CSSPropertyWebkitMaskBoxImageSource:
- style->setMaskBoxImageSource(state.styleImage(property, toAnimatableImage(value)->toCSSValue()));
+ style->setMaskBoxImageSource(state.styleImage(property, *toAnimatableImage(value)->toCSSValue()));
return;
case CSSPropertyWebkitMaskBoxImageWidth:
style->setMaskBoxImageWidth(animatableValueToBorderImageLengthBox(value, state));

Powered by Google App Engine
This is Rietveld 408576698