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

Unified Diff: Source/core/css/CSSGradientValue.cpp

Issue 24350008: CSSGradientValue should check whether gradientLength is zero or not. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | « LayoutTests/fast/gradients/css3-repeating-radial-gradients-crash-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSGradientValue.cpp
diff --git a/Source/core/css/CSSGradientValue.cpp b/Source/core/css/CSSGradientValue.cpp
index 0c6e578aac69a728e056d2bc82ffca7ecaeac8e5..5b7ea0b2892a6f02cfa71c77039f7fac5485097d 100644
--- a/Source/core/css/CSSGradientValue.cpp
+++ b/Source/core/css/CSSGradientValue.cpp
@@ -276,7 +276,7 @@ void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, Rend
}
if (maxLengthForRepeat > gradientLength)
- maxExtent = maxLengthForRepeat / gradientLength;
+ maxExtent = gradientLength > 0 ? maxLengthForRepeat / gradientLength : 0;
}
size_t originalNumStops = numStops;
« no previous file with comments | « LayoutTests/fast/gradients/css3-repeating-radial-gradients-crash-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698