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

Unified Diff: Source/core/animation/css/CSSAnimatableValueFactory.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.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/css/CSSAnimatableValueFactory.cpp
diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index 26c2fc9be822f722409f8be7d658f32b44bfe81a..6282c8ff6543d5427fbcd5a2b5aff285c1d8a185 100644
--- a/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -98,19 +98,14 @@ static PassRefPtr<AnimatableValue> createFromLength(const Length& length, const
static PassRefPtr<AnimatableValue> createFromLineHeight(const Length& length, const RenderStyle& style)
{
- double value = length.value();
- switch (length.type()) {
- case Fixed:
- return AnimatableLength::create(adjustFloatForAbsoluteZoom(value, style), AnimatableLength::UnitTypePixels);
- case Percent:
+ if (length.type() == Percent) {
+ double value = length.value();
// -100% is used to represent "normal" line height.
if (value == -100)
return AnimatableUnknown::create(CSSValueNormal);
return AnimatableDouble::create(value);
- default:
- ASSERT_NOT_REACHED();
- return 0;
}
+ return createFromLength(length, style);
}
inline static PassRefPtr<AnimatableValue> createFromDouble(double value, AnimatableDouble::Constraint constraint = AnimatableDouble::Unconstrained)
« no previous file with comments | « Source/core/animation/AnimatableLength.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698