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

Side by Side Diff: third_party/WebKit/Source/core/animation/InterpolationEnvironment.h

Issue 1414413002: SVG Web Animations: Add SVGInterpolationType pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgAttributeReference
Patch Set: Move assert to not wrong location Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/SVGInterpolationType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef InterpolationEnvironment_h 5 #ifndef InterpolationEnvironment_h
6 #define InterpolationEnvironment_h 6 #define InterpolationEnvironment_h
7 7
8 #include "wtf/Allocator.h" 8 #include "wtf/Allocator.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class StyleResolverState; 12 class StyleResolverState;
13 class SVGPropertyBase;
14 class SVGElement;
13 15
14 class InterpolationEnvironment { 16 class InterpolationEnvironment {
15 STACK_ALLOCATED(); 17 STACK_ALLOCATED();
16 public: 18 public:
17 explicit InterpolationEnvironment(StyleResolverState& state) 19 explicit InterpolationEnvironment(StyleResolverState& state)
18 : m_state(&state) 20 : m_state(&state)
21 , m_svgElement(nullptr)
22 , m_svgBaseValue(nullptr)
23 { }
24
25 explicit InterpolationEnvironment(SVGElement& svgElement, const SVGPropertyB ase& svgBaseValue)
26 : m_state(nullptr)
27 , m_svgElement(&svgElement)
28 , m_svgBaseValue(&svgBaseValue)
19 { } 29 { }
20 30
21 StyleResolverState& state() { ASSERT(m_state); return *m_state; } 31 StyleResolverState& state() { ASSERT(m_state); return *m_state; }
22 const StyleResolverState& state() const { ASSERT(m_state); return *m_state; } 32 const StyleResolverState& state() const { ASSERT(m_state); return *m_state; }
23 33
34 SVGElement& svgElement() { ASSERT(m_svgElement); return *m_svgElement; }
35 const SVGElement& svgElement() const { ASSERT(m_svgElement); return *m_svgEl ement; }
36
37 const SVGPropertyBase& svgBaseValue() const { ASSERT(m_svgBaseValue); return *m_svgBaseValue; }
38
24 private: 39 private:
25 StyleResolverState* m_state; 40 StyleResolverState* m_state;
41 SVGElement* m_svgElement;
42 const SVGPropertyBase* m_svgBaseValue;
26 }; 43 };
27 44
28 } // namespace blink 45 } // namespace blink
29 46
30 #endif // InterpolationEnvironment_h 47 #endif // InterpolationEnvironment_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/SVGInterpolationType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698