Changeset 16330 in webkit


Ignore:
Timestamp:
Sep 12, 2006 2:19:26 PM (18 years ago)
Author:
rwlbuis
Message:

Reviewed by Anders.

Add exception codes to SVGList functions, adjust all code using it.

Move SVGPaintType enums from ksvg.h into SVGPaint (needed for js generation)
Move SVGUnitTypes enums from ksvg.h into it's own file SVGUnitType.h (ditto)
Move SVGRenderingIntent enums from ksvg.h into it's own file SVGRenderingIntent.h (ditto)
Move SVGZoomAndPan enums from ksvg.h into SVGSVGElement (ditto)
Move SVGFE* related enums into their respecitive classes.

Fix JSSVGNumber to operator on doubles, instead of floats.

Location:
trunk/WebCore
Files:
2 added
85 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r16329 r16330  
     12006-09-12  Nikolas Zimmermann  <zimmermann@kde.org>
     2
     3        Reviewed by Anders.
     4
     5        Add exception codes to SVGList functions, adjust all code using it.
     6
     7        Move SVGPaintType enums from ksvg.h into SVGPaint (needed for js generation)
     8        Move SVGUnitTypes enums from ksvg.h into it's own file SVGUnitType.h (ditto)
     9        Move SVGRenderingIntent enums from ksvg.h into it's own file SVGRenderingIntent.h (ditto)
     10        Move SVGZoomAndPan enums from ksvg.h into SVGSVGElement (ditto)
     11        Move SVGFE* related enums into their respecitive classes.
     12
     13        Fix JSSVGNumber to operator on doubles, instead of floats.
     14
     15        * ksvg2/bindings/js/JSSVGNumber.cpp:
     16        (WebCore::getJSSVGNumber):
     17        * ksvg2/bindings/js/JSSVGNumber.h:
     18        (WebCore::JSSVGNumber::JSSVGNumber):
     19        * ksvg2/css/SVGCSSParser.cpp:
     20        (WebCore::CSSParser::parseSVGValue):
     21        (WebCore::CSSParser::parseSVGPaint):
     22        * ksvg2/css/SVGRenderStyleDefs.cpp:
     23        (StyleFillData::operator==):
     24        * ksvg2/ksvg.h:
     25        * ksvg2/misc/KCanvasRenderingStyle.cpp:
     26        (WebCore::KSVGPainterFactory::isFilled):
     27        (WebCore::KSVGPainterFactory::fillPaintServer):
     28        (WebCore::KSVGPainterFactory::isStroked):
     29        (WebCore::KSVGPainterFactory::strokePaintServer):
     30        * ksvg2/misc/KSVGTimeScheduler.cpp:
     31        (WebCore::SVGTimer::notifyAll):
     32        * ksvg2/svg/SVGAnimateColorElement.cpp:
     33        (WebCore::SVGAnimateColorElement::handleTimerEvent):
     34        * ksvg2/svg/SVGAnimateTransformElement.cpp:
     35        (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
     36        (WebCore::SVGAnimateTransformElement::parseMappedAttribute):
     37        (WebCore::SVGAnimateTransformElement::handleTimerEvent):
     38        (WebCore::SVGAnimateTransformElement::parseTransformValue):
     39        * ksvg2/svg/SVGAnimateTransformElement.h:
     40        * ksvg2/svg/SVGAnimatedTemplate.h:
     41        * ksvg2/svg/SVGAnimationElement.cpp:
     42        (SVGAnimationElement::getSimpleDuration):
     43        (SVGAnimationElement::parseMappedAttribute):
     44        (SVGAnimationElement::setTargetAttribute):
     45        * ksvg2/svg/SVGAnimationElement.h:
     46        * ksvg2/svg/SVGClipPathElement.cpp:
     47        (SVGClipPathElement::SVGClipPathElement):
     48        (SVGClipPathElement::parseMappedAttribute):
     49        (SVGClipPathElement::canvasResource):
     50        * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
     51        (SVGComponentTransferFunctionElement::transferFunction):
     52        * ksvg2/svg/SVGComponentTransferFunctionElement.h:
     53        (WebCore::SVGComponentTransferFunctionElement::):
     54        * ksvg2/svg/SVGDocument.cpp:
     55        (WebCore::SVGDocument::dispatchZoomEvent):
     56        (WebCore::SVGDocument::dispatchScrollEvent):
     57        * ksvg2/svg/SVGFEBlendElement.cpp:
     58        (WebCore::SVGFEBlendElement::parseMappedAttribute):
     59        (WebCore::SVGFEBlendElement::filterEffect):
     60        * ksvg2/svg/SVGFEBlendElement.h:
     61        (WebCore::SVGFEBlendElement::):
     62        * ksvg2/svg/SVGFEColorMatrixElement.cpp:
     63        (SVGFEColorMatrixElement::parseMappedAttribute):
     64        (SVGFEColorMatrixElement::filterEffect):
     65        * ksvg2/svg/SVGFEColorMatrixElement.h:
     66        (WebCore::SVGFEColorMatrixElement::):
     67        * ksvg2/svg/SVGFEComponentTransferElement.cpp:
     68        (WebCore::SVGFEComponentTransferElement::parseMappedAttribute):
     69        (WebCore::SVGFEComponentTransferElement::filterEffect):
     70        * ksvg2/svg/SVGFEComponentTransferElement.h:
     71        * ksvg2/svg/SVGFECompositeElement.cpp:
     72        (SVGFECompositeElement::parseMappedAttribute):
     73        (SVGFECompositeElement::filterEffect):
     74        * ksvg2/svg/SVGFECompositeElement.h:
     75        (WebCore::SVGFECompositeElement::):
     76        * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
     77        (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
     78        (WebCore::SVGFEDiffuseLightingElement::filterEffect):
     79        * ksvg2/svg/SVGFEDiffuseLightingElement.h:
     80        * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
     81        (SVGFEDisplacementMapElement::parseMappedAttribute):
     82        (SVGFEDisplacementMapElement::filterEffect):
     83        * ksvg2/svg/SVGFEDisplacementMapElement.h:
     84        (WebCore::SVGFEDisplacementMapElement::):
     85        * ksvg2/svg/SVGFEFloodElement.cpp:
     86        (WebCore::SVGFEFloodElement::parseMappedAttribute):
     87        (WebCore::SVGFEFloodElement::filterEffect):
     88        * ksvg2/svg/SVGFEFloodElement.h:
     89        * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
     90        (SVGFEGaussianBlurElement::parseMappedAttribute):
     91        (SVGFEGaussianBlurElement::filterEffect):
     92        * ksvg2/svg/SVGFEGaussianBlurElement.h:
     93        * ksvg2/svg/SVGFEMergeElement.cpp:
     94        (SVGFEMergeElement::filterEffect):
     95        * ksvg2/svg/SVGFEMergeNodeElement.cpp:
     96        (SVGFEMergeNodeElement::parseMappedAttribute):
     97        * ksvg2/svg/SVGFEMergeNodeElement.h:
     98        * ksvg2/svg/SVGFEOffsetElement.cpp:
     99        (SVGFEOffsetElement::parseMappedAttribute):
     100        (SVGFEOffsetElement::filterEffect):
     101        * ksvg2/svg/SVGFEOffsetElement.h:
     102        * ksvg2/svg/SVGFESpecularLightingElement.cpp:
     103        (SVGFESpecularLightingElement::parseMappedAttribute):
     104        (SVGFESpecularLightingElement::filterEffect):
     105        * ksvg2/svg/SVGFESpecularLightingElement.h:
     106        * ksvg2/svg/SVGFETileElement.cpp:
     107        (WebCore::SVGFETileElement::parseMappedAttribute):
     108        (WebCore::SVGFETileElement::filterEffect):
     109        * ksvg2/svg/SVGFETileElement.h:
     110        * ksvg2/svg/SVGFETurbulenceElement.h:
     111        (WebCore::SVGFETurbulenceElement::):
     112        * ksvg2/svg/SVGFilterElement.cpp:
     113        (SVGFilterElement::SVGFilterElement):
     114        (SVGFilterElement::parseMappedAttribute):
     115        (SVGFilterElement::canvasResource):
     116        * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
     117        (SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
     118        * ksvg2/svg/SVGGradientElement.cpp:
     119        (SVGGradientElement::SVGGradientElement):
     120        (SVGGradientElement::parseMappedAttribute):
     121        * ksvg2/svg/SVGGradientElement.h:
     122        (WebCore::SVGGradientElement::):
     123        * ksvg2/svg/SVGHelper.cpp:
     124        (WebCore::SVGHelper::ParseSeperatedList):
     125        * ksvg2/svg/SVGLengthList.cpp:
     126        (WebCore::SVGLengthList::parse):
     127        * ksvg2/svg/SVGLinearGradientElement.cpp:
     128        (SVGLinearGradientElement::buildGradient):
     129        * ksvg2/svg/SVGList.h:
     130        (WebCore::SVGListBase::clear):
     131        (WebCore::SVGListBase::initialize):
     132        (WebCore::SVGListBase::getItem):
     133        (WebCore::SVGListBase::insertItemBefore):
     134        (WebCore::SVGListBase::replaceItem):
     135        (WebCore::SVGListBase::removeItem):
     136        (WebCore::SVGListBase::appendItem):
     137        * ksvg2/svg/SVGLocatable.cpp:
     138        * ksvg2/svg/SVGLocatable.h:
     139        * ksvg2/svg/SVGMarkerElement.h:
     140        (WebCore::SVGMarkerElement::):
     141        * ksvg2/svg/SVGNumberList.cpp:
     142        (SVGNumberList::parse):
     143        * ksvg2/svg/SVGPaint.cpp:
     144        (WebCore::SVGPaint::SVGPaint):
     145        (WebCore::SVGPaint::uri):
     146        (WebCore::SVGPaint::setUri):
     147        (WebCore::SVGPaint::setPaint):
     148        * ksvg2/svg/SVGPaint.h:
     149        (WebCore::SVGPaint::):
     150        * ksvg2/svg/SVGPathElement.cpp:
     151        (WebCore::SVGPathElement::svgMoveTo):
     152        (WebCore::SVGPathElement::svgLineTo):
     153        (WebCore::SVGPathElement::svgLineToHorizontal):
     154        (WebCore::SVGPathElement::svgLineToVertical):
     155        (WebCore::SVGPathElement::svgCurveToCubic):
     156        (WebCore::SVGPathElement::svgCurveToCubicSmooth):
     157        (WebCore::SVGPathElement::svgCurveToQuadratic):
     158        (WebCore::SVGPathElement::svgCurveToQuadraticSmooth):
     159        (WebCore::SVGPathElement::svgArcTo):
     160        (WebCore::SVGPathElement::svgClosePath):
     161        (WebCore::SVGPathElement::parseMappedAttribute):
     162        (WebCore::SVGPathElement::toPathData):
     163        * ksvg2/svg/SVGPatternElement.cpp:
     164        (WebCore::SVGPatternElement::SVGPatternElement):
     165        (WebCore::SVGPatternElement::parseMappedAttribute):
     166        (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
     167        (WebCore::SVGPatternElement::drawPatternContentIntoTile):
     168        * ksvg2/svg/SVGPolyElement.cpp:
     169        (SVGPolyElement::parseMappedAttribute):
     170        (SVGPolyElement::svgPolyTo):
     171        (SVGPolyElement::notifyAttributeChange):
     172        * ksvg2/svg/SVGPolygonElement.cpp:
     173        (SVGPolygonElement::toPathData):
     174        * ksvg2/svg/SVGPolylineElement.cpp:
     175        (SVGPolylineElement::toPathData):
     176        * ksvg2/svg/SVGRadialGradientElement.cpp:
     177        (WebCore::SVGRadialGradientElement::buildGradient):
     178        * ksvg2/svg/SVGRenderingIntent.h: Added.
     179        (WebCore::SVGRenderingIntent::):
     180        (WebCore::SVGRenderingIntent::SVGRenderingIntent):
     181        (WebCore::SVGRenderingIntent::~SVGRenderingIntent):
     182        * ksvg2/svg/SVGSVGElement.h:
     183        (WebCore::SVGSVGElement::):
     184        * ksvg2/svg/SVGScriptElement.cpp:
     185        (WebCore::SVGScriptElement::type):
     186        (WebCore::SVGScriptElement::setType):
     187        (WebCore::SVGScriptElement::parseMappedAttribute):
     188        * ksvg2/svg/SVGScriptElement.h:
     189        * ksvg2/svg/SVGStringList.cpp:
     190        (WebCore::SVGStringList::reset):
     191        * ksvg2/svg/SVGStyledLocatableElement.cpp:
     192        (SVGStyledLocatableElement::getTransformToElement):
     193        * ksvg2/svg/SVGStyledLocatableElement.h:
     194        * ksvg2/svg/SVGStyledTransformableElement.cpp:
     195        (SVGStyledTransformableElement::parseMappedAttribute):
     196        (SVGStyledTransformableElement::getTransformToElement):
     197        * ksvg2/svg/SVGStyledTransformableElement.h:
     198        * ksvg2/svg/SVGTests.cpp:
     199        (WebCore::SVGTests::hasExtension):
     200        (WebCore::SVGTests::isValid):
     201        * ksvg2/svg/SVGTests.h:
     202        * ksvg2/svg/SVGTextContentElement.cpp:
     203        (SVGTextContentElement::getSubStringLength):
     204        (SVGTextContentElement::getStartPositionOfChar):
     205        (SVGTextContentElement::getEndPositionOfChar):
     206        (SVGTextContentElement::getExtentOfChar):
     207        (SVGTextContentElement::getRotationOfChar):
     208        (SVGTextContentElement::selectSubString):
     209        * ksvg2/svg/SVGTextContentElement.h:
     210        (WebCore::SVGTextContentElement::):
     211        * ksvg2/svg/SVGTextElement.cpp:
     212        (WebCore::SVGTextElement::parseMappedAttribute):
     213        * ksvg2/svg/SVGTextElement.h:
     214        (WebCore::SVGTextElement::getTransformToElement):
     215        * ksvg2/svg/SVGTransform.h:
     216        * ksvg2/svg/SVGTransformList.cpp:
     217        (SVGTransformList::consolidate):
     218        (SVGTransformList::concatenate):
     219        * ksvg2/svg/SVGTransformable.cpp:
     220        (SVGTransformable::parseTransformAttribute):
     221        * ksvg2/svg/SVGUnitTypes.h: Added.
     222        (WebCore::SVGUnitTypes::):
     223        (WebCore::SVGUnitTypes::SVGUnitTypes):
     224        (WebCore::SVGUnitTypes::~SVGUnitTypes):
     225        * ksvg2/svg/SVGUseElement.cpp:
     226        (SVGUseElement::closeRenderer):
     227        * ksvg2/svg/SVGViewElement.h:
     228        (WebCore::SVGViewElement::):
     229        * ksvg2/svg/SVGZoomAndPan.cpp:
     230        (WebCore::SVGZoomAndPan::SVGZoomAndPan):
     231        (WebCore::SVGZoomAndPan::parseMappedAttribute):
     232
    12332006-09-12  John Sullivan  <sullivan@apple.com>
    2234
  • trunk/WebCore/kcanvas/RenderPath.cpp

    r16276 r16330  
    303303    bool isVisible = (style()->visibility() == VISIBLE);
    304304    if (isVisible || !hitRules.requireVisible) {
    305         bool hasFill = (style()->svgStyle()->fillPaint() && style()->svgStyle()->fillPaint()->paintType() != SVG_PAINTTYPE_NONE);
    306         bool hasStroke = (style()->svgStyle()->strokePaint() && style()->svgStyle()->strokePaint()->paintType() != SVG_PAINTTYPE_NONE);
     305        bool hasFill = (style()->svgStyle()->fillPaint() && style()->svgStyle()->fillPaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE);
     306        bool hasStroke = (style()->svgStyle()->strokePaint() && style()->svgStyle()->strokePaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE);
    307307        FloatPoint hitPoint(_x,_y);
    308308        if ((hitRules.canHitStroke && (hasStroke || !hitRules.requireStroke) && strokeContains(hitPoint, hitRules.requireStroke))
  • trunk/WebCore/ksvg2/bindings/js/JSSVGNumber.cpp

    r14646 r16330  
    5454}
    5555
    56 JSValue* getJSSVGNumber(ExecState* exec, float v)
     56JSValue* getJSSVGNumber(ExecState* exec, double v)
    5757{
    5858    return new JSSVGNumber(exec, v);
  • trunk/WebCore/ksvg2/bindings/js/JSSVGNumber.h

    r14646 r16330  
    3333class JSSVGNumber : public KJS::DOMObject {
    3434public:
    35     JSSVGNumber(KJS::ExecState*, float v) : m_value(v) { }
     35    JSSVGNumber(KJS::ExecState*, double v) : m_value(v) { }
    3636    ~JSSVGNumber();
    3737   
     
    4343    static const KJS::ClassInfo info;
    4444private:
    45     float m_value;
     45    double m_value;
    4646};
    4747
    48 KJS::JSValue* getJSSVGNumber(KJS::ExecState*, float);
     48KJS::JSValue* getJSSVGNumber(KJS::ExecState*, double);
    4949
    5050}
  • trunk/WebCore/ksvg2/css/SVGCSSParser.cpp

    r16272 r16330  
    215215        {
    216216            if (id == CSS_VAL_NONE)
    217                 parsedValue = new SVGPaint(SVG_PAINTTYPE_NONE);
     217                parsedValue = new SVGPaint(SVGPaint::SVG_PAINTTYPE_NONE);
    218218            else if (id == SVGCSS_VAL_CURRENTCOLOR)
    219                 parsedValue = new SVGPaint(SVG_PAINTTYPE_CURRENTCOLOR);
     219                parsedValue = new SVGPaint(SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR);
    220220            else if (value->unit == CSSPrimitiveValue::CSS_URI)
    221                 parsedValue = new SVGPaint(SVG_PAINTTYPE_URI, domString(value->string).impl());
     221                parsedValue = new SVGPaint(SVGPaint::SVG_PAINTTYPE_URI, domString(value->string).impl());
    222222            else
    223223                parsedValue = parseSVGPaint();
     
    355355       value->fValue >= 0. && value->fValue < 1000000.) {
    356356        String str = String::sprintf("%06d", (int)(value->fValue+.5));
    357         return new SVGPaint(SVG_PAINTTYPE_RGBCOLOR, 0, str.impl());
     357        return new SVGPaint(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, String(), str);
    358358    } else if (value->unit == CSSPrimitiveValue::CSS_RGBCOLOR) {
    359359        String str = "#" + domString(value->string);
    360         return new SVGPaint(SVG_PAINTTYPE_RGBCOLOR, 0, str.impl());
     360        return new SVGPaint(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, String(), str);
    361361    } else if (value->unit == CSSPrimitiveValue::CSS_IDENT ||
    362362           (!strict && value->unit == CSSPrimitiveValue::CSS_DIMENSION))
    363         return new SVGPaint(SVG_PAINTTYPE_RGBCOLOR, 0, domString(value->string).impl());
     363        return new SVGPaint(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, String(), domString(value->string));
    364364    else if (value->unit == Value::Function && value->function->args != 0 &&
    365365            domString(value->function->name).lower() == "rgb(") {
     
    387387        b = max(0, min(255, b));
    388388       
    389         return new SVGPaint(SVG_PAINTTYPE_RGBCOLOR, 0, String::sprintf("rgb(%d, %d, %d)", r, g, b).impl());
     389        return new SVGPaint(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, String(), String::sprintf("rgb(%d, %d, %d)", r, g, b).impl());
    390390    }
    391391    else
  • trunk/WebCore/ksvg2/css/SVGRenderStyleDefs.cpp

    r15828 r16330  
    5959        return false;
    6060
    61     if(paint->paintType() == SVG_PAINTTYPE_URI)
     61    if(paint->paintType() == SVGPaint::SVG_PAINTTYPE_URI)
    6262        return paint->uri() == other.paint->uri();
    6363
    64     if(paint->paintType() == SVG_PAINTTYPE_RGBCOLOR)
     64    if(paint->paintType() == SVGPaint::SVG_PAINTTYPE_RGBCOLOR)
    6565        return paint->color() == other.paint->color();
    6666
  • trunk/WebCore/ksvg2/ksvg.h

    r16308 r16330  
    3737        SVG_MATRIX_NOT_INVERTABLE    = 3
    3838    };
    39    
    40     enum SVGUnitTypes {
    41         SVG_UNIT_TYPE_UNKNOWN               = 0,
    42         SVG_UNIT_TYPE_USERSPACEONUSE        = 1,
    43         SVG_UNIT_TYPE_OBJECTBOUNDINGBOX     = 2
    44     };
    45 
    46     enum SVGRenderingIntentType {
    47         RENDERING_INTENT_UNKNOWN                  = 0,
    48         RENDERING_INTENT_AUTO                     = 1,
    49         RENDERING_INTENT_PERCEPTUAL               = 2,
    50         RENDERING_INTENT_RELATIVE_COLORIMETRIC    = 3,
    51         RENDERING_INTENT_SATURATION               = 4,
    52         RENDERING_INTENT_ABSOLUTE_COLORIMETRIC    = 5
    53     };
    54    
    55     enum SVGTransformType {
    56         SVG_TRANSFORM_UNKNOWN           = 0,
    57         SVG_TRANSFORM_MATRIX            = 1,
    58         SVG_TRANSFORM_TRANSLATE         = 2,
    59         SVG_TRANSFORM_SCALE             = 3,
    60         SVG_TRANSFORM_ROTATE            = 4,
    61         SVG_TRANSFORM_SKEWX             = 5,
    62         SVG_TRANSFORM_SKEWY             = 6
    63     };
    64 
     39       
    6540    enum SVGCSSRuleType {
    6641        COLOR_PROFILE_RULE = 7
    67     };
    68 
    69     enum SVGLengthAdjustType {
    70         LENGTHADJUST_UNKNOWN            = 0,
    71         LENGTHADJUST_SPACING            = 1,
    72         LENGTHADJUST_SPACINGANDGLYPHS   = 2
    7342    };
    7443
     
    8554    };
    8655
    87     enum SVGPaintType {
    88         SVG_PAINTTYPE_UNKNOWN               = 0,
    89         SVG_PAINTTYPE_RGBCOLOR              = 1,
    90         SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR     = 2,
    91         SVG_PAINTTYPE_NONE                  = 101,
    92         SVG_PAINTTYPE_CURRENTCOLOR          = 102,
    93         SVG_PAINTTYPE_URI_NONE              = 103,
    94         SVG_PAINTTYPE_URI_CURRENTCOLOR      = 104,
    95         SVG_PAINTTYPE_URI_RGBCOLOR          = 105,
    96         SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
    97         SVG_PAINTTYPE_URI                   = 107
    98     };
    99 
    100     enum SVGMarkerUnitsType {
    101         SVG_MARKERUNITS_UNKNOWN           = 0,
    102         SVG_MARKERUNITS_USERSPACEONUSE    = 1,
    103         SVG_MARKERUNITS_STROKEWIDTH       = 2
    104     };
    105 
    106     enum SVGMarkerOrientType {
    107         SVG_MARKER_ORIENT_UNKNOWN    = 0,
    108         SVG_MARKER_ORIENT_AUTO       = 1,
    109         SVG_MARKER_ORIENT_ANGLE      = 2
    110     };
    111 
    112     enum SVGGradientType {
    113         SVG_SPREADMETHOD_UNKNOWN = 0,
    114         SVG_SPREADMETHOD_PAD     = 1,
    115         SVG_SPREADMETHOD_REFLECT = 2,
    116         SVG_SPREADMETHOD_REPEAT  = 3
    117     };
    118 
    119     enum SVGZoomAndPanType {
    120         SVG_ZOOMANDPAN_UNKNOWN = 0,
    121         SVG_ZOOMANDPAN_DISABLE = 1,
    122         SVG_ZOOMANDPAN_MAGNIFY = 2
    123     };
    124 
    125     enum SVGBlendModeType {
    126         SVG_FEBLEND_MODE_UNKNOWN  = 0,
    127         SVG_FEBLEND_MODE_NORMAL   = 1,
    128         SVG_FEBLEND_MODE_MULTIPLY = 2,
    129         SVG_FEBLEND_MODE_SCREEN   = 3,
    130         SVG_FEBLEND_MODE_DARKEN   = 4,
    131         SVG_FEBLEND_MODE_LIGHTEN  = 5
    132     };
    133 
    134     enum SVGColorMatrixType {
    135         SVG_FECOLORMATRIX_TYPE_UNKNOWN          = 0,
    136         SVG_FECOLORMATRIX_TYPE_MATRIX           = 1,
    137         SVG_FECOLORMATRIX_TYPE_SATURATE         = 2,
    138         SVG_FECOLORMATRIX_TYPE_HUEROTATE        = 3,
    139         SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4
    140     };
    141 
    142     enum SVGComponentTransferType {
    143         SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN  = 0,
    144         SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1,
    145         SVG_FECOMPONENTTRANSFER_TYPE_TABLE    = 2,
    146         SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3,
    147         SVG_FECOMPONENTTRANSFER_TYPE_LINEAR   = 4,
    148         SVG_FECOMPONENTTRANSFER_TYPE_GAMMA    = 5
    149     };
    150 
    151     enum SVGCompositeOperators {
    152         SVG_FECOMPOSITE_OPERATOR_UNKNOWN    = 0,
    153         SVG_FECOMPOSITE_OPERATOR_OVER       = 1,
    154         SVG_FECOMPOSITE_OPERATOR_IN         = 2,
    155         SVG_FECOMPOSITE_OPERATOR_OUT        = 3,
    156         SVG_FECOMPOSITE_OPERATOR_ATOP       = 4,
    157         SVG_FECOMPOSITE_OPERATOR_XOR        = 5,
    158         SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6
    159     };
    160 
    16156    enum SVGEdgeModes {
    16257        SVG_EDGEMODE_UNKNOWN   = 0,
     
    16459        SVG_EDGEMODE_WRAP      = 2,
    16560        SVG_EDGEMODE_NONE      = 3
    166     };
    167 
    168     enum SVGChannelSelectors {
    169         SVG_CHANNEL_UNKNOWN = 0,
    170         SVG_CHANNEL_R       = 1,
    171         SVG_CHANNEL_G       = 2,
    172         SVG_CHANNEL_B       = 3,
    173         SVG_CHANNEL_A       = 4
    17461    };
    17562
     
    18067    };
    18168
    182     enum SVGTurbulenceType {
    183         SVG_TURBULENCE_TYPE_UNKNOWN      = 0,
    184         SVG_TURBULENCE_TYPE_FRACTALNOISE = 1,
    185         SVG_TURBULENCE_TYPE_TURBULENCE   = 2
    186     };
    187 
    188     enum SVGStitchOptions {
    189         SVG_STITCHTYPE_UNKNOWN  = 0,
    190         SVG_STITCHTYPE_STITCH   = 1,
    191         SVG_STITCHTYPE_NOSTITCH = 2
    192     };
    193 
    19469} // namespace WebCore
    19570
  • trunk/WebCore/ksvg2/misc/KCanvasRenderingStyle.cpp

    r16054 r16330  
    5555{
    5656    SVGPaint *fill = style->svgStyle()->fillPaint();
    57     if (fill && fill->paintType() == SVG_PAINTTYPE_NONE)
     57    if (fill && fill->paintType() == SVGPaint::SVG_PAINTTYPE_NONE)
    5858        return false;
    5959    return true;
     
    7272        fillPaintServer = sharedSolidPaintServer();
    7373        static_cast<KRenderingPaintServerSolid *>(fillPaintServer)->setColor(Color::black);
    74     } else if (fill->paintType() == SVG_PAINTTYPE_URI) {
     74    } else if (fill->paintType() == SVGPaint::SVG_PAINTTYPE_URI) {
    7575        String id(fill->uri());
    7676        fillPaintServer = getPaintServerById(item->document(), AtomicString(id.substring(1)));
     
    8080        fillPaintServer = sharedSolidPaintServer();
    8181        KRenderingPaintServerSolid *fillPaintServerSolid = static_cast<KRenderingPaintServerSolid *>(fillPaintServer);
    82         if (fill->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
     82        if (fill->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR)
    8383            fillPaintServerSolid->setColor(style->color());
    8484        else
     
    9393{
    9494    SVGPaint *stroke = style->svgStyle()->strokePaint();
    95     if (!stroke || stroke->paintType() == SVG_PAINTTYPE_NONE)
     95    if (!stroke || stroke->paintType() == SVGPaint::SVG_PAINTTYPE_NONE)
    9696        return false;
    9797    return true;
     
    106106
    107107    KRenderingPaintServer *strokePaintServer;
    108     if (stroke && stroke->paintType() == SVG_PAINTTYPE_URI) {
     108    if (stroke && stroke->paintType() == SVGPaint::SVG_PAINTTYPE_URI) {
    109109        String id(stroke->uri());
    110110        strokePaintServer = getPaintServerById(item->document(), AtomicString(id.substring(1)));
     
    114114        strokePaintServer = sharedSolidPaintServer();
    115115        KRenderingPaintServerSolid *strokePaintServerSolid = static_cast<KRenderingPaintServerSolid *>(strokePaintServer);
    116         if (stroke->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
     116        if (stroke->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR)
    117117            strokePaintServerSolid->setColor(style->color());
    118118        else
  • trunk/WebCore/ksvg2/misc/KSVGTimeScheduler.cpp

    r16276 r16330  
    115115    typedef HashMap<SVGElement*, Vector<SVGAnimationElement*> > TargetAnimationMap;
    116116    TargetAnimationMap targetMap;
    117    
     117
     118    ExceptionCode ec = 0;
     119
    118120    SVGNotifySet::const_iterator end = m_notifySet.end();
    119121    for (SVGNotifySet::const_iterator it = m_notifySet.begin(); it != end; ++it) {
     
    125127            if (!animation->isFrozen())
    126128                continue;
    127             if (elapsed <= (animation->getStartTime() + animation->getSimpleDuration()))
     129            if (elapsed <= (animation->getStartTime() + animation->getSimpleDuration(ec)))
    128130                continue;
    129131        }
     
    152154            double end = animation->getEndTime();
    153155            double start = animation->getStartTime();
    154             double duration = animation->getSimpleDuration();
     156            double duration = animation->getSimpleDuration(ec);
    155157            double repetitions = animation->repeations();
    156158
  • trunk/WebCore/ksvg2/svg/SVGAnimateColorElement.cpp

    r16308 r16330  
    151151        if (m_currentItem != itemByPercentage) // Item changed...
    152152        {
     153            ExceptionCode ec = 0;
     154
    153155            // Extract current 'from' / 'to' values
    154             String value1 = String(m_values->getItem(itemByPercentage));
    155             String value2 = String(m_values->getItem(itemByPercentage + 1));
     156            String value1 = String(m_values->getItem(itemByPercentage, ec));
     157            String value2 = String(m_values->getItem(itemByPercentage + 1, ec));
    156158
    157159            // Calculate r/g/b shifting values...
  • trunk/WebCore/ksvg2/svg/SVGAnimateTransformElement.cpp

    r16244 r16330  
    4848    : SVGAnimationElement(tagName, doc)
    4949    , m_currentItem(-1)
    50     , m_type(SVG_TRANSFORM_UNKNOWN)
     50    , m_type(SVGTransform::SVG_TRANSFORM_UNKNOWN)
    5151    , m_rotateSpecialCase(false)
    5252    , m_toRotateSpecialCase(false)
     
    6464        const String& value = attr->value();
    6565        if (value == "translate")
    66             m_type = SVG_TRANSFORM_TRANSLATE;
     66            m_type = SVGTransform::SVG_TRANSFORM_TRANSLATE;
    6767        else if (value == "scale")
    68             m_type = SVG_TRANSFORM_SCALE;
     68            m_type = SVGTransform::SVG_TRANSFORM_SCALE;
    6969        else if (value == "rotate")
    70             m_type = SVG_TRANSFORM_ROTATE;
     70            m_type = SVGTransform::SVG_TRANSFORM_ROTATE;
    7171        else if (value == "skewX")
    72             m_type = SVG_TRANSFORM_SKEWX;
     72            m_type = SVGTransform::SVG_TRANSFORM_SKEWX;
    7373        else if (value == "skewY")
    74             m_type = SVG_TRANSFORM_SKEWY;
     74            m_type = SVGTransform::SVG_TRANSFORM_SKEWY;
    7575    } else
    7676        SVGAnimationElement::parseMappedAttribute(attr);
     
    8888            RefPtr<SVGTransformList> transformList = transform->transformBaseValue();
    8989            if (transformList) {
     90                ExceptionCode ec = 0;
    9091                for (unsigned long i = 0; i < transformList->numberOfItems(); i++) {
    91                     SVGTransform *value = transformList->getItem(i);
     92                    SVGTransform *value = transformList->getItem(i, ec);
    9293                    if (!value)
    9394                        continue;
     
    183184        if (m_currentItem != itemByPercentage) // Item changed...
    184185        {
     186            ExceptionCode ec = 0;
     187
    185188            // Extract current 'from' / 'to' values
    186             String value1 = String(m_values->getItem(itemByPercentage));
    187             String value2 = String(m_values->getItem(itemByPercentage + 1));
     189            String value1 = String(m_values->getItem(itemByPercentage, ec));
     190            String value2 = String(m_values->getItem(itemByPercentage + 1, ec));
    188191
    189192            // Calculate new from/to transform values...
     
    231234    switch(m_type)
    232235    {
    233         case SVG_TRANSFORM_TRANSLATE:
     236        case SVGTransform::SVG_TRANSFORM_TRANSLATE:
    234237        {
    235238            double dx = ((qToMatrix.dx() - qFromMatrix.dx()) * useTimePercentage) + qFromMatrix.dx();
     
    239242            break;
    240243        }
    241         case SVG_TRANSFORM_SCALE:
     244        case SVGTransform::SVG_TRANSFORM_SCALE:
    242245        {
    243246            double sx = ((qToMatrix.m11() - qFromMatrix.m11()) * useTimePercentage) + qFromMatrix.m11();
     
    247250            break;
    248251        }
    249         case SVG_TRANSFORM_ROTATE:
     252        case SVGTransform::SVG_TRANSFORM_ROTATE:
    250253        {
    251254            double toAngle, toCx, toCy, fromAngle, fromCx, fromCy;
     
    276279            break;
    277280        }
    278         case SVG_TRANSFORM_SKEWX:
     281        case SVGTransform::SVG_TRANSFORM_SKEWX:
    279282        {
    280283            double sx = (SVGAngle::todeg(atan(qToMatrix.m21()) - atan(qFromMatrix.m21())) *
     
    284287            break;
    285288        }
    286         case SVG_TRANSFORM_SKEWY:
     289        case SVGTransform::SVG_TRANSFORM_SKEWY:
    287290        {
    288291            double sy = (SVGAngle::todeg(atan(qToMatrix.m12()) - atan(qFromMatrix.m12())) *
     
    341344    switch(m_type)
    342345    {
    343         case SVG_TRANSFORM_TRANSLATE:
     346        case SVGTransform::SVG_TRANSFORM_TRANSLATE:
    344347        {
    345348            double tx = 0.0, ty = 0.0;
     
    353356            break;   
    354357        }
    355         case SVG_TRANSFORM_SCALE:
     358        case SVGTransform::SVG_TRANSFORM_SCALE:
    356359        {
    357360            double sx = 1.0, sy = 1.0;
     
    367370            break;
    368371        }
    369         case SVG_TRANSFORM_ROTATE:
     372        case SVGTransform::SVG_TRANSFORM_ROTATE:
    370373        {
    371374            double angle = 0, cx = 0, cy = 0;
     
    400403            break;   
    401404        }
    402         case SVG_TRANSFORM_SKEWX:
    403         case SVG_TRANSFORM_SKEWY:
     405        case SVGTransform::SVG_TRANSFORM_SKEWX:
     406        case SVGTransform::SVG_TRANSFORM_SKEWY:
    404407        {
    405408            double angle = parse.toDouble(); // TODO: probably needs it's own 'angle' parser
    406409           
    407             if (m_type == SVG_TRANSFORM_SKEWX)
     410            if (m_type == SVGTransform::SVG_TRANSFORM_SKEWX)
    408411                parsedTransform->setSkewX(angle);
    409412            else
  • trunk/WebCore/ksvg2/svg/SVGAnimateTransformElement.h

    r16308 r16330  
    2525#ifdef SVG_SUPPORT
    2626
    27 #include "ksvg.h"
     27#include "SVGTransform.h"
    2828#include "SVGAnimationElement.h"
    2929
    3030namespace WebCore {
    3131
    32     class SVGTransform;
    3332    class AffineTransform;
    3433
     
    5453    private:
    5554        int m_currentItem;
    56         SVGTransformType m_type;
     55        SVGTransform::SVGTransformType m_type;
    5756
    5857        RefPtr<SVGTransform> m_toTransform;
  • trunk/WebCore/ksvg2/svg/SVGAnimatedTemplate.h

    r16308 r16330  
    3131    class SVGAngle;
    3232    class SVGLength;
     33    class SVGLengthList;
     34    class SVGNumberList;
    3335    class SVGPreserveAspectRatio;
     36    class SVGTransformList;
    3437    class String;
    3538    class FloatRect;
     
    5457    typedef SVGAnimatedTemplate<long> SVGAnimatedInteger;
    5558    typedef SVGAnimatedTemplate<SVGLength*> SVGAnimatedLength;
     59    typedef SVGAnimatedTemplate<SVGLengthList*> SVGAnimatedLengthList;
    5660    typedef SVGAnimatedTemplate<double> SVGAnimatedNumber;
     61    typedef SVGAnimatedTemplate<SVGNumberList*> SVGAnimatedNumberList;
    5762    typedef SVGAnimatedTemplate<SVGPreserveAspectRatio*> SVGAnimatedPreserveAspectRatio;
    5863    typedef SVGAnimatedTemplate<FloatRect> SVGAnimatedRect;
    5964    typedef SVGAnimatedTemplate<String> SVGAnimatedString;
     65    typedef SVGAnimatedTemplate<SVGTransformList*> SVGAnimatedTransformList;
    6066}
    6167
  • trunk/WebCore/ksvg2/svg/SVGAnimationElement.cpp

    r16273 r16330  
    112112}
    113113
    114 double SVGAnimationElement::getSimpleDuration() const
     114double SVGAnimationElement::getSimpleDuration(ExceptionCode&) const
    115115{
    116116    return m_simpleDuration;
     
    141141        SVGHelper::ParseSeperatedList(temp.get(), value.deprecatedString(), ';');
    142142
     143        ExceptionCode ec = 0;
     144
    143145        // Parse data
    144146        for (unsigned int i = 0; i < temp->numberOfItems(); i++) {
    145             DeprecatedString current = String(temp->getItem(i)).deprecatedString();
     147            DeprecatedString current = String(temp->getItem(i, ec)).deprecatedString();
    146148
    147149            if (current.startsWith("accessKey")) {
     
    462464        }
    463465    }
    464     ExceptionCode ec;
     466    ExceptionCode ec = 0;
    465467    if (attributeType == ATTRIBUTETYPE_CSS && styled && styled->style())
    466468        styled->style()->setProperty(name, value, "", ec);
  • trunk/WebCore/ksvg2/svg/SVGAnimationElement.h

    r16308 r16330  
    9191        double getStartTime() const;
    9292        double getCurrentTime() const;
    93         double getSimpleDuration() const;
     93        double getSimpleDuration(ExceptionCode&) const;
    9494   
    9595        virtual void parseMappedAttribute(MappedAttribute *attr);
  • trunk/WebCore/ksvg2/svg/SVGClipPathElement.cpp

    r16273 r16330  
    3333#include "SVGRenderStyle.h"
    3434#include "cssstyleselector.h"
    35 #include "ksvg.h"
     35#include "SVGUnitTypes.h"
    3636#include <kcanvas/device/KRenderingDevice.h>
    3737
     
    4343    , SVGLangSpace()
    4444    , SVGExternalResourcesRequired()
    45     , m_clipPathUnits(SVG_UNIT_TYPE_USERSPACEONUSE)
     45    , m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
    4646{
    4747    m_clipper = 0;
     
    6060    if (attr->name() == SVGNames::clipPathUnitsAttr) {
    6161        if (value == "userSpaceOnUse")
    62             setClipPathUnitsBaseValue(SVG_UNIT_TYPE_USERSPACEONUSE);
     62            setClipPathUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
    6363        else if (value == "objectBoundingBox")
    64             setClipPathUnitsBaseValue(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     64            setClipPathUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    6565    } else {
    6666        if (SVGTests::parseMappedAttribute(attr))
     
    8383        m_clipper->resetClipData();
    8484
    85     bool bbox = clipPathUnits() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
     85    bool bbox = clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
    8686
    8787    RenderStyle *clipPathStyle = styleForRenderer(parent()->renderer()); // FIXME: Manual style resolution is a hack
  • trunk/WebCore/ksvg2/svg/SVGComponentTransferFunctionElement.cpp

    r16308 r16330  
    2727#include "Attr.h"
    2828
    29 #include "ksvg.h"
    3029#include "SVGNames.h"
    3130#include "SVGHelper.h"
    3231#include "SVGRenderStyle.h"
     32#include "SVGFEComponentTransferElement.h"
    3333#include "SVGComponentTransferFunctionElement.h"
    3434#include "SVGNumberList.h"
     
    102102    func.offset = offset();
    103103    SVGNumberList *numbers = tableValues();
     104
     105    ExceptionCode ec = 0;
    104106    unsigned int nr = numbers->numberOfItems();
    105107    for (unsigned int i = 0; i < nr; i++)
    106         func.tableValues.append(numbers->getItem(i));
     108        func.tableValues.append(numbers->getItem(i, ec));
    107109    return func;
    108110}
  • trunk/WebCore/ksvg2/svg/SVGComponentTransferFunctionElement.h

    r16308 r16330  
    3535    {
    3636    public:
     37        enum SVGComponentTransferType {
     38            SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN  = 0,
     39            SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1,
     40            SVG_FECOMPONENTTRANSFER_TYPE_TABLE    = 2,
     41            SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3,
     42            SVG_FECOMPONENTTRANSFER_TYPE_LINEAR   = 4,
     43            SVG_FECOMPONENTTRANSFER_TYPE_GAMMA    = 5
     44        };
     45
    3746        SVGComponentTransferFunctionElement(const QualifiedName&, Document*);
    3847        virtual ~SVGComponentTransferFunctionElement();
  • trunk/WebCore/ksvg2/svg/SVGDocument.cpp

    r15828 r16330  
    5353{
    5454    // dispatch zoom event
    55     ExceptionCode ec;
     55    ExceptionCode ec = 0;
    5656    RefPtr<SVGZoomEvent> event = static_pointer_cast<SVGZoomEvent>(createEvent("SVGZoomEvents", ec));
    5757    event->initEvent(EventNames::zoomEvent, true, false);
     
    6464{
    6565    // dispatch zoom event
    66     ExceptionCode ec;
     66    ExceptionCode ec = 0;
    6767    RefPtr<Event> event = createEvent("SVGEvents", ec);
    6868    event->initEvent(EventNames::scrollEvent, true, false);
  • trunk/WebCore/ksvg2/svg/SVGFEBlendElement.cpp

    r16276 r16330  
    4747}
    4848
    49 ANIMATED_PROPERTY_DEFINITIONS(SVGFEBlendElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     49ANIMATED_PROPERTY_DEFINITIONS(SVGFEBlendElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5050ANIMATED_PROPERTY_DEFINITIONS(SVGFEBlendElement, String, String, string, In2, in2, SVGNames::in2Attr.localName(), m_in2)
    5151ANIMATED_PROPERTY_DEFINITIONS(SVGFEBlendElement, int, Enumeration, enumeration, Mode, mode, SVGNames::modeAttr.localName(), m_mode)
     
    6868    }
    6969    else if (attr->name() == SVGNames::inAttr)
    70         setInBaseValue(value);
     70        setIn1BaseValue(value);
    7171    else if (attr->name() == SVGNames::in2Attr)
    7272        setIn2BaseValue(value);
     
    8282        return 0;
    8383    m_filterEffect->setBlendMode((KCBlendModeType)(mode()-1));
    84     m_filterEffect->setIn(in());
     84    m_filterEffect->setIn(in1());
    8585    m_filterEffect->setIn2(in2());
    8686    setStandardAttributes(m_filterEffect);
  • trunk/WebCore/ksvg2/svg/SVGFEBlendElement.h

    r16308 r16330  
    3434    {
    3535    public:
     36        enum SVGBlendModeType {
     37            SVG_FEBLEND_MODE_UNKNOWN  = 0,
     38            SVG_FEBLEND_MODE_NORMAL   = 1,
     39            SVG_FEBLEND_MODE_MULTIPLY = 2,
     40            SVG_FEBLEND_MODE_SCREEN   = 3,
     41            SVG_FEBLEND_MODE_DARKEN   = 4,
     42            SVG_FEBLEND_MODE_LIGHTEN  = 5
     43        };
     44
    3645        SVGFEBlendElement(const QualifiedName&, Document*);
    3746        virtual ~SVGFEBlendElement();
     
    4756
    4857    private:
    49         ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, String, String, In, in)
     58        ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, String, String, In1, in1)
    5059        ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, String, String, In2, in2)
    5160        ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, int, int, Mode, mode)
  • trunk/WebCore/ksvg2/svg/SVGFEColorMatrixElement.cpp

    r16308 r16330  
    5454}
    5555
    56 ANIMATED_PROPERTY_DEFINITIONS(SVGFEColorMatrixElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     56ANIMATED_PROPERTY_DEFINITIONS(SVGFEColorMatrixElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5757ANIMATED_PROPERTY_DEFINITIONS(SVGFEColorMatrixElement, int, Enumeration, enumeration, Type, type, SVGNames::typeAttr.localName(), m_type)
    5858ANIMATED_PROPERTY_DEFINITIONS(SVGFEColorMatrixElement, SVGNumberList*, NumberList, numberList, Values, values, SVGNames::valuesAttr.localName(), m_values.get())
     
    7272    }
    7373    else if (attr->name() == SVGNames::inAttr)
    74         setInBaseValue(value);
     74        setIn1BaseValue(value);
    7575    else if (attr->name() == SVGNames::valuesAttr)
    7676        valuesBaseValue()->parse(value.deprecatedString());
     
    8686        return 0;
    8787       
    88     m_filterEffect->setIn(in());
     88    m_filterEffect->setIn(in1());
    8989    setStandardAttributes(m_filterEffect);
    9090    DeprecatedValueList<float> _values;
    9191    SVGNumberList *numbers = values();
     92
     93    ExceptionCode ec = 0;
    9294    unsigned int nr = numbers->numberOfItems();
    9395    for(unsigned int i = 0;i < nr;i++)
    94         _values.append(numbers->getItem(i));
     96        _values.append(numbers->getItem(i, ec));
    9597    m_filterEffect->setValues(_values);
    9698    m_filterEffect->setType((KCColorMatrixType)(type() - 1));
  • trunk/WebCore/ksvg2/svg/SVGFEColorMatrixElement.h

    r16308 r16330  
    3535    {
    3636    public:
     37        enum SVGColorMatrixType {
     38            SVG_FECOLORMATRIX_TYPE_UNKNOWN          = 0,
     39            SVG_FECOLORMATRIX_TYPE_MATRIX           = 1,
     40            SVG_FECOLORMATRIX_TYPE_SATURATE         = 2,
     41            SVG_FECOLORMATRIX_TYPE_HUEROTATE        = 3,
     42            SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4
     43        };
     44
    3745        SVGFEColorMatrixElement(const QualifiedName&, Document*);
    3846        virtual ~SVGFEColorMatrixElement();
     
    4856
    4957    private:
    50         ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, String, String, In, in)
     58        ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, String, String, In1, in1)
    5159        ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, int, int, Type, type)
    5260        ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, SVGNumberList*, RefPtr<SVGNumberList>, Values, values)
  • trunk/WebCore/ksvg2/svg/SVGFEComponentTransferElement.cpp

    r16276 r16330  
    5151}
    5252
    53 ANIMATED_PROPERTY_DEFINITIONS(SVGFEComponentTransferElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     53ANIMATED_PROPERTY_DEFINITIONS(SVGFEComponentTransferElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5454
    5555void SVGFEComponentTransferElement::parseMappedAttribute(MappedAttribute *attr)
     
    5757    const String& value = attr->value();
    5858    if (attr->name() == SVGNames::inAttr)
    59         setInBaseValue(value);
     59        setIn1BaseValue(value);
    6060    else
    6161        SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
     
    6969        return 0;
    7070   
    71     m_filterEffect->setIn(in());
     71    m_filterEffect->setIn(in1());
    7272    setStandardAttributes(m_filterEffect);
    7373   
  • trunk/WebCore/ksvg2/svg/SVGFEComponentTransferElement.h

    r16308 r16330  
    4747
    4848    private:
    49         ANIMATED_PROPERTY_DECLARATIONS(SVGFEComponentTransferElement, String, String, In, in)
     49        ANIMATED_PROPERTY_DECLARATIONS(SVGFEComponentTransferElement, String, String, In1, in1)
    5050        mutable KCanvasFEComponentTransfer *m_filterEffect;
    5151    };
  • trunk/WebCore/ksvg2/svg/SVGFECompositeElement.cpp

    r16276 r16330  
    5454}
    5555
    56 ANIMATED_PROPERTY_DEFINITIONS(SVGFECompositeElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     56ANIMATED_PROPERTY_DEFINITIONS(SVGFECompositeElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5757ANIMATED_PROPERTY_DEFINITIONS(SVGFECompositeElement, String, String, string, In2, in2, SVGNames::in2Attr.localName(), m_in2)
    5858ANIMATED_PROPERTY_DEFINITIONS(SVGFECompositeElement, int, Enumeration, enumeration, _operator, _operator, SVGNames::operatorAttr.localName(), m__operator)
     
    8181    }
    8282    else if (attr->name() == SVGNames::inAttr)
    83         setInBaseValue(value);
     83        setIn1BaseValue(value);
    8484    else if (attr->name() == SVGNames::in2Attr)
    8585        setIn2BaseValue(value);
     
    103103        return 0;
    104104    m_filterEffect->setOperation((KCCompositeOperationType)(_operator() - 1));
    105     m_filterEffect->setIn(in());
     105    m_filterEffect->setIn(in1());
    106106    m_filterEffect->setIn2(in2());
    107107    setStandardAttributes(m_filterEffect);
  • trunk/WebCore/ksvg2/svg/SVGFECompositeElement.h

    r16308 r16330  
    3434    {
    3535    public:
     36        enum SVGCompositeOperators {
     37            SVG_FECOMPOSITE_OPERATOR_UNKNOWN    = 0,
     38            SVG_FECOMPOSITE_OPERATOR_OVER       = 1,
     39            SVG_FECOMPOSITE_OPERATOR_IN         = 2,
     40            SVG_FECOMPOSITE_OPERATOR_OUT        = 3,
     41            SVG_FECOMPOSITE_OPERATOR_ATOP       = 4,
     42            SVG_FECOMPOSITE_OPERATOR_XOR        = 5,
     43            SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6
     44        };
     45
    3646        SVGFECompositeElement(const QualifiedName&, Document*);
    3747        virtual ~SVGFECompositeElement();
     
    4757
    4858    private:
    49         ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, String, String, In, in)
     59        ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, String, String, In1, in1)
    5060        ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, String, String, In2, in2)
    5161        ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, int, int, _operator, _operator)
  • trunk/WebCore/ksvg2/svg/SVGFEDiffuseLightingElement.cpp

    r16276 r16330  
    5353}
    5454
    55 ANIMATED_PROPERTY_DEFINITIONS(SVGFEDiffuseLightingElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     55ANIMATED_PROPERTY_DEFINITIONS(SVGFEDiffuseLightingElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5656ANIMATED_PROPERTY_DEFINITIONS(SVGFEDiffuseLightingElement, double, Number, number, DiffuseConstant, diffuseConstant, SVGNames::diffuseConstantAttr.localName(), m_diffuseConstant)
    5757ANIMATED_PROPERTY_DEFINITIONS(SVGFEDiffuseLightingElement, double, Number, number, SurfaceScale, surfaceScale, SVGNames::surfaceScaleAttr.localName(), m_surfaceScale)
     
    6464    const String& value = attr->value();
    6565    if (attr->name() == SVGNames::inAttr)
    66         setInBaseValue(value);
     66        setIn1BaseValue(value);
    6767    else if (attr->name() == SVGNames::surfaceScaleAttr)
    6868        setSurfaceScaleBaseValue(value.deprecatedString().toDouble());
     
    8282}
    8383
    84 KCanvasFEDiffuseLighting *SVGFEDiffuseLightingElement::filterEffect() const
     84KCanvasFilterEffect *SVGFEDiffuseLightingElement::filterEffect() const
    8585{
    8686    if (!m_filterEffect)
    8787        m_filterEffect = static_cast<KCanvasFEDiffuseLighting *>(renderingDevice()->createFilterEffect(FE_DIFFUSE_LIGHTING));
    88     m_filterEffect->setIn(in());
     88    m_filterEffect->setIn(in1());
    8989    setStandardAttributes(m_filterEffect);
    9090    m_filterEffect->setDiffuseConstant((diffuseConstant()));
  • trunk/WebCore/ksvg2/svg/SVGFEDiffuseLightingElement.h

    r16308 r16330  
    4040        virtual void parseMappedAttribute(MappedAttribute *attr);
    4141
    42         virtual KCanvasFEDiffuseLighting *filterEffect() const;
     42        virtual KCanvasFilterEffect *filterEffect() const;
    4343
    4444    protected:
     
    4646
    4747    private:
    48         ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, String, String, In, in)
     48        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, String, String, In1, in1)
    4949        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, double, double, DiffuseConstant, diffuseConstant)
    5050        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, double, double, SurfaceScale, surfaceScale)
  • trunk/WebCore/ksvg2/svg/SVGFEDisplacementMapElement.cpp

    r16276 r16330  
    4949}
    5050
    51 ANIMATED_PROPERTY_DEFINITIONS(SVGFEDisplacementMapElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     51ANIMATED_PROPERTY_DEFINITIONS(SVGFEDisplacementMapElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5252ANIMATED_PROPERTY_DEFINITIONS(SVGFEDisplacementMapElement, String, String, string, In2, in2, SVGNames::in2Attr.localName(), m_in2)
    5353ANIMATED_PROPERTY_DEFINITIONS(SVGFEDisplacementMapElement, int, Enumeration, enumeration, XChannelSelector, xChannelSelector, SVGNames::xChannelSelectorAttr.localName(), m_xChannelSelector)
     
    7777        setYChannelSelectorBaseValue(stringToChannel(value));
    7878    else if (attr->name() == SVGNames::inAttr)
    79         setInBaseValue(value);
     79        setIn1BaseValue(value);
    8080    else if (attr->name() == SVGNames::in2Attr)
    8181        setIn2BaseValue(value);
     
    9494    m_filterEffect->setXChannelSelector((KCChannelSelectorType)(xChannelSelector()));
    9595    m_filterEffect->setYChannelSelector((KCChannelSelectorType)(yChannelSelector()));
    96     m_filterEffect->setIn(in());
     96    m_filterEffect->setIn(in1());
    9797    m_filterEffect->setIn2(in2());
    9898    m_filterEffect->setScale(scale());
  • trunk/WebCore/ksvg2/svg/SVGFEDisplacementMapElement.h

    r16308 r16330  
    2929    class SVGFEDisplacementMapElement : public SVGFilterPrimitiveStandardAttributes {
    3030    public:
     31        enum SVGChannelSelectors {
     32            SVG_CHANNEL_UNKNOWN = 0,
     33            SVG_CHANNEL_R       = 1,
     34            SVG_CHANNEL_G       = 2,
     35            SVG_CHANNEL_B       = 3,
     36            SVG_CHANNEL_A       = 4
     37        };
     38
    3139        SVGFEDisplacementMapElement(const QualifiedName& tagName, Document*);
    3240        virtual ~SVGFEDisplacementMapElement();
     
    4452
    4553    private:
    46         ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, String, String, In, in)
     54        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, String, String, In1, in1)
    4755        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, String, String, In2, in2)
    4856        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, int, int, XChannelSelector, xChannelSelector)
  • trunk/WebCore/ksvg2/svg/SVGFEFloodElement.cpp

    r16276 r16330  
    4646}
    4747
    48 ANIMATED_PROPERTY_DEFINITIONS(SVGFEFloodElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     48ANIMATED_PROPERTY_DEFINITIONS(SVGFEFloodElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    4949
    5050void SVGFEFloodElement::parseMappedAttribute(MappedAttribute *attr)
     
    5252    const String& value = attr->value();
    5353    if (attr->name() == SVGNames::inAttr)
    54         setInBaseValue(value);
     54        setIn1BaseValue(value);
    5555    else
    5656        SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
     
    6363    if (!m_filterEffect)
    6464        return 0;
    65     m_filterEffect->setIn(in());
     65    m_filterEffect->setIn(in1());
    6666    setStandardAttributes(m_filterEffect);
    6767    RenderStyle *filterStyle = const_cast<SVGFEFloodElement *>(this)->styleForRenderer(parentNode()->renderer());
  • trunk/WebCore/ksvg2/svg/SVGFEFloodElement.h

    r16308 r16330  
    4747
    4848    private:
    49         ANIMATED_PROPERTY_DECLARATIONS(SVGFEFloodElement, String, String, In, in)
     49        ANIMATED_PROPERTY_DECLARATIONS(SVGFEFloodElement, String, String, In1, in1)
    5050        mutable KCanvasFEFlood *m_filterEffect;
    5151    };
  • trunk/WebCore/ksvg2/svg/SVGFEGaussianBlurElement.cpp

    r16276 r16330  
    5252}
    5353
    54 ANIMATED_PROPERTY_DEFINITIONS(SVGFEGaussianBlurElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     54ANIMATED_PROPERTY_DEFINITIONS(SVGFEGaussianBlurElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5555ANIMATED_PROPERTY_DEFINITIONS(SVGFEGaussianBlurElement, double, Number, number, StdDeviationX, stdDeviationX, "stdDeviationX", m_stdDeviationX)
    5656ANIMATED_PROPERTY_DEFINITIONS(SVGFEGaussianBlurElement, double, Number, number, StdDeviationY, stdDeviationY, "stdDeviationY", m_stdDeviationY)
     
    7272    }
    7373    else if (attr->name() == SVGNames::inAttr)
    74         setInBaseValue(value);
     74        setIn1BaseValue(value);
    7575    else
    7676        SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
     
    8383    if (!m_filterEffect)
    8484        return 0;
    85     m_filterEffect->setIn(in());
     85    m_filterEffect->setIn(in1());
    8686    setStandardAttributes(m_filterEffect);
    8787    m_filterEffect->setStdDeviationX(stdDeviationX());
  • trunk/WebCore/ksvg2/svg/SVGFEGaussianBlurElement.h

    r16308 r16330  
    4949
    5050    private:
    51         ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, String, String, In, in)
     51        ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, String, String, In1, in1)
    5252        ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, double, double, StdDeviationX, stdDeviationX)
    5353        ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, double, double, StdDeviationY, stdDeviationY)
  • trunk/WebCore/ksvg2/svg/SVGFEMergeElement.cpp

    r16276 r16330  
    6060    for (Node* n = firstChild(); n != 0; n = n->nextSibling()) {
    6161        if (n->hasTagName(SVGNames::feMergeNodeTag))
    62             mergeInputs.append(static_cast<SVGFEMergeNodeElement *>(n)->in());
     62            mergeInputs.append(static_cast<SVGFEMergeNodeElement *>(n)->in1());
    6363    }
    6464
  • trunk/WebCore/ksvg2/svg/SVGFEMergeNodeElement.cpp

    r16273 r16330  
    3838}
    3939
    40 ANIMATED_PROPERTY_DEFINITIONS(SVGFEMergeNodeElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     40ANIMATED_PROPERTY_DEFINITIONS(SVGFEMergeNodeElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    4141
    4242void SVGFEMergeNodeElement::parseMappedAttribute(MappedAttribute *attr)
     
    4444    const String& value = attr->value();
    4545    if (attr->name() == SVGNames::inAttr)
    46         setInBaseValue(value);
     46        setIn1BaseValue(value);
    4747    else
    4848        SVGElement::parseMappedAttribute(attr);
  • trunk/WebCore/ksvg2/svg/SVGFEMergeNodeElement.h

    r16308 r16330  
    4444
    4545    private:
    46         ANIMATED_PROPERTY_DECLARATIONS(SVGFEMergeNodeElement, String, String, In, in)
     46        ANIMATED_PROPERTY_DECLARATIONS(SVGFEMergeNodeElement, String, String, In1, in1)
    4747    };
    4848
  • trunk/WebCore/ksvg2/svg/SVGFEOffsetElement.cpp

    r16276 r16330  
    5151}
    5252
    53 ANIMATED_PROPERTY_DEFINITIONS(SVGFEOffsetElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     53ANIMATED_PROPERTY_DEFINITIONS(SVGFEOffsetElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5454ANIMATED_PROPERTY_DEFINITIONS(SVGFEOffsetElement, double, Number, number, Dx, dx, SVGNames::dxAttr.localName(), m_dx)
    5555ANIMATED_PROPERTY_DEFINITIONS(SVGFEOffsetElement, double, Number, number, Dy, dy, SVGNames::dyAttr.localName(), m_dy)
     
    6363        setDyBaseValue(value.deprecatedString().toDouble());
    6464    else if (attr->name() == SVGNames::inAttr)
    65         setInBaseValue(value);
     65        setIn1BaseValue(value);
    6666    else
    6767        SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
     
    7474    if (!m_filterEffect)
    7575        return 0;
    76     m_filterEffect->setIn(in());
     76    m_filterEffect->setIn(in1());
    7777    setStandardAttributes(m_filterEffect);
    7878    m_filterEffect->setDx(dx());
  • trunk/WebCore/ksvg2/svg/SVGFEOffsetElement.h

    r16308 r16330  
    4747
    4848    private:
    49         ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, String, String, In, in)
     49        ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, String, String, In1, in1)
    5050        ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, double, double, Dx, dx)
    5151        ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, double, double, Dy, dy)
  • trunk/WebCore/ksvg2/svg/SVGFESpecularLightingElement.cpp

    r16276 r16330  
    5656}
    5757
    58 ANIMATED_PROPERTY_DEFINITIONS(SVGFESpecularLightingElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     58ANIMATED_PROPERTY_DEFINITIONS(SVGFESpecularLightingElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    5959ANIMATED_PROPERTY_DEFINITIONS(SVGFESpecularLightingElement, double, Number, number, SpecularConstant, specularConstant, SVGNames::specularConstantAttr.localName(), m_specularConstant)
    6060ANIMATED_PROPERTY_DEFINITIONS(SVGFESpecularLightingElement, double, Number, number, SpecularExponent, specularExponent, SVGNames::specularExponentAttr.localName(), m_specularExponent)
     
    6868    const String& value = attr->value();
    6969    if (attr->name() == SVGNames::inAttr)
    70         setInBaseValue(value);
     70        setIn1BaseValue(value);
    7171    else if (attr->name() == SVGNames::surfaceScaleAttr)
    7272        setSurfaceScaleBaseValue(value.deprecatedString().toDouble());
     
    9292    if (!m_filterEffect)
    9393        m_filterEffect = static_cast<KCanvasFESpecularLighting *>(renderingDevice()->createFilterEffect(FE_SPECULAR_LIGHTING));
    94     m_filterEffect->setIn(in());
     94    m_filterEffect->setIn(in1());
    9595    setStandardAttributes(m_filterEffect);
    9696    m_filterEffect->setSpecularConstant((specularConstant()));
  • trunk/WebCore/ksvg2/svg/SVGFESpecularLightingElement.h

    r16308 r16330  
    4747
    4848    private:
    49         ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, String, String, In, in)
     49        ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, String, String, In1, in1)
    5050        ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, double, double, SpecularConstant, specularConstant)
    5151        ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, double, double, SpecularExponent, specularExponent)
  • trunk/WebCore/ksvg2/svg/SVGFETileElement.cpp

    r16276 r16330  
    4545}
    4646
    47 ANIMATED_PROPERTY_DEFINITIONS(SVGFETileElement, String, String, string, In, in, SVGNames::inAttr.localName(), m_in)
     47ANIMATED_PROPERTY_DEFINITIONS(SVGFETileElement, String, String, string, In1, in1, SVGNames::inAttr.localName(), m_in1)
    4848
    4949void SVGFETileElement::parseMappedAttribute(MappedAttribute *attr)
     
    5151    const String& value = attr->value();
    5252    if (attr->name() == SVGNames::inAttr)
    53         setInBaseValue(value);
     53        setIn1BaseValue(value);
    5454    else
    5555        SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
     
    6262    if (!m_filterEffect)
    6363        return 0;
    64     m_filterEffect->setIn(in());
     64    m_filterEffect->setIn(in1());
    6565    setStandardAttributes(m_filterEffect);
    6666    return m_filterEffect;
  • trunk/WebCore/ksvg2/svg/SVGFETileElement.h

    r16308 r16330  
    4747
    4848    private:
    49         ANIMATED_PROPERTY_DECLARATIONS(SVGFETileElement, String, String, In, in)
     49        ANIMATED_PROPERTY_DECLARATIONS(SVGFETileElement, String, String, In1, in1)
    5050        mutable KCanvasFETile *m_filterEffect;
    5151    };
  • trunk/WebCore/ksvg2/svg/SVGFETurbulenceElement.h

    r16308 r16330  
    3434    {
    3535    public:
     36        enum SVGTurbulenceType {
     37            SVG_TURBULENCE_TYPE_UNKNOWN      = 0,
     38            SVG_TURBULENCE_TYPE_FRACTALNOISE = 1,
     39            SVG_TURBULENCE_TYPE_TURBULENCE   = 2
     40        };
     41
     42        enum SVGStitchOptions {
     43            SVG_STITCHTYPE_UNKNOWN  = 0,
     44            SVG_STITCHTYPE_STITCH   = 1,
     45            SVG_STITCHTYPE_NOSTITCH = 2
     46        };
     47
    3648        SVGFETurbulenceElement(const QualifiedName&, Document*);
    3749        virtual ~SVGFETurbulenceElement();
  • trunk/WebCore/ksvg2/svg/SVGFilterElement.cpp

    r16273 r16330  
    2828#include <kcanvas/device/KRenderingDevice.h>
    2929#include <kcanvas/KCanvasFilters.h>
    30 #include "ksvg.h"
     30#include "SVGUnitTypes.h"
    3131#include "SVGNames.h"
    3232#include "SVGHelper.h"
     
    4343    , SVGLangSpace()
    4444    , SVGExternalResourcesRequired()
    45     , m_filterUnits(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
    46     , m_primitiveUnits(SVG_UNIT_TYPE_USERSPACEONUSE)
     45    , m_filterUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     46    , m_primitiveUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
    4747    , m_x(new SVGLength(this, LM_WIDTH, viewportElement()))
    4848    , m_y(new SVGLength(this, LM_HEIGHT, viewportElement()))
     
    8888    {
    8989        if(value == "userSpaceOnUse")
    90             setFilterUnitsBaseValue(SVG_UNIT_TYPE_USERSPACEONUSE);
     90            setFilterUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
    9191        else if(value == "objectBoundingBox")
    92             setFilterUnitsBaseValue(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     92            setFilterUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    9393    }
    9494    else if (attr->name() == SVGNames::primitiveUnitsAttr)
    9595    {
    9696        if(value == "userSpaceOnUse")
    97             setPrimitiveUnitsBaseValue(SVG_UNIT_TYPE_USERSPACEONUSE);
     97            setPrimitiveUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
    9898        else if(value == "objectBoundingBox")
    99             setPrimitiveUnitsBaseValue(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     99            setPrimitiveUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    100100    }
    101101    else if (attr->name() == SVGNames::xAttr)
     
    125125        m_filter = static_cast<KCanvasFilter *>(renderingDevice()->createResource(RS_FILTER));
    126126
    127     bool filterBBoxMode = filterUnits() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
     127    bool filterBBoxMode = filterUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
    128128    m_filter->setFilterBoundingBoxMode(filterBBoxMode);
    129129   
     
    134134    m_filter->setFilterRect(FloatRect(x()->value(), y()->value(), width()->value(), height()->value()));
    135135   
    136     bool primitiveBBoxMode = primitiveUnits() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
     136    bool primitiveBBoxMode = primitiveUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
    137137    m_filter->setEffectBoundingBoxMode(primitiveBBoxMode);
    138138    // FIXME: When does this info get passed to the filters elements?
  • trunk/WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp

    r16276 r16330  
    2626#include <wtf/Assertions.h>
    2727
    28 #include "ksvg.h"
     28#include "SVGUnitTypes.h"
    2929#include "SVGNames.h"
    3030#include "SVGFilterPrimitiveStandardAttributes.h"
     
    8383    bool bbox = false;
    8484    if (parentNode() && parentNode()->hasTagName(SVGNames::filterTag))
    85         bbox = static_cast<SVGFilterElement *>(parentNode())->primitiveUnits() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
     85        bbox = static_cast<SVGFilterElement *>(parentNode())->primitiveUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
    8686
    8787    x()->setBboxRelative(bbox);
  • trunk/WebCore/ksvg2/svg/SVGGradientElement.cpp

    r16308 r16330  
    3636#include "SVGTransformable.h"
    3737#include "cssstyleselector.h"
    38 #include "ksvg.h"
     38#include "SVGUnitTypes.h"
    3939#include <kcanvas/device/KRenderingDevice.h>
    4040#include <kcanvas/device/KRenderingPaintServerGradient.h>
     
    4747    , SVGExternalResourcesRequired()
    4848    , m_spreadMethod(0)
    49     , m_gradientUnits(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     49    , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
    5050    , m_gradientTransform(new SVGTransformList)
    5151{
     
    6767    if (attr->name() == SVGNames::gradientUnitsAttr) {
    6868        if(value == "userSpaceOnUse")
    69             setGradientUnitsBaseValue(SVG_UNIT_TYPE_USERSPACEONUSE);
     69            setGradientUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
    7070        else if(value == "objectBoundingBox")
    71             setGradientUnitsBaseValue(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     71            setGradientUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    7272    } else if (attr->name() == SVGNames::gradientTransformAttr) {
    7373        SVGTransformList *gradientTransforms = gradientTransformBaseValue();
  • trunk/WebCore/ksvg2/svg/SVGGradientElement.h

    r16308 r16330  
    4040    {
    4141    public:
     42        enum SVGGradientType {
     43            SVG_SPREADMETHOD_UNKNOWN = 0,
     44            SVG_SPREADMETHOD_PAD     = 1,
     45            SVG_SPREADMETHOD_REFLECT = 2,
     46            SVG_SPREADMETHOD_REPEAT  = 3
     47        };
     48
    4249        SVGGradientElement(const QualifiedName&, Document*);
    4350        virtual ~SVGGradientElement();
  • trunk/WebCore/ksvg2/svg/SVGHelper.cpp

    r16308 r16330  
    8181{
    8282    // TODO : more error checking/reporting
    83     list->clear();
     83    ExceptionCode ec = 0;
     84    list->clear(ec);
    8485
    8586    DeprecatedStringList substrings = DeprecatedStringList::split(delimiter, data);
     
    8788    DeprecatedStringList::ConstIterator it = substrings.begin();
    8889    DeprecatedStringList::ConstIterator end = substrings.end();
    89     for (; it != end; ++it) {
    90         StringImpl* string = new StringImpl(*it);
    91         string->ref();
    92 
    93         list->appendItem(string);
    94     }
     90    for (; it != end; ++it)
     91        list->appendItem(String(*it), ec);
    9592}
    9693
  • trunk/WebCore/ksvg2/svg/SVGLengthList.cpp

    r16308 r16330  
    4444void SVGLengthList::parse(const DeprecatedString& value, const SVGStyledElement* context, LengthMode mode)
    4545{
     46    ExceptionCode ec = 0;
     47
    4648    DeprecatedStringList lengths = DeprecatedStringList::split(' ', value);
    4749    for (unsigned int i = 0; i < lengths.count(); i++) {
     
    4951        String str(lengths[i]);
    5052        length->setValueAsString(str);
    51         appendItem(length);
     53        appendItem(length, ec);
    5254    }
    5355}
  • trunk/WebCore/ksvg2/svg/SVGLinearGradientElement.cpp

    r16276 r16330  
    2525#include "Attr.h"
    2626
    27 #include "ksvg.h"
     27#include "SVGUnitTypes.h"
    2828#include "SVGNames.h"
    2929#include "SVGHelper.h"
     
    8080    rebuildStops(); // rebuild stops before possibly importing them from any referenced gradient.
    8181
    82     bool bbox = (gradientUnits() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     82    bool bbox = (gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    8383   
    8484    x1()->setBboxRelative(bbox);
  • trunk/WebCore/ksvg2/svg/SVGList.h

    r16308 r16330  
    3030#include "Shared.h"
    3131#include "FloatPoint.h"
     32#include "ExceptionCode.h"
    3233#include "PlatformString.h"
    3334
    3435namespace WebCore {
    35 
    36     // TODO: We will probably need to pass ExceptionCodes around here...
    3736
    3837    template<class Item>
     
    4645
    4746        unsigned int numberOfItems() const { return m_vector.size(); }
    48         void clear() { m_vector.clear(); }
     47        void clear(ExceptionCode &) { m_vector.clear(); }
    4948
    50         Item initialize(Item newItem)
     49        Item initialize(Item newItem, ExceptionCode& ec)
    5150        {
    52             clear();
    53             return appendItem(newItem);
     51            clear(ec);
     52            return appendItem(newItem, ec);
    5453        }
    5554
     
    7069        }
    7170
    72         Item getItem(unsigned int index)
     71        Item getItem(unsigned int index, ExceptionCode& ec)
    7372        {
    74             if (m_vector.size() < index)
     73            if (m_vector.size() < index) {
     74                ec = INDEX_SIZE_ERR;
    7575                return nullItem();
     76            }
    7677
    7778            return m_vector.at(index);
    7879        }
    7980
    80         const Item getItem(unsigned int index) const
     81        const Item getItem(unsigned int index, ExceptionCode& ec) const
    8182        {
    82             if (m_vector.size() < index)
     83            if (m_vector.size() < index) {
     84                ec = INDEX_SIZE_ERR;
    8385                return nullItem();
     86            }
    8487
    8588            return m_vector.at(index);
    8689        }
    8790
    88         Item insertItemBefore(Item newItem, unsigned int index)
     91        Item insertItemBefore(Item newItem, unsigned int index, ExceptionCode&)
    8992        {
    9093            m_vector.insert(index, newItem);
     
    9295        }
    9396
    94         Item replaceItem(Item newItem, unsigned int index)
     97        Item replaceItem(Item newItem, unsigned int index, ExceptionCode& ec)
    9598        {
    96             if (m_vector.size() < index)
     99            if (m_vector.size() < index) {
     100                ec = INDEX_SIZE_ERR;
    97101                return nullItem();
     102            }
    98103
    99104            m_vector.at(index) = newItem;
     
    101106        }
    102107
    103         Item removeItem(unsigned int index)
     108        Item removeItem(unsigned int index, ExceptionCode& ec)
    104109        {
    105             if (m_vector.size() < index)
     110            if (m_vector.size() < index) {
     111                ec = INDEX_SIZE_ERR;
    106112                return nullItem();
     113            }
    107114
    108115            Item item = m_vector.at(index);
    109             remove(index);
     116            removeItem(index, ec);
    110117            return item;
    111118        }
     
    116123        }
    117124
    118         Item appendItem(Item newItem)
     125        Item appendItem(Item newItem, ExceptionCode&)
    119126        {
    120127            m_vector.append(newItem);
  • trunk/WebCore/ksvg2/svg/SVGLocatable.cpp

    r16308 r16330  
    127127    return ctm;
    128128}
    129 /*
    130 SVGMatrix *SVGLocatable::getTransformToElement(SVGElement *) const
    131 {
    132     // TODO!
    133     return 0;
    134 }
    135 */
    136 // vim:ts=4:noet
     129
    137130#endif // SVG_SUPPORT
    138131
     132// vim:ts=4:noet
  • trunk/WebCore/ksvg2/svg/SVGLocatable.h

    r15828 r16330  
    2323#ifndef SVGLocatable_H
    2424#define SVGLocatable_H
     25
    2526#ifdef SVG_SUPPORT
     27
     28#include "ExceptionCode.h"
    2629
    2730namespace WebCore {
     
    4447        virtual SVGMatrix* getCTM() const = 0;
    4548        virtual SVGMatrix* getScreenCTM() const = 0;
    46         virtual SVGMatrix* getTransformToElement(SVGElement*) const = 0;
     49        virtual SVGMatrix* getTransformToElement(SVGElement*, ExceptionCode&) const = 0;
    4750
    4851    protected:
  • trunk/WebCore/ksvg2/svg/SVGMarkerElement.h

    r16308 r16330  
    4343    {
    4444    public:
     45        enum SVGMarkerUnitsType {
     46            SVG_MARKERUNITS_UNKNOWN           = 0,
     47            SVG_MARKERUNITS_USERSPACEONUSE    = 1,
     48            SVG_MARKERUNITS_STROKEWIDTH       = 2
     49        };
     50
     51        enum SVGMarkerOrientType {
     52            SVG_MARKER_ORIENT_UNKNOWN    = 0,
     53            SVG_MARKER_ORIENT_AUTO       = 1,
     54            SVG_MARKER_ORIENT_ANGLE      = 2
     55        };
     56
    4557        SVGMarkerElement(const QualifiedName&, Document*);
    4658        virtual ~SVGMarkerElement();
  • trunk/WebCore/ksvg2/svg/SVGNumberList.cpp

    r16308 r16330  
    4343void SVGNumberList::parse(const DeprecatedString& value)
    4444{
     45    ExceptionCode ec = 0;
     46
    4547    DeprecatedStringList numbers = DeprecatedStringList::split(' ', value);
    4648    for (unsigned int i = 0; i < numbers.count(); i++)
    47         appendItem(numbers[i].toDouble());
     49        appendItem(numbers[i].toDouble(), ec);
    4850}
    4951
  • trunk/WebCore/ksvg2/svg/SVGPaint.cpp

    r16243 r16330  
    3434}
    3535
    36 SVGPaint::SVGPaint(StringImpl* uri)
     36SVGPaint::SVGPaint(const String& uri)
    3737    : SVGColor()
    3838    , m_paintType(SVG_PAINTTYPE_URI)
     
    4747}
    4848
    49 SVGPaint::SVGPaint(SVGPaintType paintType, StringImpl* uri, StringImpl* rgbPaint, StringImpl*)
     49SVGPaint::SVGPaint(SVGPaintType paintType, const String& uri, const String& rgbPaint, const String&)
    5050    : SVGColor(rgbPaint)
    5151    , m_paintType(paintType)
     
    5858}
    5959
    60 StringImpl* SVGPaint::uri() const
     60String SVGPaint::uri() const
    6161{
    62     return m_uri.impl();
     62    return m_uri;
    6363}
    6464
    65 void SVGPaint::setUri(StringImpl* uri)
     65void SVGPaint::setUri(const String& uri)
    6666{
    6767    m_uri = uri;
    6868}
    6969
    70 void SVGPaint::setPaint(SVGPaintType paintType, StringImpl* uri, StringImpl* rgbPaint, StringImpl*)
     70void SVGPaint::setPaint(SVGPaintType paintType, const String& uri, const String& rgbPaint, const String&, ExceptionCode&)
    7171{
    7272    m_paintType = paintType;
  • trunk/WebCore/ksvg2/svg/SVGPaint.h

    r16243 r16330  
    3232    class SVGPaint : public SVGColor {
    3333    public:
     34        enum SVGPaintType {
     35            SVG_PAINTTYPE_UNKNOWN               = 0,
     36            SVG_PAINTTYPE_RGBCOLOR              = 1,
     37            SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR     = 2,
     38            SVG_PAINTTYPE_NONE                  = 101,
     39            SVG_PAINTTYPE_CURRENTCOLOR          = 102,
     40            SVG_PAINTTYPE_URI_NONE              = 103,
     41            SVG_PAINTTYPE_URI_CURRENTCOLOR      = 104,
     42            SVG_PAINTTYPE_URI_RGBCOLOR          = 105,
     43            SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
     44            SVG_PAINTTYPE_URI                   = 107
     45        };
     46
    3447        SVGPaint();
    35         SVGPaint(StringImpl* uri);
     48        SVGPaint(const String& uri);
    3649        SVGPaint(SVGPaintType);
    37         SVGPaint(SVGPaintType, StringImpl* uri, StringImpl* rgbPaint = 0, StringImpl* iccPaint = 0);
     50        SVGPaint(SVGPaintType, const String& uri, const String& rgbPaint = String(), const String& iccPaint = String());
    3851        virtual ~SVGPaint();
    3952
    4053        // 'SVGPaint' functions
    4154        SVGPaintType paintType() const { return m_paintType; }
    42         StringImpl* uri() const;
     55        String uri() const;
    4356
    44         void setUri(StringImpl*);
    45         void setPaint(SVGPaintType, StringImpl* uri, StringImpl* rgbPaint, StringImpl* iccPaint);
     57        void setUri(const String&);
     58        void setPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint, ExceptionCode&);
    4659
    4760        virtual String cssText() const;
  • trunk/WebCore/ksvg2/svg/SVGPathElement.cpp

    r16308 r16330  
    261261void SVGPathElement::svgMoveTo(double x1, double y1, bool, bool abs)
    262262{
    263     if(abs)
    264         pathSegList()->appendItem(createSVGPathSegMovetoAbs(x1, y1, this));
    265     else
    266         pathSegList()->appendItem(createSVGPathSegMovetoRel(x1, y1, this));
     263    ExceptionCode ec = 0;
     264
     265    if(abs)
     266        pathSegList()->appendItem(createSVGPathSegMovetoAbs(x1, y1, this), ec);
     267    else
     268        pathSegList()->appendItem(createSVGPathSegMovetoRel(x1, y1, this), ec);
    267269}
    268270
    269271void SVGPathElement::svgLineTo(double x1, double y1, bool abs)
    270272{
    271     if(abs)
    272         pathSegList()->appendItem(createSVGPathSegLinetoAbs(x1, y1, this));
    273     else
    274         pathSegList()->appendItem(createSVGPathSegLinetoRel(x1, y1, this));
     273    ExceptionCode ec = 0;
     274
     275    if(abs)
     276        pathSegList()->appendItem(createSVGPathSegLinetoAbs(x1, y1, this), ec);
     277    else
     278        pathSegList()->appendItem(createSVGPathSegLinetoRel(x1, y1, this), ec);
    275279}
    276280
    277281void SVGPathElement::svgLineToHorizontal(double x, bool abs)
    278282{
    279     if(abs)
    280         pathSegList()->appendItem(createSVGPathSegLinetoHorizontalAbs(x, this));
    281     else
    282         pathSegList()->appendItem(createSVGPathSegLinetoHorizontalRel(x, this));
     283    ExceptionCode ec = 0;
     284
     285    if(abs)
     286        pathSegList()->appendItem(createSVGPathSegLinetoHorizontalAbs(x, this), ec);
     287    else
     288        pathSegList()->appendItem(createSVGPathSegLinetoHorizontalRel(x, this), ec);
    283289}
    284290
    285291void SVGPathElement::svgLineToVertical(double y, bool abs)
    286292{
    287     if(abs)
    288         pathSegList()->appendItem(createSVGPathSegLinetoVerticalAbs(y, this));
    289     else
    290         pathSegList()->appendItem(createSVGPathSegLinetoVerticalRel(y, this));
     293    ExceptionCode ec = 0;
     294
     295    if(abs)
     296        pathSegList()->appendItem(createSVGPathSegLinetoVerticalAbs(y, this), ec);
     297    else
     298        pathSegList()->appendItem(createSVGPathSegLinetoVerticalRel(y, this), ec);
    291299}
    292300
    293301void SVGPathElement::svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs)
    294302{
    295     if(abs)
    296         pathSegList()->appendItem(createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2, this));
    297     else
    298         pathSegList()->appendItem(createSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2, this));
     303    ExceptionCode ec = 0;
     304
     305    if(abs)
     306        pathSegList()->appendItem(createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2, this), ec);
     307    else
     308        pathSegList()->appendItem(createSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2, this), ec);
    299309}
    300310
    301311void SVGPathElement::svgCurveToCubicSmooth(double x, double y, double x2, double y2, bool abs)
    302312{
    303     if(abs)
    304         pathSegList()->appendItem(createSVGPathSegCurvetoCubicSmoothAbs(x2, y2, x, y, this));
    305     else
    306         pathSegList()->appendItem(createSVGPathSegCurvetoCubicSmoothRel(x2, y2, x, y, this));
     313    ExceptionCode ec = 0;
     314
     315    if(abs)
     316        pathSegList()->appendItem(createSVGPathSegCurvetoCubicSmoothAbs(x2, y2, x, y, this), ec);
     317    else
     318        pathSegList()->appendItem(createSVGPathSegCurvetoCubicSmoothRel(x2, y2, x, y, this), ec);
    307319}
    308320
    309321void SVGPathElement::svgCurveToQuadratic(double x, double y, double x1, double y1, bool abs)
    310322{
    311     if(abs)
    312         pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticAbs(x1, y1, x, y, this));
    313     else
    314         pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticRel(x1, y1, x, y, this));
     323    ExceptionCode ec = 0;
     324
     325    if(abs)
     326        pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticAbs(x1, y1, x, y, this), ec);
     327    else
     328        pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticRel(x1, y1, x, y, this), ec);
    315329}
    316330
    317331void SVGPathElement::svgCurveToQuadraticSmooth(double x, double y, bool abs)
    318332{
    319     if(abs)
    320         pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticSmoothAbs(x, y, this));
    321     else
    322         pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticSmoothRel(x, y, this));
     333    ExceptionCode ec = 0;
     334
     335    if(abs)
     336        pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticSmoothAbs(x, y, this), ec);
     337    else
     338        pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticSmoothRel(x, y, this), ec);
    323339}
    324340
    325341void SVGPathElement::svgArcTo(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, bool abs)
    326342{
    327     if(abs)
    328         pathSegList()->appendItem(createSVGPathSegArcAbs(x, y, r1, r2, angle, largeArcFlag, sweepFlag, this));
    329     else
    330         pathSegList()->appendItem(createSVGPathSegArcRel(x, y, r1, r2, angle, largeArcFlag, sweepFlag, this));
     343    ExceptionCode ec = 0;
     344
     345    if(abs)
     346        pathSegList()->appendItem(createSVGPathSegArcAbs(x, y, r1, r2, angle, largeArcFlag, sweepFlag, this), ec);
     347    else
     348        pathSegList()->appendItem(createSVGPathSegArcRel(x, y, r1, r2, angle, largeArcFlag, sweepFlag, this), ec);
    331349}
    332350
    333351void SVGPathElement::svgClosePath()
    334352{
    335     pathSegList()->appendItem(createSVGPathSegClosePath());
     353    ExceptionCode ec = 0;
     354    pathSegList()->appendItem(createSVGPathSegClosePath(), ec);
    336355}
    337356
     
    339358{
    340359    if (attr->name() == SVGNames::dAttr) {
    341         pathSegList()->clear();
     360        ExceptionCode ec;
     361        pathSegList()->clear(ec);
    342362        parseSVG(attr->value().deprecatedString(), true);
    343363    } else {
     
    381401        return pathData;
    382402
     403    ExceptionCode ec = 0;
    383404    for(int i = 0; i < len; ++i)
    384405    {
    385         SVGPathSeg *p = pathSegList()->getItem(i);
     406        SVGPathSeg *p = pathSegList()->getItem(i, ec);
    386407        switch(p->pathSegType())
    387408        {
  • trunk/WebCore/ksvg2/svg/SVGPatternElement.cpp

    r16308 r16330  
    4141#include "SVGTransformList.h"
    4242#include "SVGTransformable.h"
    43 #include "ksvg.h"
     43#include "SVGUnitTypes.h"
    4444#include <wtf/OwnPtr.h>
    4545#include <math.h>
     
    5959    , m_width(new SVGLength(this, LM_WIDTH, viewportElement()))
    6060    , m_height(new SVGLength(this, LM_HEIGHT, viewportElement()))
    61     , m_patternUnits(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
    62     , m_patternContentUnits(SVG_UNIT_TYPE_USERSPACEONUSE)
     61    , m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     62    , m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
    6363    , m_patternTransform(new SVGTransformList)
    6464{
     
    8686    if (attr->name() == SVGNames::patternUnitsAttr) {
    8787        if (value == "userSpaceOnUse")
    88             setPatternUnitsBaseValue(SVG_UNIT_TYPE_USERSPACEONUSE);
     88            setPatternUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
    8989        else if (value == "objectBoundingBox")
    90             setPatternUnitsBaseValue(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     90            setPatternUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    9191    } else if (attr->name() == SVGNames::patternContentUnitsAttr) {
    9292        if (value == "userSpaceOnUse")
    93             setPatternContentUnitsBaseValue(SVG_UNIT_TYPE_USERSPACEONUSE);
     93            setPatternContentUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
    9494        else if (value == "objectBoundingBox")
    95             setPatternContentUnitsBaseValue(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     95            setPatternContentUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    9696    } else if (attr->name() == SVGNames::patternTransformAttr) {
    9797        SVGTransformList *patternTransforms = patternTransformBaseValue();
     
    153153        const AtomicString& value = target->getAttribute(SVGNames::patternUnitsAttr);
    154154        if (value == "userSpaceOnUse")
    155             setPatternUnitsBaseValue(SVG_UNIT_TYPE_USERSPACEONUSE);
     155            setPatternUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
    156156        else if (value == "objectBoundingBox")
    157             setPatternUnitsBaseValue(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     157            setPatternUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    158158    }
    159159   
     
    161161        const AtomicString& value = target->getAttribute(SVGNames::patternContentUnitsAttr);
    162162        if (value == "userSpaceOnUse")
    163             setPatternContentUnitsBaseValue(SVG_UNIT_TYPE_USERSPACEONUSE);
     163            setPatternContentUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
    164164        else if (value == "objectBoundingBox")
    165             setPatternContentUnitsBaseValue(SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     165            setPatternContentUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    166166    }
    167167
     
    176176    SVGStyledElement* activeElement = static_cast<SVGStyledElement*>(m_paintServer->activeClient()->element());
    177177
    178     bool bbox = (patternUnits() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     178    bool bbox = (patternUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    179179
    180180    const SVGStyledElement* savedContext = 0;
     
    220220
    221221        const SVGStyledElement* savedContext = 0;
    222         if (patternContentUnits() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     222        if (patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
    223223        {
    224224            if (activeElement)
  • trunk/WebCore/ksvg2/svg/SVGPolyElement.cpp

    r16308 r16330  
    5555{
    5656    if (attr->name() == SVGNames::pointsAttr) {
    57         points()->clear();
     57        ExceptionCode ec = 0;
     58        points()->clear(ec);
    5859        parsePoints(attr->value().deprecatedString());
    5960    } else {
     
    6768void SVGPolyElement::svgPolyTo(double x1, double y1, int) const
    6869{
    69     points()->appendItem(FloatPoint(x1, y1));
     70    ExceptionCode ec = 0;
     71    points()->appendItem(FloatPoint(x1, y1), ec);
    7072}
    7173
     
    7880    SVGStyledElement::notifyAttributeChange();
    7981
     82    ExceptionCode ec = 0;
     83
    8084    // Spec: Additionally, the 'points' attribute on the original element
    8185    // accessed via the XML DOM (e.g., using the getAttribute() method call)
     
    8488    int len = points()->numberOfItems();
    8589    for (int i = 0; i < len; ++i) {
    86         FloatPoint p = points()->getItem(i);
     90        FloatPoint p = points()->getItem(i, ec);
    8791        _points += String::sprintf("%.6lg %.6lg ", p.x(), p.y());
    8892    }
     
    9195    RefPtr<Attr> attr = const_cast<SVGPolyElement *>(this)->getAttributeNode(p.impl());
    9296    if (attr) {
    93         ExceptionCode ec;
     97        ExceptionCode ec = 0;
    9498        ignoreNotifications = true; // prevent recursion.
    9599        attr->setValue(_points, ec);
  • trunk/WebCore/ksvg2/svg/SVGPolygonElement.cpp

    r16308 r16330  
    4646        return polyData;
    4747   
    48     polyData.moveTo(points()->getItem(0));
     48    ExceptionCode ec = 0;
     49    polyData.moveTo(points()->getItem(0, ec));
    4950    for (int i = 1; i < len; ++i)
    50         polyData.addLineTo(points()->getItem(i));
     51        polyData.addLineTo(points()->getItem(i, ec));
    5152
    5253    polyData.closeSubpath();
  • trunk/WebCore/ksvg2/svg/SVGPolylineElement.cpp

    r16308 r16330  
    4646        return polyData;
    4747
    48     polyData.moveTo(points()->getItem(0));
     48    ExceptionCode ec = 0;
     49    polyData.moveTo(points()->getItem(0, ec));
    4950    for (int i = 1; i < len; ++i)
    50         polyData.addLineTo(points()->getItem(i));
     51        polyData.addLineTo(points()->getItem(i, ec));
    5152   
    5253    return polyData;
  • trunk/WebCore/ksvg2/svg/SVGRadialGradientElement.cpp

    r16276 r16330  
    2525#include "Attr.h"
    2626
    27 #include "ksvg.h"
     27#include "SVGUnitTypes.h"
    2828#include "SVGNames.h"
    2929#include "SVGHelper.h"
     
    8686    rebuildStops(); // rebuild stops before possibly importing them from any referenced gradient.
    8787
    88     bool bbox = (gradientUnits() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     88    bool bbox = (gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    8989    bool fxSet = hasAttribute(SVGNames::fxAttr);
    9090    bool fySet = hasAttribute(SVGNames::fyAttr);
  • trunk/WebCore/ksvg2/svg/SVGSVGElement.h

    r16308 r16330  
    4949    {
    5050    public:
     51        enum SVGZoomAndPanType {
     52            SVG_ZOOMANDPAN_UNKNOWN = 0,
     53            SVG_ZOOMANDPAN_DISABLE = 1,
     54            SVG_ZOOMANDPAN_MAGNIFY = 2
     55        };
     56
    5157        SVGSVGElement(const QualifiedName&, Document*);
    5258        virtual ~SVGSVGElement();
  • trunk/WebCore/ksvg2/svg/SVGScriptElement.cpp

    r15870 r16330  
    4444}
    4545
    46 StringImpl *SVGScriptElement::type() const
     46String SVGScriptElement::type() const
    4747{
    48     return m_type.impl();
     48    return m_type;
    4949}
    5050
    51 void SVGScriptElement::setType(StringImpl *type)
     51void SVGScriptElement::setType(const String& type)
    5252{
    5353    m_type = type;
     
    5757{
    5858    if (attr->name() == SVGNames::typeAttr)
    59             setType(attr->value().impl());
     59            setType(attr->value());
    6060    else {
    6161        if(SVGURIReference::parseMappedAttribute(attr))
  • trunk/WebCore/ksvg2/svg/SVGScriptElement.h

    r16308 r16330  
    4040
    4141        // 'SVGScriptElement' functions
    42         StringImpl *type() const;
    43         void setType(StringImpl *type);
     42        String type() const;
     43        void setType(const String&);
    4444
    4545        // Internal
  • trunk/WebCore/ksvg2/svg/SVGStringList.cpp

    r16308 r16330  
    4141void SVGStringList::reset(const DeprecatedString& str)
    4242{
     43    ExceptionCode ec = 0;
     44
    4345    DeprecatedStringList list = DeprecatedStringList::split(' ', str);
    4446    if (list.count() == 0) {
    45         appendItem(String("")); // Create empty string...
     47        appendItem(String(""), ec); // Create empty string...
    4648    } else {
    4749        for(DeprecatedStringList::Iterator it = list.begin(); it != list.end(); ++it)
    48             appendItem(String(*it));
     50            appendItem(String(*it), ec);
    4951    }
    5052}
  • trunk/WebCore/ksvg2/svg/SVGStyledLocatableElement.cpp

    r16308 r16330  
    6666}
    6767
    68 SVGMatrix *SVGStyledLocatableElement::getTransformToElement(SVGElement *) const
     68SVGMatrix *SVGStyledLocatableElement::getTransformToElement(SVGElement *, ExceptionCode&) const
    6969{
    7070    // TODO!
  • trunk/WebCore/ksvg2/svg/SVGStyledLocatableElement.h

    r15828 r16330  
    4747        virtual SVGMatrix* getCTM() const;
    4848        virtual SVGMatrix* getScreenCTM() const;
    49         virtual SVGMatrix* getTransformToElement(SVGElement*) const;
     49        virtual SVGMatrix* getTransformToElement(SVGElement*, ExceptionCode&) const;
    5050    };
    5151
  • trunk/WebCore/ksvg2/svg/SVGStyledTransformableElement.cpp

    r16308 r16330  
    9292    if (attr->name() == SVGNames::transformAttr) {
    9393        SVGTransformList *localTransforms = transformBaseValue();
    94         localTransforms->clear();
     94
     95        ExceptionCode ec = 0;
     96        localTransforms->clear(ec);
    9597       
    9698        SVGTransformable::parseTransformAttribute(localTransforms, attr->value());
     
    115117}
    116118
    117 SVGMatrix *SVGStyledTransformableElement::getTransformToElement(SVGElement *) const
     119SVGMatrix *SVGStyledTransformableElement::getTransformToElement(SVGElement*, ExceptionCode&) const
    118120{
    119121    return 0;
  • trunk/WebCore/ksvg2/svg/SVGStyledTransformableElement.h

    r16308 r16330  
    5555
    5656        virtual FloatRect getBBox() const;
    57         virtual SVGMatrix *getTransformToElement(SVGElement *element) const;
     57        virtual SVGMatrix *getTransformToElement(SVGElement*, ExceptionCode&) const;
    5858
    5959        virtual void parseMappedAttribute(MappedAttribute *attr);
  • trunk/WebCore/ksvg2/svg/SVGTests.cpp

    r16308 r16330  
    5858}
    5959
    60 bool SVGTests::hasExtension(StringImpl *) const
     60bool SVGTests::hasExtension(const String&) const
    6161{
    6262    return false;
     
    6565bool SVGTests::isValid() const
    6666{
     67    ExceptionCode ec = 0;
     68
    6769    SVGStringList *list = requiredFeatures();
    6870    for (unsigned long i = 0;i < list->numberOfItems();i++) {
    69         String value = String(list->getItem(i));
     71        String value = String(list->getItem(i, ec));
    7072        if(value.isEmpty() || !DOMImplementation::instance()->hasFeature(value, String()))
    7173            return false;
     
    7476    list = systemLanguage();
    7577    for (unsigned long i = 0; i < list->numberOfItems(); i++)
    76         if (list->getItem(i) != defaultLanguage().substring(0, 2))
     78        if (list->getItem(i, ec) != defaultLanguage().substring(0, 2))
    7779            return false;
    7880
  • trunk/WebCore/ksvg2/svg/SVGTests.h

    r15828 r16330  
    3030
    3131    class MappedAttribute;
    32     class StringImpl;
     32    class String;
    3333    class SVGStringList;
    3434
     
    4343        SVGStringList *systemLanguage() const;
    4444
    45         bool hasExtension(StringImpl *extension) const;
     45        bool hasExtension(const String&) const;
    4646
    4747        bool isValid() const;
  • trunk/WebCore/ksvg2/svg/SVGTextContentElement.cpp

    r16273 r16330  
    6161}
    6262
    63 float SVGTextContentElement::getSubStringLength(unsigned long charnum, unsigned long nchars) const
     63float SVGTextContentElement::getSubStringLength(unsigned long charnum, unsigned long nchars, ExceptionCode&) const
    6464{
    6565    return 0.;
    6666}
    6767
    68 FloatPoint SVGTextContentElement::getStartPositionOfChar(unsigned long charnum) const
     68FloatPoint SVGTextContentElement::getStartPositionOfChar(unsigned long charnum, ExceptionCode&) const
    6969{
    7070    return FloatPoint();
    7171}
    7272
    73 FloatPoint SVGTextContentElement::getEndPositionOfChar(unsigned long charnum) const
     73FloatPoint SVGTextContentElement::getEndPositionOfChar(unsigned long charnum, ExceptionCode&) const
    7474{
    7575    return FloatPoint();
    7676}
    7777
    78 FloatRect SVGTextContentElement::getExtentOfChar(unsigned long charnum) const
     78FloatRect SVGTextContentElement::getExtentOfChar(unsigned long charnum, ExceptionCode&) const
    7979{
    8080    return FloatRect();
    8181}
    8282
    83 float SVGTextContentElement::getRotationOfChar(unsigned long charnum) const
     83float SVGTextContentElement::getRotationOfChar(unsigned long charnum, ExceptionCode&) const
    8484{
    8585    return 0.;
     
    9191}
    9292
    93 void SVGTextContentElement::selectSubString(unsigned long charnum, unsigned long nchars) const
     93void SVGTextContentElement::selectSubString(unsigned long charnum, unsigned long nchars, ExceptionCode&) const
    9494{
    9595}
  • trunk/WebCore/ksvg2/svg/SVGTextContentElement.h

    r16308 r16330  
    3939    {
    4040    public:
     41        enum SVGLengthAdjustType {
     42            LENGTHADJUST_UNKNOWN            = 0,
     43            LENGTHADJUST_SPACING            = 1,
     44            LENGTHADJUST_SPACINGANDGLYPHS   = 2
     45        };
     46
    4147        SVGTextContentElement(const QualifiedName&, Document*);
    4248        virtual ~SVGTextContentElement();
     
    4753        long getNumberOfChars() const;
    4854        float getComputedTextLength() const;
    49         float getSubStringLength(unsigned long charnum, unsigned long nchars) const;
    50         FloatPoint getStartPositionOfChar(unsigned long charnum) const;
    51         FloatPoint getEndPositionOfChar(unsigned long charnum) const;
    52         FloatRect getExtentOfChar(unsigned long charnum) const;
    53         float getRotationOfChar(unsigned long charnum) const;
     55        float getSubStringLength(unsigned long charnum, unsigned long nchars, ExceptionCode&) const;
     56        FloatPoint getStartPositionOfChar(unsigned long charnum, ExceptionCode&) const;
     57        FloatPoint getEndPositionOfChar(unsigned long charnum, ExceptionCode&) const;
     58        FloatRect getExtentOfChar(unsigned long charnum, ExceptionCode&) const;
     59        float getRotationOfChar(unsigned long charnum, ExceptionCode&) const;
    5460        long getCharNumAtPosition(const FloatPoint&) const;
    55         void selectSubString(unsigned long charnum, unsigned long nchars) const;
     61        void selectSubString(unsigned long charnum, unsigned long nchars, ExceptionCode&) const;
    5662
    5763        virtual void parseMappedAttribute(MappedAttribute*);
  • trunk/WebCore/ksvg2/svg/SVGTextElement.cpp

    r16308 r16330  
    5959    if (attr->name() == SVGNames::transformAttr) {
    6060        SVGTransformList *localTransforms = transformBaseValue();
    61         localTransforms->clear();
     61
     62        ExceptionCode ec = 0;
     63        localTransforms->clear(ec);
    6264       
    6365        SVGTransformable::parseTransformAttribute(localTransforms, attr->value());
  • trunk/WebCore/ksvg2/svg/SVGTextElement.h

    r16308 r16330  
    4646        virtual SVGMatrix *getCTM() const;
    4747        virtual SVGMatrix *getScreenCTM() const;
    48         virtual SVGMatrix *getTransformToElement(SVGElement *element) const { return 0; }
     48        virtual SVGMatrix *getTransformToElement(SVGElement*, ExceptionCode&) const { return 0; }
    4949
    5050        virtual bool rendererIsNeeded(RenderStyle *style) { return StyledElement::rendererIsNeeded(style); }
  • trunk/WebCore/ksvg2/svg/SVGTransform.h

    r15828 r16330  
    3333    class SVGTransform : public Shared<SVGTransform> {
    3434    public:
    35         SVGTransform();
    36         virtual ~SVGTransform();
    37        
    3835        enum SVGTransformType {
    3936            SVG_TRANSFORM_UNKNOWN           = 0,
     
    4542            SVG_TRANSFORM_SKEWY             = 6
    4643        };
    47        
     44 
     45        SVGTransform();
     46        virtual ~SVGTransform();
     47               
    4848        unsigned short type() const;
    4949
  • trunk/WebCore/ksvg2/svg/SVGTransformList.cpp

    r16308 r16330  
    5252        return 0;
    5353
    54     return initialize(obj);
     54    ExceptionCode ec = 0;
     55    return initialize(obj, ec);
    5556}
    5657
     
    6465    SVGMatrix* matrix = SVGSVGElement::createSVGMatrix();
    6566
     67    ExceptionCode ec = 0;
    6668    for(unsigned int i = 0; i < length; i++)
    67         matrix->multiply(getItem(i)->matrix());
     69        matrix->multiply(getItem(i, ec)->matrix());
    6870
    6971    obj->setMatrix(matrix);
  • trunk/WebCore/ksvg2/svg/SVGTransformable.cpp

    r16244 r16330  
    115115        }
    116116       
    117         if (t->type() == SVG_TRANSFORM_UNKNOWN)
     117        if (t->type() == SVGTransform::SVG_TRANSFORM_UNKNOWN)
    118118            break; // failed to parse a valid transform, abort.
    119119       
    120         list->appendItem(t.release().release());
     120        ExceptionCode ec = 0;
     121        list->appendItem(t.release().release(), ec);
    121122    }
    122123}
  • trunk/WebCore/ksvg2/svg/SVGUseElement.cpp

    r16273 r16330  
    105105    String hString = String::number(_h);
    106106   
    107     ExceptionCode ec;
     107    ExceptionCode ec = 0;
    108108    String trans = String::sprintf("translate(%f, %f)", _x, _y);
    109109    if (target->hasTagName(SVGNames::symbolTag)) {
  • trunk/WebCore/ksvg2/svg/SVGViewElement.h

    r16308 r16330  
    3939    {
    4040    public:
     41        enum SVGZoomAndPanType {
     42            SVG_ZOOMANDPAN_UNKNOWN = 0,
     43            SVG_ZOOMANDPAN_DISABLE = 1,
     44            SVG_ZOOMANDPAN_MAGNIFY = 2
     45        };
     46
    4147        SVGViewElement(const QualifiedName&, Document*);
    4248        virtual ~SVGViewElement();
  • trunk/WebCore/ksvg2/svg/SVGZoomAndPan.cpp

    r16276 r16330  
    2929#include "SVGNames.h"
    3030#include "SVGHelper.h"
     31#include "SVGSVGElement.h"
    3132#include "SVGZoomAndPan.h"
    3233
     
    3435
    3536SVGZoomAndPan::SVGZoomAndPan()
    36     : m_zoomAndPan(SVG_ZOOMANDPAN_MAGNIFY)
     37    : m_zoomAndPan(SVGSVGElement::SVG_ZOOMANDPAN_MAGNIFY)
    3738{
    3839}
     
    5758    if (attr->name() == SVGNames::zoomAndPanAttr) {
    5859        if(value == "disable")
    59             setZoomAndPan(SVG_ZOOMANDPAN_DISABLE);
     60            setZoomAndPan(SVGSVGElement::SVG_ZOOMANDPAN_DISABLE);
    6061        else if(value == "magnify")
    61             setZoomAndPan(SVG_ZOOMANDPAN_MAGNIFY);
     62            setZoomAndPan(SVGSVGElement::SVG_ZOOMANDPAN_MAGNIFY);
    6263        return true;
    6364    }
Note: See TracChangeset for help on using the changeset viewer.