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

Unified Diff: Source/core/animation/LengthBoxStyleInterpolation.cpp

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 5 months 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: Source/core/animation/LengthBoxStyleInterpolation.cpp
diff --git a/Source/core/animation/LengthBoxStyleInterpolation.cpp b/Source/core/animation/LengthBoxStyleInterpolation.cpp
index 53440c0aae4c8741b248d0a92d6d43adae1c025b..42cda4ba4510bbe4467c30a551c14f78e84a592f 100644
--- a/Source/core/animation/LengthBoxStyleInterpolation.cpp
+++ b/Source/core/animation/LengthBoxStyleInterpolation.cpp
@@ -27,7 +27,7 @@ PassRefPtrWillBeRawPtr<LengthBoxStyleInterpolation> LengthBoxStyleInterpolation:
bool endRect = end.isPrimitiveValue() && toCSSPrimitiveValue(end).isRect();
if (startRect && endRect)
- return adoptRefWillBeNoop(new LengthBoxStyleInterpolation(lengthBoxtoInterpolableValue(start, end, false), lengthBoxtoInterpolableValue(end, start, true), id, &start, &end));
+ return adoptRefWillBeNoop(new LengthBoxStyleInterpolation(lengthBoxtoInterpolableValue(start, end, false), lengthBoxtoInterpolableValue(end, start, true), id, start, end));
return nullptr;
}
@@ -44,8 +44,9 @@ PassOwnPtrWillBeRawPtr<InterpolableValue> LengthBoxStyleInterpolation::lengthBox
if (side[i]->isValueID() || matchingSide[i]->isValueID()) {
result->set(i, InterpolableBool::create(isEndInterpolation));
} else {
- ASSERT(LengthStyleInterpolation::canCreateFrom(*side[i]));
- result->set(i, LengthStyleInterpolation::toInterpolableValue(*side[i]));
+ CSSValue sideCSSValue(*side[i]);
+ ASSERT(LengthStyleInterpolation::canCreateFrom(sideCSSValue));
+ result->set(i, LengthStyleInterpolation::toInterpolableValue(sideCSSValue));
}
}
return result.release();
@@ -77,7 +78,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> indexedValueToLength(InterpolableList&
}
-PassRefPtrWillBeRawPtr<CSSValue> LengthBoxStyleInterpolation::interpolableValueToLengthBox(InterpolableValue* value, const CSSValue& originalStart, const CSSValue& originalEnd)
+CSSValue LengthBoxStyleInterpolation::interpolableValueToLengthBox(InterpolableValue* value, const CSSValue& originalStart, const CSSValue& originalEnd)
{
InterpolableList* lengthBox = toInterpolableList(value);
Rect* startRect = toCSSPrimitiveValue(originalStart).getRectValue();
@@ -97,9 +98,9 @@ PassRefPtrWillBeRawPtr<CSSValue> LengthBoxStyleInterpolation::interpolableValueT
void LengthBoxStyleInterpolation::apply(StyleResolverState& state) const
{
if (m_cachedValue.get()->isBool())
- StyleBuilder::applyProperty(m_id, state, toInterpolableBool(m_cachedValue.get())->value() ? m_endCSSValue.get() : m_startCSSValue.get());
+ StyleBuilder::applyProperty(m_id, state, toInterpolableBool(m_cachedValue.get())->value() ? m_endCSSValue : m_startCSSValue);
else
- StyleBuilder::applyProperty(m_id, state, interpolableValueToLengthBox(m_cachedValue.get(), *m_startCSSValue, *m_endCSSValue).get());
+ StyleBuilder::applyProperty(m_id, state, interpolableValueToLengthBox(m_cachedValue.get(), m_startCSSValue, m_endCSSValue));
}
DEFINE_TRACE(LengthBoxStyleInterpolation)
« no previous file with comments | « Source/core/animation/LengthBoxStyleInterpolation.h ('k') | Source/core/animation/LengthBoxStyleInterpolationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698