| Index: third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
|
| diff --git a/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h b/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
|
| index 61d76add65e9a2bc2949e2ed977a794166c3f401..313793edbdab42f9c63ee35be2b7551ece765c12 100644
|
| --- a/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
|
| +++ b/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
|
| @@ -6,12 +6,13 @@
|
| #define InterpolationEnvironment_h
|
|
|
| #include "core/animation/InterpolationTypesMap.h"
|
| +#include "core/css/resolver/StyleResolverState.h"
|
| #include "platform/heap/Handle.h"
|
| #include "wtf/Allocator.h"
|
|
|
| namespace blink {
|
|
|
| -class StyleResolverState;
|
| +class ComputedStyle;
|
| class SVGPropertyBase;
|
| class SVGElement;
|
|
|
| @@ -21,16 +22,16 @@ class InterpolationEnvironment {
|
| public:
|
| explicit InterpolationEnvironment(const InterpolationTypesMap& map,
|
| StyleResolverState& state)
|
| - : m_interpolationTypesMap(map),
|
| - m_state(&state),
|
| - m_svgElement(nullptr),
|
| - m_svgBaseValue(nullptr) {}
|
| + : m_interpolationTypesMap(map), m_state(&state), m_style(state.style()) {}
|
| +
|
| + explicit InterpolationEnvironment(const InterpolationTypesMap& map,
|
| + const ComputedStyle& style)
|
| + : m_interpolationTypesMap(map), m_style(&style) {}
|
|
|
| explicit InterpolationEnvironment(const InterpolationTypesMap& map,
|
| SVGElement& svgElement,
|
| const SVGPropertyBase& svgBaseValue)
|
| : m_interpolationTypesMap(map),
|
| - m_state(nullptr),
|
| m_svgElement(&svgElement),
|
| m_svgBaseValue(&svgBaseValue) {}
|
|
|
| @@ -47,6 +48,11 @@ class InterpolationEnvironment {
|
| return *m_state;
|
| }
|
|
|
| + const ComputedStyle& style() const {
|
| + DCHECK(m_style);
|
| + return *m_style;
|
| + }
|
| +
|
| SVGElement& svgElement() {
|
| DCHECK(m_svgElement);
|
| return *m_svgElement;
|
| @@ -63,9 +69,14 @@ class InterpolationEnvironment {
|
|
|
| private:
|
| const InterpolationTypesMap& m_interpolationTypesMap;
|
| - StyleResolverState* m_state;
|
| - Member<SVGElement> m_svgElement;
|
| - Member<const SVGPropertyBase> m_svgBaseValue;
|
| +
|
| + // CSSInterpolationType environment
|
| + StyleResolverState* m_state = nullptr;
|
| + const ComputedStyle* m_style = nullptr;
|
| +
|
| + // SVGInterpolationType environment
|
| + Member<SVGElement> m_svgElement = nullptr;
|
| + Member<const SVGPropertyBase> m_svgBaseValue = nullptr;
|
| };
|
|
|
| } // namespace blink
|
|
|