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

Unified Diff: third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.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/CSSTranslateInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.cpp
index 608e5c3998e260fd03607b66624e3d8c7d607a2c..805f508f87d9645e2e82fb960971c17566b3a571 100644
--- a/third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.cpp
@@ -59,7 +59,7 @@ enum TranslateComponentIndex : unsigned {
TranslateComponentIndexCount,
};
-std::unique_ptr<InterpolableValue> createIdentityInterpolableValue() {
+std::unique_ptr<InterpolableValue> createTranslateIdentity() {
std::unique_ptr<InterpolableList> result =
InterpolableList::create(TranslateComponentIndexCount);
result->set(TranslateX,
@@ -96,7 +96,7 @@ InterpolationValue convertTranslateOperation(
InterpolationValue CSSTranslateInterpolationType::maybeConvertNeutral(
const InterpolationValue& underlying,
ConversionCheckers&) const {
- return InterpolationValue(createIdentityInterpolableValue());
+ return InterpolationValue(createTranslateIdentity());
}
InterpolationValue CSSTranslateInterpolationType::maybeConvertInitial(
@@ -153,9 +153,9 @@ PairwiseInterpolationValue CSSTranslateInterpolationType::maybeMergeSingles(
toInterpolableList(*start.interpolableValue).length();
size_t endListLength = toInterpolableList(*end.interpolableValue).length();
if (startListLength < endListLength)
- start.interpolableValue = createIdentityInterpolableValue();
+ start.interpolableValue = createTranslateIdentity();
else if (endListLength < startListLength)
- end.interpolableValue = createIdentityInterpolableValue();
+ end.interpolableValue = createTranslateIdentity();
return PairwiseInterpolationValue(std::move(start.interpolableValue),
std::move(end.interpolableValue));
@@ -178,7 +178,7 @@ void CSSTranslateInterpolationType::composite(
if (isNoneValue(underlyingValueOwner.mutableValue())) {
underlyingValueOwner.mutableValue().interpolableValue =
- createIdentityInterpolableValue();
+ createTranslateIdentity();
}
return CSSInterpolationType::composite(

Powered by Google App Engine
This is Rietveld 408576698