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

Unified Diff: third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp

Issue 2567453002: Revert of Make InvalidatableInterpolation's InterpolationTypes decided at effect application time (Closed)
Patch Set: 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/InvalidatableInterpolation.cpp
diff --git a/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp b/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp
index 6fd9868ab357169aca0193669239b3f3b4317718..e480166ee7911ad9307bbc574689bfd142d7af45 100644
--- a/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp
+++ b/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp
@@ -32,7 +32,7 @@
const InterpolationEnvironment& environment,
const UnderlyingValueOwner& underlyingValueOwner) const {
DCHECK(m_currentFraction != 0 && m_currentFraction != 1);
- for (const auto& interpolationType : *m_interpolationTypes) {
+ for (const auto& interpolationType : m_interpolationTypes) {
if ((m_startKeyframe->isNeutral() || m_endKeyframe->isNeutral()) &&
(!underlyingValueOwner ||
underlyingValueOwner.type() != *interpolationType))
@@ -59,7 +59,7 @@
const UnderlyingValueOwner& underlyingValueOwner) const {
if (keyframe.isNeutral() && !underlyingValueOwner)
return nullptr;
- for (const auto& interpolationType : *m_interpolationTypes) {
+ for (const auto& interpolationType : m_interpolationTypes) {
if (keyframe.isNeutral() &&
underlyingValueOwner.type() != *interpolationType)
continue;
@@ -89,7 +89,7 @@
std::unique_ptr<TypedInterpolationValue>
InvalidatableInterpolation::maybeConvertUnderlyingValue(
const InterpolationEnvironment& environment) const {
- for (const auto& interpolationType : *m_interpolationTypes) {
+ for (const auto& interpolationType : m_interpolationTypes) {
InterpolationValue result =
interpolationType->maybeConvertUnderlyingValue(environment);
if (result)
@@ -144,9 +144,6 @@
const InterpolationEnvironment& environment,
const UnderlyingValueOwner& underlyingValueOwner) const {
DCHECK(!std::isnan(m_currentFraction));
- DCHECK(m_interpolationTypes &&
- m_interpolationTypesVersion ==
- environment.interpolationTypesMap().version());
if (isConversionCacheValid(environment, underlyingValueOwner))
return m_cachedValue.get();
clearConversionCache();
@@ -175,18 +172,6 @@
return m_cachedValue.get();
}
-void InvalidatableInterpolation::ensureValidInterpolationTypes(
- const InterpolationEnvironment& environment) const {
- const InterpolationTypesMap& map = environment.interpolationTypesMap();
- if (m_interpolationTypesVersion != map.version()) {
- m_interpolationTypes = nullptr;
- }
- if (!m_interpolationTypes) {
- m_interpolationTypes = &map.get(m_property);
- clearConversionCache();
- }
-}
-
void InvalidatableInterpolation::setFlagIfInheritUsed(
InterpolationEnvironment& environment) const {
if (!m_property.isCSSProperty() && !m_property.isPresentationAttribute())
@@ -223,7 +208,6 @@
UnderlyingValueOwner underlyingValueOwner;
const InvalidatableInterpolation& firstInterpolation =
toInvalidatableInterpolation(*interpolations.at(startingIndex));
- firstInterpolation.ensureValidInterpolationTypes(environment);
if (firstInterpolation.dependsOnUnderlyingValue()) {
underlyingValueOwner.set(
firstInterpolation.maybeConvertUnderlyingValue(environment));
@@ -251,7 +235,6 @@
const InvalidatableInterpolation& currentInterpolation =
toInvalidatableInterpolation(*interpolations.at(i));
DCHECK(currentInterpolation.dependsOnUnderlyingValue());
- currentInterpolation.ensureValidInterpolationTypes(environment);
const TypedInterpolationValue* currentValue =
currentInterpolation.ensureValidConversion(environment,
underlyingValueOwner);

Powered by Google App Engine
This is Rietveld 408576698