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

Unified Diff: third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp

Issue 2794013002: Fewer reused duplicate symbol names in animation. (Closed)
Patch Set: Addressed review comments. Created 3 years, 8 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/animation/CSSScaleInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp
index e7f645cc45842fcc26142dbe53f9a04212cc2251..e87a489bf5192538df77afe4781d1ff4ea8b4f73 100644
--- a/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp
@@ -55,7 +55,7 @@ struct Scale {
bool isNone;
};
-std::unique_ptr<InterpolableValue> createIdentityInterpolableValue() {
+std::unique_ptr<InterpolableValue> createScaleIdentity() {
std::unique_ptr<InterpolableList> list = InterpolableList::create(3);
for (size_t i = 0; i < 3; i++)
list->set(i, InterpolableNumber::create(1));
@@ -193,9 +193,9 @@ PairwiseInterpolationValue CSSScaleInterpolationType::maybeMergeSingles(
toInterpolableList(*start.interpolableValue).length();
size_t endListLength = toInterpolableList(*end.interpolableValue).length();
if (startListLength < endListLength)
- start.interpolableValue = createIdentityInterpolableValue();
+ start.interpolableValue = createScaleIdentity();
else if (endListLength < startListLength)
- end.interpolableValue = createIdentityInterpolableValue();
+ end.interpolableValue = createScaleIdentity();
return PairwiseInterpolationValue(
std::move(start.interpolableValue), std::move(end.interpolableValue),
@@ -218,7 +218,7 @@ void CSSScaleInterpolationType::composite(
if (toInterpolableList(*underlyingValueOwner.mutableValue().interpolableValue)
.length() == 0) {
underlyingValueOwner.mutableValue().interpolableValue =
- createIdentityInterpolableValue();
+ createScaleIdentity();
}
const CSSScaleNonInterpolableValue& metadata =

Powered by Google App Engine
This is Rietveld 408576698