| Index: Source/core/css/CSSCalculationValue.cpp
|
| diff --git a/Source/core/css/CSSCalculationValue.cpp b/Source/core/css/CSSCalculationValue.cpp
|
| index 6c5ebc5b9120dba171c4247a0ccab8a4e0c24c06..1c2e0a3deb42b043e5ca02546e468ce42adfe0c3 100644
|
| --- a/Source/core/css/CSSCalculationValue.cpp
|
| +++ b/Source/core/css/CSSCalculationValue.cpp
|
| @@ -179,9 +179,9 @@ double CSSCalcValue::doubleValue() const
|
| return clampToPermittedRange(m_expression->doubleValue());
|
| }
|
|
|
| -double CSSCalcValue::computeLengthPx(const RenderStyle* currentStyle, const RenderStyle* rootStyle, double multiplier, bool computingFontSize) const
|
| +double CSSCalcValue::computeLengthPx(const CSSToLengthConversionData& conversionData) const
|
| {
|
| - return clampToPermittedRange(m_expression->computeLengthPx(currentStyle, rootStyle, multiplier, computingFontSize));
|
| + return clampToPermittedRange(m_expression->computeLengthPx(conversionData));
|
| }
|
|
|
| CSSCalcExpressionNode::~CSSCalcExpressionNode()
|
| @@ -224,18 +224,18 @@ public:
|
| return m_value->isVariableName();
|
| }
|
|
|
| - virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const RenderStyle* style, const RenderStyle* rootStyle, double zoom) const
|
| + virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const CSSToLengthConversionData& conversionData) const
|
| {
|
| switch (m_category) {
|
| case CalcNumber:
|
| return adoptPtr(new CalcExpressionNumber(m_value->getFloatValue()));
|
| case CalcLength:
|
| - return adoptPtr(new CalcExpressionLength(Length(m_value->computeLength<float>(style, rootStyle, zoom), WebCore::Fixed)));
|
| + return adoptPtr(new CalcExpressionLength(Length(m_value->computeLength<float>(conversionData), WebCore::Fixed)));
|
| case CalcPercent:
|
| case CalcPercentLength: {
|
| CSSPrimitiveValue* primitiveValue = m_value.get();
|
| return adoptPtr(new CalcExpressionLength(primitiveValue
|
| - ? primitiveValue->convertToLength<FixedConversion | PercentConversion>(style, rootStyle, zoom)
|
| + ? primitiveValue->convertToLength<FixedConversion | PercentConversion>(conversionData)
|
| : Length(Undefined)));
|
| }
|
| // Only types that could be part of a Length expression can be converted
|
| @@ -256,11 +256,11 @@ public:
|
| return 0;
|
| }
|
|
|
| - virtual double computeLengthPx(const RenderStyle* currentStyle, const RenderStyle* rootStyle, double multiplier, bool computingFontSize) const
|
| + virtual double computeLengthPx(const CSSToLengthConversionData& conversionData) const
|
| {
|
| switch (m_category) {
|
| case CalcLength:
|
| - return m_value->computeLength<double>(currentStyle, rootStyle, multiplier, computingFontSize);
|
| + return m_value->computeLength<double>(conversionData);
|
| case CalcPercent:
|
| case CalcNumber:
|
| return m_value->getDoubleValue();
|
| @@ -421,12 +421,12 @@ public:
|
| return !doubleValue();
|
| }
|
|
|
| - virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const RenderStyle* style, const RenderStyle* rootStyle, double zoom) const
|
| + virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const CSSToLengthConversionData& conversionData) const
|
| {
|
| - OwnPtr<CalcExpressionNode> left(m_leftSide->toCalcValue(style, rootStyle, zoom));
|
| + OwnPtr<CalcExpressionNode> left(m_leftSide->toCalcValue(conversionData));
|
| if (!left)
|
| return nullptr;
|
| - OwnPtr<CalcExpressionNode> right(m_rightSide->toCalcValue(style, rootStyle, zoom));
|
| + OwnPtr<CalcExpressionNode> right(m_rightSide->toCalcValue(conversionData));
|
| if (!right)
|
| return nullptr;
|
| return adoptPtr(new CalcExpressionBinaryOperation(left.release(), right.release(), m_operator));
|
| @@ -437,10 +437,10 @@ public:
|
| return evaluate(m_leftSide->doubleValue(), m_rightSide->doubleValue());
|
| }
|
|
|
| - virtual double computeLengthPx(const RenderStyle* currentStyle, const RenderStyle* rootStyle, double multiplier, bool computingFontSize) const
|
| + virtual double computeLengthPx(const CSSToLengthConversionData& conversionData) const
|
| {
|
| - const double leftValue = m_leftSide->computeLengthPx(currentStyle, rootStyle, multiplier, computingFontSize);
|
| - const double rightValue = m_rightSide->computeLengthPx(currentStyle, rootStyle, multiplier, computingFontSize);
|
| + const double leftValue = m_leftSide->computeLengthPx(conversionData);
|
| + const double rightValue = m_rightSide->computeLengthPx(conversionData);
|
| return evaluate(leftValue, rightValue);
|
| }
|
|
|
|
|