| 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 431b1d440694228dc6fc3b2077221e9eb367d2e5..0af68d3a643ba892db46e01ac9f3c9702003e15d 100644
|
| --- a/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
|
| +++ b/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
|
| @@ -6,77 +6,28 @@
|
| #define InterpolationEnvironment_h
|
|
|
| #include "core/animation/InterpolationTypesMap.h"
|
| -#include "core/css/resolver/StyleResolverState.h"
|
| -#include "platform/heap/Handle.h"
|
| #include "platform/wtf/Allocator.h"
|
|
|
| namespace blink {
|
|
|
| -class ComputedStyle;
|
| -class SVGPropertyBase;
|
| -class SVGElement;
|
| -
|
| class InterpolationEnvironment {
|
| STACK_ALLOCATED();
|
| -
|
| public:
|
| - explicit InterpolationEnvironment(const InterpolationTypesMap& map,
|
| - StyleResolverState& state)
|
| - : interpolation_types_map_(map), state_(&state), style_(state.Style()) {}
|
| -
|
| - explicit InterpolationEnvironment(const InterpolationTypesMap& map,
|
| - const ComputedStyle& style)
|
| - : interpolation_types_map_(map), style_(&style) {}
|
| -
|
| - explicit InterpolationEnvironment(const InterpolationTypesMap& map,
|
| - SVGElement& svg_element,
|
| - const SVGPropertyBase& svg_base_value)
|
| - : interpolation_types_map_(map),
|
| - svg_element_(&svg_element),
|
| - svg_base_value_(&svg_base_value) {}
|
| + virtual bool IsCSS() const { return false; }
|
| + virtual bool IsSVG() const { return false; }
|
|
|
| const InterpolationTypesMap& GetInterpolationTypesMap() const {
|
| return interpolation_types_map_;
|
| }
|
|
|
| - StyleResolverState& GetState() {
|
| - DCHECK(state_);
|
| - return *state_;
|
| - }
|
| - const StyleResolverState& GetState() const {
|
| - DCHECK(state_);
|
| - return *state_;
|
| - }
|
| -
|
| - const ComputedStyle& Style() const {
|
| - DCHECK(style_);
|
| - return *style_;
|
| - }
|
| + protected:
|
| + virtual ~InterpolationEnvironment() {}
|
|
|
| - SVGElement& SvgElement() {
|
| - DCHECK(svg_element_);
|
| - return *svg_element_;
|
| - }
|
| - const SVGElement& SvgElement() const {
|
| - DCHECK(svg_element_);
|
| - return *svg_element_;
|
| - }
|
| -
|
| - const SVGPropertyBase& SvgBaseValue() const {
|
| - DCHECK(svg_base_value_);
|
| - return *svg_base_value_;
|
| - }
|
| + explicit InterpolationEnvironment(const InterpolationTypesMap& map)
|
| + : interpolation_types_map_(map) {}
|
|
|
| private:
|
| const InterpolationTypesMap& interpolation_types_map_;
|
| -
|
| - // CSSInterpolationType environment
|
| - StyleResolverState* state_ = nullptr;
|
| - const ComputedStyle* style_ = nullptr;
|
| -
|
| - // SVGInterpolationType environment
|
| - Member<SVGElement> svg_element_ = nullptr;
|
| - Member<const SVGPropertyBase> svg_base_value_ = nullptr;
|
| };
|
|
|
| } // namespace blink
|
|
|