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

Unified Diff: Source/core/animation/css/CSSAnimatableValueFactory.cpp

Issue 381473002: Use reference for FillLayer if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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: Source/core/animation/css/CSSAnimatableValueFactory.cpp
diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index ee51f406b6ec4947ed8c10fa051f3aa7575d90ea..ff12158720e26a6f3529208283451fc8700fd446 100644
--- a/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -184,11 +184,10 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromBackgroundPositi
}
template<CSSPropertyID property>
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillLayers(const FillLayer* fillLayer, const RenderStyle& style)
+inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillLayers(const FillLayer& fillLayers, const RenderStyle& style)
{
- ASSERT(fillLayer);
WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> > values;
- while (fillLayer) {
+ for (const FillLayer* fillLayer = &fillLayers; fillLayer; fillLayer = fillLayer->next()) {
if (property == CSSPropertyBackgroundImage || property == CSSPropertyWebkitMaskImage) {
if (!fillLayer->isImageSet())
break;
@@ -208,7 +207,6 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillLayers(const
} else {
ASSERT_NOT_REACHED();
}
- fillLayer = fillLayer->next();
}
return AnimatableRepeatable::create(values);
}
« no previous file with comments | « Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl ('k') | Source/core/animation/css/CSSPropertyEquality.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698