| Index: Source/core/css/CSSGradientValue.cpp
|
| diff --git a/Source/core/css/CSSGradientValue.cpp b/Source/core/css/CSSGradientValue.cpp
|
| index 4f72ea96e99380d9c743d17d8fa35e4f08ee3527..316513f7da42cc72780935b5eb2f1b572405d4db 100644
|
| --- a/Source/core/css/CSSGradientValue.cpp
|
| +++ b/Source/core/css/CSSGradientValue.cpp
|
| @@ -187,7 +187,7 @@ void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, Rend
|
| float length;
|
| if (stop.m_position->isLength())
|
| length = stop.m_position->computeLength<float>(style, rootStyle, style->effectiveZoom());
|
| - else
|
| + else
|
| length = stop.m_position->cssCalcValue()->toCalcValue(style, rootStyle, style->effectiveZoom())->evaluate(gradientLength);
|
| stops[i].offset = (gradientLength > 0) ? length / gradientLength : 0;
|
| } else {
|
| @@ -563,7 +563,7 @@ String CSSLinearGradientValue::customCssText() const
|
| result.append(stop.m_position->cssText());
|
| }
|
| }
|
| -
|
| +
|
| }
|
|
|
| result.append(')');
|
| @@ -631,7 +631,7 @@ static void endPointsFromAngle(float angleDeg, const IntSize& size, FloatPoint&
|
| float endX = c / (slope - perpendicularSlope);
|
| float endY = perpendicularSlope * endX + c;
|
|
|
| - // We computed the end point, so set the second point,
|
| + // We computed the end point, so set the second point,
|
| // taking into account the moved origin and the fact that we're in drawing space (+y = down).
|
| secondPoint.set(halfWidth + endX, halfHeight - endY);
|
| // Reflect around the center for the start point.
|
| @@ -681,7 +681,7 @@ PassRefPtr<Gradient> CSSLinearGradientValue::createGradient(RenderObject* render
|
| // Compute angle, and flip it back to "bearing angle" degrees.
|
| float angle = 90 - rad2deg(atan2(rise, run));
|
| endPointsFromAngle(angle, size, firstPoint, secondPoint, m_gradientType);
|
| - } else if (m_firstX || m_firstY) {
|
| + } else if (m_firstX || m_firstY) {
|
| secondPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), renderer->style(), rootStyle, size);
|
| if (m_firstX)
|
| firstPoint.setX(size.width() - secondPoint.x());
|
|
|