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

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

Issue 2370783003: Avoid SVG viewport bug for CSS length animations that don't use viewport units (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/animations/img-tag-css-length-animation-crash.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.cpp
diff --git a/third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.cpp b/third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.cpp
index f3565e6ad2b42285e045280e01ab7843dad0a824..f4328718a1f8b925c05d74b182ab8a622fcb9328 100644
--- a/third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.cpp
+++ b/third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.cpp
@@ -149,6 +149,8 @@ Length LengthInterpolationFunctions::createLength(const InterpolableValue& inter
double percentage = 0;
for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; i++) {
double value = toInterpolableNumber(*interpolableList.get(i)).value();
+ if (value == 0)
+ continue;
if (i == CSSPrimitiveValue::UnitTypePercentage) {
percentage = value;
} else {
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/animations/img-tag-css-length-animation-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698