Changeset 53402 in webkit


Ignore:
Timestamp:
Jan 18, 2010 5:33:41 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-18 Daniel Bates <dbates@rim.com>

Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=33726

Following up on changes made with respect to bug #33498, we should
fix the the style errors found by the style bot.

Moreover, this fixes all the style errors found by check-webkit-style
except the use of an underline in the variable name _niflags. We should
fix this in a second run through for all the other variables names that
contain an underline because there are many.

No functionality was changed. So, no new tests.

  • rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::create): (WebCore::SVGRenderStyle::copy): (WebCore::SVGRenderStyle::operator!=): (WebCore::SVGRenderStyle::hasStroke): (WebCore::SVGRenderStyle::hasFill): (WebCore::SVGRenderStyle::InheritedFlags::operator==): (WebCore::SVGRenderStyle::InheritedFlags::operator!=): (WebCore::SVGRenderStyle::NonInheritedFlags::operator==): (WebCore::SVGRenderStyle::NonInheritedFlags::operator!=): (WebCore::SVGRenderStyle::NonInheritedFlags::): (WebCore::SVGRenderStyle::): (WebCore::SVGRenderStyle::setBitDefaults):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53401 r53402  
     12010-01-18  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=33726
     6
     7        Following up on changes made with respect to bug #33498, we should
     8        fix the the style errors found by the style bot.
     9       
     10        Moreover, this fixes all the style errors found by check-webkit-style
     11        except the use of an underline in the variable name _niflags. We should
     12        fix this in a second run through for all the other variables names that
     13        contain an underline because there are many.
     14
     15        No functionality was changed. So, no new tests.
     16
     17        * rendering/style/SVGRenderStyle.h:
     18        (WebCore::SVGRenderStyle::create):
     19        (WebCore::SVGRenderStyle::copy):
     20        (WebCore::SVGRenderStyle::operator!=):
     21        (WebCore::SVGRenderStyle::hasStroke):
     22        (WebCore::SVGRenderStyle::hasFill):
     23        (WebCore::SVGRenderStyle::InheritedFlags::operator==):
     24        (WebCore::SVGRenderStyle::InheritedFlags::operator!=):
     25        (WebCore::SVGRenderStyle::NonInheritedFlags::operator==):
     26        (WebCore::SVGRenderStyle::NonInheritedFlags::operator!=):
     27        (WebCore::SVGRenderStyle::NonInheritedFlags::):
     28        (WebCore::SVGRenderStyle::):
     29        (WebCore::SVGRenderStyle::setBitDefaults):
     30
    1312010-01-18  Andrei Popescu  <andreip@google.com>
    232
  • trunk/WebCore/rendering/style/SVGRenderStyle.h

    r53300 r53402  
    3535namespace WebCore {
    3636
    37     class FloatRect;
    38     class IntRect;
    39     class RenderObject;
    40     class RenderStyle;
    41 
    42     class SVGRenderStyle : public RefCounted<SVGRenderStyle> {   
    43     public:
    44         static PassRefPtr<SVGRenderStyle> create() { return adoptRef(new SVGRenderStyle); }
    45         PassRefPtr<SVGRenderStyle> copy() const { return adoptRef(new SVGRenderStyle(*this));}
    46         ~SVGRenderStyle();
    47 
    48         bool inheritedNotEqual(const SVGRenderStyle*) const;
    49         void inheritFrom(const SVGRenderStyle*);
    50 
    51         // FIXME: These functions should move to ShadowData.
    52         void inflateForShadow(IntRect&) const;
    53         void inflateForShadow(FloatRect&) const;
     37class FloatRect;
     38class IntRect;
     39class RenderObject;
     40class RenderStyle;
     41
     42class SVGRenderStyle : public RefCounted<SVGRenderStyle> {   
     43public:
     44    static PassRefPtr<SVGRenderStyle> create() { return adoptRef(new SVGRenderStyle); }
     45    PassRefPtr<SVGRenderStyle> copy() const { return adoptRef(new SVGRenderStyle(*this));}
     46    ~SVGRenderStyle();
     47
     48    bool inheritedNotEqual(const SVGRenderStyle*) const;
     49    void inheritFrom(const SVGRenderStyle*);
     50
     51    // FIXME: These functions should move to ShadowData.
     52    void inflateForShadow(IntRect&) const;
     53    void inflateForShadow(FloatRect&) const;
     54   
     55    bool operator==(const SVGRenderStyle&) const;
     56    bool operator!=(const SVGRenderStyle& o) const { return !(*this == o); }
     57
     58    // SVG CSS Properties
     59    SVG_RS_DEFINE_ATTRIBUTE(EAlignmentBaseline, AlignmentBaseline, alignmentBaseline, AB_AUTO)
     60    SVG_RS_DEFINE_ATTRIBUTE(EDominantBaseline, DominantBaseline, dominantBaseline, DB_AUTO)
     61    SVG_RS_DEFINE_ATTRIBUTE(EBaselineShift, BaselineShift, baselineShift, BS_BASELINE)
     62
     63    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineCap, CapStyle, capStyle, ButtCap)
     64    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(WindRule, ClipRule, clipRule, RULE_NONZERO)
     65    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorInterpolation, ColorInterpolation, colorInterpolation, CI_SRGB)
     66    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorInterpolation, ColorInterpolationFilters, colorInterpolationFilters, CI_LINEARRGB)
     67    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorRendering, ColorRendering, colorRendering, CR_AUTO)
     68    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(WindRule, FillRule, fillRule, RULE_NONZERO)
     69    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EImageRendering, ImageRendering, imageRendering, IR_AUTO)
     70    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineJoin, JoinStyle, joinStyle, MiterJoin)
     71    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EShapeRendering, ShapeRendering, shapeRendering, SR_AUTO)
     72    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(ETextAnchor, TextAnchor, textAnchor, TA_START)
     73    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EWritingMode, WritingMode, writingMode, WM_LRTB)
     74    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EGlyphOrientation, GlyphOrientationHorizontal, glyphOrientationHorizontal, GO_0DEG)
     75    SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EGlyphOrientation, GlyphOrientationVertical, glyphOrientationVertical, GO_AUTO)
     76
     77    // SVG CSS Properties (using DataRef's)
     78    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, fill, opacity, FillOpacity, fillOpacity, 1.0f)
     79    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(SVGPaint, fill, paint, FillPaint, fillPaint, SVGPaint::defaultFill())
     80
     81    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stroke, opacity, StrokeOpacity, strokeOpacity, 1.0f)
     82    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(SVGPaint, stroke, paint, StrokePaint, strokePaint, SVGPaint::defaultStroke())
     83    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValueList, stroke, dashArray, StrokeDashArray, strokeDashArray, 0)
     84    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stroke, miterLimit, StrokeMiterLimit, strokeMiterLimit, 4.0f)
     85   
     86    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, stroke, width, StrokeWidth, strokeWidth, 0)
     87    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, stroke, dashOffset, StrokeDashOffset, strokeDashOffset, 0);
     88
     89    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, text, kerning, Kerning, kerning, 0)
     90
     91    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stops, opacity, StopOpacity, stopOpacity, 1.0f)
     92    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, stops, color, StopColor, stopColor, Color(0, 0, 0))   
     93
     94    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, clip, clipPath, ClipPath, clipPath, String())
     95    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, mask, maskElement, MaskElement, maskElement, String())
     96    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, startMarker, StartMarker, startMarker, String())
     97    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, midMarker, MidMarker, midMarker, String())
     98    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, endMarker, EndMarker, endMarker, String())
     99
     100    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, misc, filter, Filter, filter, String())
     101    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, misc, floodOpacity, FloodOpacity, floodOpacity, 1.0f)
     102    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, floodColor, FloodColor, floodColor, Color(0, 0, 0))
     103    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, lightingColor, LightingColor, lightingColor, Color(255, 255, 255))
     104    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, misc, baselineShiftValue, BaselineShiftValue, baselineShiftValue, 0)
     105
     106    SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_OWNPTR(ShadowData, shadowSVG, shadow, Shadow, shadow, 0)
     107
     108    // convenience
     109    bool hasStroke() const { return (strokePaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
     110    bool hasFill() const { return (fillPaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
     111
     112    static float cssPrimitiveToLength(const RenderObject*, CSSValue*, float defaultValue = 0.0f);
     113
     114protected:
     115    // inherit
     116    struct InheritedFlags {
     117        bool operator==(const InheritedFlags& other) const
     118        {
     119            return (_colorRendering == other._colorRendering)
     120                && (_imageRendering == other._imageRendering)
     121                && (_shapeRendering == other._shapeRendering)
     122                && (_clipRule == other._clipRule)
     123                && (_fillRule == other._fillRule)
     124                && (_capStyle == other._capStyle)
     125                && (_joinStyle == other._joinStyle)
     126                && (_textAnchor == other._textAnchor)
     127                && (_colorInterpolation == other._colorInterpolation)
     128                && (_colorInterpolationFilters == other._colorInterpolationFilters)
     129                && (_writingMode == other._writingMode)
     130                && (_glyphOrientationHorizontal == other._glyphOrientationHorizontal)
     131                && (_glyphOrientationVertical == other._glyphOrientationVertical);
     132        }
     133
     134        bool operator!=(const InheritedFlags& other) const
     135        {
     136            return !(*this == other);
     137        }
     138
     139        unsigned _colorRendering : 2; // EColorRendering
     140        unsigned _imageRendering : 2; // EImageRendering
     141        unsigned _shapeRendering : 2; // EShapeRendering
     142        unsigned _clipRule : 1; // WindRule
     143        unsigned _fillRule : 1; // WindRule
     144        unsigned _capStyle : 2; // LineCap
     145        unsigned _joinStyle : 2; // LineJoin
     146        unsigned _textAnchor : 2; // ETextAnchor
     147        unsigned _colorInterpolation : 2; // EColorInterpolation
     148        unsigned _colorInterpolationFilters : 2; // EColorInterpolation
     149        unsigned _writingMode : 3; // EWritingMode
     150        unsigned _glyphOrientationHorizontal : 3; // EGlyphOrientation
     151        unsigned _glyphOrientationVertical : 3; // EGlyphOrientation
     152    } svg_inherited_flags;
     153
     154    // don't inherit
     155    struct NonInheritedFlags {
     156        // 32 bit non-inherited, don't add to the struct, or the operator will break.
     157        bool operator==(const NonInheritedFlags &other) const { return _niflags == other._niflags; }
     158        bool operator!=(const NonInheritedFlags &other) const { return _niflags != other._niflags; }
     159
     160        union {
     161            struct {
     162                unsigned _alignmentBaseline : 4; // EAlignmentBaseline
     163                unsigned _dominantBaseline : 4; // EDominantBaseline
     164                unsigned _baselineShift : 2; // EBaselineShift
     165                // 22 bits unused
     166            } f;
     167            uint32_t _niflags;
     168        };
     169    } svg_noninherited_flags;
     170
     171    // inherited attributes
     172    DataRef<StyleFillData> fill;
     173    DataRef<StyleStrokeData> stroke;
     174    DataRef<StyleMarkerData> markers;
     175    DataRef<StyleTextData> text;
     176
     177    // non-inherited attributes
     178    DataRef<StyleStopData> stops;
     179    DataRef<StyleClipData> clip;
     180    DataRef<StyleMaskData> mask;
     181    DataRef<StyleMiscData> misc;
     182    DataRef<StyleShadowSVGData> shadowSVG;
     183
     184private:
     185    enum CreateDefaultType { CreateDefault };
    54186       
    55         bool operator==(const SVGRenderStyle&) const;
    56         bool operator!=(const SVGRenderStyle& o) const { return !(*this == o); }
    57 
    58         // SVG CSS Properties
    59         SVG_RS_DEFINE_ATTRIBUTE(EAlignmentBaseline, AlignmentBaseline, alignmentBaseline, AB_AUTO)
    60         SVG_RS_DEFINE_ATTRIBUTE(EDominantBaseline, DominantBaseline, dominantBaseline, DB_AUTO)
    61         SVG_RS_DEFINE_ATTRIBUTE(EBaselineShift, BaselineShift, baselineShift, BS_BASELINE)
    62 
    63         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineCap, CapStyle, capStyle, ButtCap)
    64         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(WindRule, ClipRule, clipRule, RULE_NONZERO)
    65         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorInterpolation, ColorInterpolation, colorInterpolation, CI_SRGB)
    66         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorInterpolation, ColorInterpolationFilters, colorInterpolationFilters, CI_LINEARRGB)
    67         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EColorRendering, ColorRendering, colorRendering, CR_AUTO)
    68         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(WindRule, FillRule, fillRule, RULE_NONZERO)
    69         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EImageRendering, ImageRendering, imageRendering, IR_AUTO)
    70         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineJoin, JoinStyle, joinStyle, MiterJoin)
    71         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EShapeRendering, ShapeRendering, shapeRendering, SR_AUTO)
    72         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(ETextAnchor, TextAnchor, textAnchor, TA_START)
    73         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EWritingMode, WritingMode, writingMode, WM_LRTB)
    74         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EGlyphOrientation, GlyphOrientationHorizontal, glyphOrientationHorizontal, GO_0DEG)
    75         SVG_RS_DEFINE_ATTRIBUTE_INHERITED(EGlyphOrientation, GlyphOrientationVertical, glyphOrientationVertical, GO_AUTO)
    76 
    77         // SVG CSS Properties (using DataRef's)
    78         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, fill, opacity, FillOpacity, fillOpacity, 1.0f)
    79         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(SVGPaint, fill, paint, FillPaint, fillPaint, SVGPaint::defaultFill())
    80 
    81         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stroke, opacity, StrokeOpacity, strokeOpacity, 1.0f)
    82         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(SVGPaint, stroke, paint, StrokePaint, strokePaint, SVGPaint::defaultStroke())
    83         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValueList, stroke, dashArray, StrokeDashArray, strokeDashArray, 0)
    84         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stroke, miterLimit, StrokeMiterLimit, strokeMiterLimit, 4.0f)
    85        
    86         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, stroke, width, StrokeWidth, strokeWidth, 0)
    87         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, stroke, dashOffset, StrokeDashOffset, strokeDashOffset, 0);
    88 
    89         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, text, kerning, Kerning, kerning, 0)
    90 
    91         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stops, opacity, StopOpacity, stopOpacity, 1.0f)
    92         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, stops, color, StopColor, stopColor, Color(0, 0, 0))   
    93 
    94         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, clip, clipPath, ClipPath, clipPath, String())
    95         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, mask, maskElement, MaskElement, maskElement, String())
    96         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, startMarker, StartMarker, startMarker, String())
    97         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, midMarker, MidMarker, midMarker, String())
    98         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, markers, endMarker, EndMarker, endMarker, String())
    99 
    100         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, misc, filter, Filter, filter, String())
    101         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, misc, floodOpacity, FloodOpacity, floodOpacity, 1.0f)
    102         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, floodColor, FloodColor, floodColor, Color(0, 0, 0))
    103         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, lightingColor, LightingColor, lightingColor, Color(255, 255, 255))
    104         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, misc, baselineShiftValue, BaselineShiftValue, baselineShiftValue, 0)
    105 
    106         SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_OWNPTR(ShadowData, shadowSVG, shadow, Shadow, shadow, 0)
    107 
    108         // convenience
    109         bool hasStroke() const { return (strokePaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
    110         bool hasFill() const { return (fillPaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
    111 
    112         static float cssPrimitiveToLength(const RenderObject*, CSSValue*, float defaultValue = 0.0f);
    113 
    114     protected:
    115         // inherit
    116         struct InheritedFlags {
    117             bool operator==(const InheritedFlags& other) const
    118             {
    119                 return (_colorRendering == other._colorRendering) &&
    120                        (_imageRendering == other._imageRendering) &&
    121                        (_shapeRendering == other._shapeRendering) &&
    122                        (_clipRule == other._clipRule) &&
    123                        (_fillRule == other._fillRule) &&
    124                        (_capStyle == other._capStyle) &&
    125                        (_joinStyle == other._joinStyle) &&
    126                        (_textAnchor == other._textAnchor) &&
    127                        (_colorInterpolation == other._colorInterpolation) &&
    128                        (_colorInterpolationFilters == other._colorInterpolationFilters) &&
    129                        (_writingMode == other._writingMode) &&
    130                        (_glyphOrientationHorizontal == other._glyphOrientationHorizontal) &&
    131                        (_glyphOrientationVertical == other._glyphOrientationVertical);
    132             }
    133 
    134             bool operator!=(const InheritedFlags& other) const
    135             {
    136                 return !(*this == other);
    137             }
    138 
    139             unsigned _colorRendering : 2; // EColorRendering
    140             unsigned _imageRendering : 2; // EImageRendering
    141             unsigned _shapeRendering : 2; // EShapeRendering
    142             unsigned _clipRule : 1; // WindRule
    143             unsigned _fillRule : 1; // WindRule
    144             unsigned _capStyle : 2; // LineCap
    145             unsigned _joinStyle : 2; // LineJoin
    146             unsigned _textAnchor : 2; // ETextAnchor
    147             unsigned _colorInterpolation : 2; // EColorInterpolation
    148             unsigned _colorInterpolationFilters : 2; // EColorInterpolation
    149             unsigned _writingMode : 3; // EWritingMode
    150             unsigned _glyphOrientationHorizontal : 3; // EGlyphOrientation
    151             unsigned _glyphOrientationVertical : 3; // EGlyphOrientation
    152         } svg_inherited_flags;
    153 
    154         // don't inherit
    155         struct NonInheritedFlags {
    156             // 32 bit non-inherited, don't add to the struct, or the operator will break.
    157             bool operator==(const NonInheritedFlags &other) const { return _niflags == other._niflags; }
    158             bool operator!=(const NonInheritedFlags &other) const { return _niflags != other._niflags; }
    159 
    160             union {
    161                 struct {
    162                     unsigned _alignmentBaseline : 4; // EAlignmentBaseline
    163                     unsigned _dominantBaseline : 4; // EDominantBaseline
    164                     unsigned _baselineShift : 2; // EBaselineShift
    165                     // 22 bits unused
    166                 } f;
    167                 uint32_t _niflags;
    168             };
    169         } svg_noninherited_flags;
    170 
    171         // inherited attributes
    172         DataRef<StyleFillData> fill;
    173         DataRef<StyleStrokeData> stroke;
    174         DataRef<StyleMarkerData> markers;
    175         DataRef<StyleTextData> text;
    176 
    177         // non-inherited attributes
    178         DataRef<StyleStopData> stops;
    179         DataRef<StyleClipData> clip;
    180         DataRef<StyleMaskData> mask;
    181         DataRef<StyleMiscData> misc;
    182         DataRef<StyleShadowSVGData> shadowSVG;
    183 
    184     private:
    185         enum CreateDefaultType { CreateDefault };
    186            
    187         SVGRenderStyle();
    188         SVGRenderStyle(const SVGRenderStyle&);
    189         SVGRenderStyle(CreateDefaultType); // Used to create the default style.
    190 
    191         void setBitDefaults()
    192         {
    193             svg_inherited_flags._clipRule = initialClipRule();
    194             svg_inherited_flags._colorRendering = initialColorRendering();
    195             svg_inherited_flags._fillRule = initialFillRule();
    196             svg_inherited_flags._imageRendering = initialImageRendering();
    197             svg_inherited_flags._shapeRendering = initialShapeRendering();
    198             svg_inherited_flags._textAnchor = initialTextAnchor();
    199             svg_inherited_flags._capStyle = initialCapStyle();
    200             svg_inherited_flags._joinStyle = initialJoinStyle();
    201             svg_inherited_flags._colorInterpolation = initialColorInterpolation();
    202             svg_inherited_flags._colorInterpolationFilters = initialColorInterpolationFilters();
    203             svg_inherited_flags._writingMode = initialWritingMode();
    204             svg_inherited_flags._glyphOrientationHorizontal = initialGlyphOrientationHorizontal();
    205             svg_inherited_flags._glyphOrientationVertical = initialGlyphOrientationVertical();
    206 
    207             svg_noninherited_flags._niflags = 0;
    208             svg_noninherited_flags.f._alignmentBaseline = initialAlignmentBaseline();
    209             svg_noninherited_flags.f._dominantBaseline = initialDominantBaseline();
    210             svg_noninherited_flags.f._baselineShift = initialBaselineShift();
    211         }
    212     };
     187    SVGRenderStyle();
     188    SVGRenderStyle(const SVGRenderStyle&);
     189    SVGRenderStyle(CreateDefaultType); // Used to create the default style.
     190
     191    void setBitDefaults()
     192    {
     193        svg_inherited_flags._clipRule = initialClipRule();
     194        svg_inherited_flags._colorRendering = initialColorRendering();
     195        svg_inherited_flags._fillRule = initialFillRule();
     196        svg_inherited_flags._imageRendering = initialImageRendering();
     197        svg_inherited_flags._shapeRendering = initialShapeRendering();
     198        svg_inherited_flags._textAnchor = initialTextAnchor();
     199        svg_inherited_flags._capStyle = initialCapStyle();
     200        svg_inherited_flags._joinStyle = initialJoinStyle();
     201        svg_inherited_flags._colorInterpolation = initialColorInterpolation();
     202        svg_inherited_flags._colorInterpolationFilters = initialColorInterpolationFilters();
     203        svg_inherited_flags._writingMode = initialWritingMode();
     204        svg_inherited_flags._glyphOrientationHorizontal = initialGlyphOrientationHorizontal();
     205        svg_inherited_flags._glyphOrientationVertical = initialGlyphOrientationVertical();
     206
     207        svg_noninherited_flags._niflags = 0;
     208        svg_noninherited_flags.f._alignmentBaseline = initialAlignmentBaseline();
     209        svg_noninherited_flags.f._dominantBaseline = initialDominantBaseline();
     210        svg_noninherited_flags.f._baselineShift = initialBaselineShift();
     211    }
     212};
    213213
    214214} // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.