Ignore:
Timestamp:
Nov 8, 2011, 5:23:24 AM (14 years ago)
Author:
[email protected]
Message:

CSSGradientValue: Devirtualize createGradient().
<http://webkit.org/b/71800>

Reviewed by Antti Koivisto.

Make createGradient() non-virtual and call the appropriate subclass
implementation in image() based on is{Linear,Radial}Gradient().

  • css/CSSGradientValue.cpp:

(WebCore::CSSGradientValue::image):

  • css/CSSGradientValue.h:
File:
1 edited

Legend:

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

    r99468 r99556  
    7878    void addStops(Gradient*, RenderObject*, RenderStyle* rootStyle, float maxLengthForRepeat = 0);
    7979
    80     // Create the gradient for a given size.
    81     virtual PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&) = 0;
    82 
    8380    // Resolve points/radii to front end values.
    8481    FloatPoint computeEndPoint(CSSPrimitiveValue*, CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, const IntSize&);
     
    112109    virtual String cssText() const;
    113110
     111    // Create the gradient for a given size.
     112    PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&);
     113
    114114private:
    115115    CSSLinearGradientValue(CSSGradientRepeat repeat, bool deprecatedType = false)
     
    117117    {
    118118    }
    119 
    120     // Create the gradient for a given size.
    121     virtual PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&);
    122119
    123120    RefPtr<CSSPrimitiveValue> m_angle; // may be null.
     
    142139    void setEndVerticalSize(PassRefPtr<CSSPrimitiveValue> val) { m_endVerticalSize = val; }
    143140
     141    // Create the gradient for a given size.
     142    PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&);
     143
    144144private:
    145145    CSSRadialGradientValue(CSSGradientRepeat repeat, bool deprecatedType = false)
     
    147147    {
    148148    }
    149 
    150     // Create the gradient for a given size.
    151     virtual PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&);
    152149
    153150    // Resolve points/radii to front end values.
Note: See TracChangeset for help on using the changeset viewer.