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

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

Issue 2555923003: Make InvalidatableInterpolation's InterpolationTypes decided at effect application time (Closed)
Patch Set: Extended InterpolationTypesMap lifetime scope to fix release crash Created 4 years 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/InterpolationEnvironment.h
diff --git a/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h b/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
index cfae242d7e5c58b58082ff03fcd850476777fd96..61d76add65e9a2bc2949e2ed977a794166c3f401 100644
--- a/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
+++ b/third_party/WebKit/Source/core/animation/InterpolationEnvironment.h
@@ -5,6 +5,7 @@
#ifndef InterpolationEnvironment_h
#define InterpolationEnvironment_h
+#include "core/animation/InterpolationTypesMap.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
@@ -18,15 +19,25 @@ class InterpolationEnvironment {
STACK_ALLOCATED();
public:
- explicit InterpolationEnvironment(StyleResolverState& state)
- : m_state(&state), m_svgElement(nullptr), m_svgBaseValue(nullptr) {}
+ explicit InterpolationEnvironment(const InterpolationTypesMap& map,
+ StyleResolverState& state)
+ : m_interpolationTypesMap(map),
+ m_state(&state),
+ m_svgElement(nullptr),
+ m_svgBaseValue(nullptr) {}
- explicit InterpolationEnvironment(SVGElement& svgElement,
+ explicit InterpolationEnvironment(const InterpolationTypesMap& map,
+ SVGElement& svgElement,
const SVGPropertyBase& svgBaseValue)
- : m_state(nullptr),
+ : m_interpolationTypesMap(map),
+ m_state(nullptr),
m_svgElement(&svgElement),
m_svgBaseValue(&svgBaseValue) {}
+ const InterpolationTypesMap& interpolationTypesMap() const {
+ return m_interpolationTypesMap;
+ }
+
StyleResolverState& state() {
DCHECK(m_state);
return *m_state;
@@ -51,6 +62,7 @@ class InterpolationEnvironment {
}
private:
+ const InterpolationTypesMap& m_interpolationTypesMap;
StyleResolverState* m_state;
Member<SVGElement> m_svgElement;
Member<const SVGPropertyBase> m_svgBaseValue;

Powered by Google App Engine
This is Rietveld 408576698