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

Unified Diff: third_party/WebKit/Source/core/animation/CSSInterpolationEnvironment.h

Issue 2809063002: WIP Support var() references in registered custom property keyframes (Closed)
Patch Set: Rebased Created 3 years, 6 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/CSSInterpolationEnvironment.h
diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationEnvironment.h b/third_party/WebKit/Source/core/animation/CSSInterpolationEnvironment.h
index 27e3caf49b1f64a0a488ea37806980a9f17edcbb..e18f2210b02e3542f44e5b805690f0a2cbb80abe 100644
--- a/third_party/WebKit/Source/core/animation/CSSInterpolationEnvironment.h
+++ b/third_party/WebKit/Source/core/animation/CSSInterpolationEnvironment.h
@@ -11,12 +11,18 @@
namespace blink {
class ComputedStyle;
+class CSSVariableResolver;
class CSSInterpolationEnvironment : public InterpolationEnvironment {
public:
- explicit CSSInterpolationEnvironment(const InterpolationTypesMap& map,
- StyleResolverState& state)
- : InterpolationEnvironment(map), state_(&state), style_(state.Style()) {}
+ explicit CSSInterpolationEnvironment(
+ const InterpolationTypesMap& map,
+ StyleResolverState& state,
+ CSSVariableResolver* variable_resolver = nullptr)
+ : InterpolationEnvironment(map),
+ state_(&state),
+ style_(state.Style()),
+ variable_resolver_(variable_resolver) {}
explicit CSSInterpolationEnvironment(const InterpolationTypesMap& map,
const ComputedStyle& style)
@@ -38,9 +44,15 @@ class CSSInterpolationEnvironment : public InterpolationEnvironment {
return *style_;
}
+ CSSVariableResolver& VariableResolver() const {
+ DCHECK(variable_resolver_);
+ return *variable_resolver_;
+ }
+
private:
StyleResolverState* state_ = nullptr;
const ComputedStyle* style_ = nullptr;
+ CSSVariableResolver* variable_resolver_ = nullptr;
};
DEFINE_TYPE_CASTS(CSSInterpolationEnvironment,

Powered by Google App Engine
This is Rietveld 408576698