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

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

Issue 2453573003: Web Animations: consistent naming for parent style checkers (Closed)
Patch Set: inheritedValue Created 4 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/animation/CSSTranslateInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.cpp
index aadf3cb05d643cd12ea86677f0da2e4ee1c0caed..02da14ca7259700ce5a99b260f14baf54e19fb04 100644
--- a/third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSTranslateInterpolationType.cpp
@@ -15,32 +15,33 @@ namespace blink {
namespace {
-class ParentTranslateChecker : public InterpolationType::ConversionChecker {
+class InheritedTranslateChecker : public InterpolationType::ConversionChecker {
public:
- ~ParentTranslateChecker() {}
+ ~InheritedTranslateChecker() {}
- static std::unique_ptr<ParentTranslateChecker> create(
- PassRefPtr<TranslateTransformOperation> parentTranslate) {
- return wrapUnique(new ParentTranslateChecker(std::move(parentTranslate)));
+ static std::unique_ptr<InheritedTranslateChecker> create(
+ PassRefPtr<TranslateTransformOperation> inheritedTranslate) {
+ return wrapUnique(
+ new InheritedTranslateChecker(std::move(inheritedTranslate)));
}
bool isValid(const InterpolationEnvironment& environment,
const InterpolationValue& underlying) const final {
- const TransformOperation* parentTranslate =
+ const TransformOperation* inheritedTranslate =
environment.state().parentStyle()->translate();
- if (m_parentTranslate == parentTranslate)
+ if (m_inheritedTranslate == inheritedTranslate)
return true;
- if (!m_parentTranslate || !parentTranslate)
+ if (!m_inheritedTranslate || !inheritedTranslate)
return false;
- return *m_parentTranslate == *parentTranslate;
+ return *m_inheritedTranslate == *inheritedTranslate;
}
private:
- ParentTranslateChecker(
- PassRefPtr<TranslateTransformOperation> parentTranslate)
- : m_parentTranslate(parentTranslate) {}
+ InheritedTranslateChecker(
+ PassRefPtr<TranslateTransformOperation> inheritedTranslate)
+ : m_inheritedTranslate(inheritedTranslate) {}
- RefPtr<TransformOperation> m_parentTranslate;
+ RefPtr<TransformOperation> m_inheritedTranslate;
};
enum TranslateComponentIndex : unsigned {
@@ -99,10 +100,11 @@ InterpolationValue CSSTranslateInterpolationType::maybeConvertInitial(
InterpolationValue CSSTranslateInterpolationType::maybeConvertInherit(
const StyleResolverState& state,
ConversionCheckers& conversionCheckers) const {
- TranslateTransformOperation* parentTranslate =
+ TranslateTransformOperation* inheritedTranslate =
state.parentStyle()->translate();
- conversionCheckers.append(ParentTranslateChecker::create(parentTranslate));
- return convertTranslateOperation(parentTranslate,
+ conversionCheckers.append(
+ InheritedTranslateChecker::create(inheritedTranslate));
+ return convertTranslateOperation(inheritedTranslate,
state.parentStyle()->effectiveZoom());
}

Powered by Google App Engine
This is Rietveld 408576698