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

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

Issue 90113003: Web Animations CSS: Fix crash when animating viewport units (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Linux test expectation search fallback path sadface Created 7 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
« no previous file with comments | « Source/core/animation/AnimatableLength.h ('k') | Source/core/animation/css/CSSAnimatableValueFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableLength.cpp
diff --git a/Source/core/animation/AnimatableLength.cpp b/Source/core/animation/AnimatableLength.cpp
index 9cf7ba12b99956660b378b886ed053b435c35336..38a46590dbbc745289e80b2f516848c905b4b653 100644
--- a/Source/core/animation/AnimatableLength.cpp
+++ b/Source/core/animation/AnimatableLength.cpp
@@ -97,6 +97,10 @@ PassRefPtr<AnimatableValue> AnimatableLength::interpolateTo(const AnimatableValu
if (type != UnitTypeCalc)
return AnimatableLength::create(blend(m_number, length->m_number, fraction), type);
+ // FIXME(crbug.com/168840): Support for viewport units in calc needs to be added before we can blend them with other units.
+ if (isViewportUnit() || length->isViewportUnit())
+ return defaultInterpolateTo(this, value, fraction);
+
return AnimatableLength::create(scale(1 - fraction).get(), length->scale(fraction).get());
}
« no previous file with comments | « Source/core/animation/AnimatableLength.h ('k') | Source/core/animation/css/CSSAnimatableValueFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698