Ignore:
Timestamp:
Apr 17, 2013, 11:27:43 AM (12 years ago)
Author:
[email protected]
Message:

Make lengthConversion methods and arguments const
https://bugs.webkit.org/show_bug.cgi?id=114749

Reviewed by Andreas Kling.

Refactoring, no new tests.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcValue::computeLengthPx):
(WebCore::CSSCalcPrimitiveValue::toCalcValue):
(WebCore::CSSCalcPrimitiveValue::computeLengthPx):
(WebCore::CSSCalcBinaryOperation::toCalcValue):
(WebCore::CSSCalcBinaryOperation::computeLengthPx):

  • css/CSSCalculationValue.h:

(WebCore::CSSCalcValue::toCalcValue):
(CSSCalcValue):

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::computeLength):
(WebCore::CSSPrimitiveValue::computeLengthDouble):
(WebCore::CSSPrimitiveValue::viewportPercentageLength):

  • css/CSSPrimitiveValue.h:

(CSSPrimitiveValue):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::convertToLength):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::convertToIntLength):
(WebCore::StyleResolver::convertToFloatLength):

  • css/StyleResolver.h:

(StyleResolver):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSCalculationValue.h

    r142444 r148619  
    6868    virtual ~CSSCalcExpressionNode() = 0;
    6969    virtual bool isZero() const = 0;
    70     virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle*, RenderStyle* rootStyle, double zoom = 1.0) const = 0;   
     70    virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const RenderStyle*, const RenderStyle* rootStyle, double zoom = 1.0) const = 0;   
    7171    virtual double doubleValue() const = 0;
    72     virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false) const = 0;
     72    virtual double computeLengthPx(const RenderStyle* currentStyle, const RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false) const = 0;
    7373    virtual String customCssText() const = 0;
    7474#if ENABLE(CSS_VARIABLES)
     
    9999    static PassRefPtr<CSSCalcValue> create(CalculationValue*);
    100100
    101     PassRefPtr<CalculationValue> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom = 1.0) const
     101    PassRefPtr<CalculationValue> toCalcValue(const RenderStyle* style, const RenderStyle* rootStyle, double zoom = 1.0) const
    102102    {
    103103        return CalculationValue::create(m_expression->toCalcValue(style, rootStyle, zoom), m_nonNegative ? CalculationRangeNonNegative : CalculationRangeAll);
     
    107107    double doubleValue() const;
    108108    bool isNegative() const { return m_expression->doubleValue() < 0; }
    109     double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false) const;
     109    double computeLengthPx(const RenderStyle* currentStyle, const RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false) const;
    110110       
    111111    String customCssText() const;
Note: See TracChangeset for help on using the changeset viewer.