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

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

Issue 2812213002: Add CSSInterpolationType specific ConversionChecker (Closed)
Patch Set: rebased Created 3 years, 7 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/CSSPaintInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSPaintInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSPaintInterpolationType.cpp
index c22c0f0d07dce3346aab14e49bedae6d04b12e93..1112162cce085e3b19b75587424ef66f796ad528 100644
--- a/third_party/WebKit/Source/core/animation/CSSPaintInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSPaintInterpolationType.cpp
@@ -29,7 +29,8 @@ InterpolationValue CSSPaintInterpolationType::MaybeConvertInitial(
CSSColorInterpolationType::CreateInterpolableColor(initial_color));
}
-class InheritedPaintChecker : public InterpolationType::ConversionChecker {
+class InheritedPaintChecker
+ : public CSSInterpolationType::CSSConversionChecker {
public:
static std::unique_ptr<InheritedPaintChecker> Create(
CSSPropertyID property,
@@ -46,11 +47,11 @@ class InheritedPaintChecker : public InterpolationType::ConversionChecker {
InheritedPaintChecker(CSSPropertyID property, const StyleColor& color)
: property_(property), valid_color_(true), color_(color) {}
- bool IsValid(const InterpolationEnvironment& environment,
+ bool IsValid(const StyleResolverState& state,
const InterpolationValue& underlying) const final {
StyleColor parent_color;
- if (!PaintPropertyFunctions::GetColor(
- property_, *environment.GetState().ParentStyle(), parent_color))
+ if (!PaintPropertyFunctions::GetColor(property_, *state.ParentStyle(),
+ parent_color))
return !valid_color_;
return valid_color_ && parent_color == color_;
}

Powered by Google App Engine
This is Rietveld 408576698