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

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

Issue 794123003: Do not calculate the same gradient length for every color stops. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « no previous file | 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 1b048ece7a40da7a84ca5a1f9ac8af8b4cc35168..d9a3ea24aac1cc9fa9d6bfc16ca683f20705bb77 100644
--- a/Source/core/css/CSSGradientValue.cpp
+++ b/Source/core/css/CSSGradientValue.cpp
@@ -258,6 +258,7 @@ void CSSGradientValue::addStops(Gradient* gradient, const CSSToLengthConversionD
if (!computedGradientLength) {
FloatSize gradientSize(gradientStart - gradientEnd);
gradientLength = gradientSize.diagonalLength();
+ computedGradientLength = true;
}
float length;
if (stop.m_position->isLength())
@@ -353,6 +354,7 @@ void CSSGradientValue::addStops(Gradient* gradient, const CSSToLengthConversionD
if (!computedGradientLength) {
FloatSize gradientSize(gradientStart - gradientEnd);
gradientLength = gradientSize.diagonalLength();
+ computedGradientLength = true;
}
if (maxLengthForRepeat > gradientLength)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698