Chromium Code Reviews| 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..de56986e9806b4b9c98b71aeceda1c8225843b53 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()) {} |
| + virtual ~InterpolationEnvironment() {} |
|
Eric Willigers
2017/05/26 01:37:03
Could be protected.
alancutter (OOO until 2018)
2017/05/26 01:42:09
Done.
|
| - 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_; |
| - } |
| - |
| - 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_; |
| - } |
| + protected: |
| + InterpolationEnvironment(const InterpolationTypesMap& map) |
|
Eric Willigers
2017/05/26 01:34:17
explicit
alancutter (OOO until 2018)
2017/05/26 01:42:09
Done.
|
| + : 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 |