Reviewed by Tim H.
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2006 13:44:54 +0000 (13:44 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2006 13:44:54 +0000 (13:44 +0000)
        Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=11038
        Auto-generate DOMSVGElement for the Objective-C bindings

        - Auto-generates DOMSVGElement.

        - Make SVGExceptions work like all the other ExceptionCode
          extensions (Range, XPath, etc.) by adding SVGExceptionOffset
          and SVGExceptionMax.

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_binding.cpp:
        (KJS::):
        (KJS::setDOMException):
        * bindings/objc/DOMInternal.h:
        * bindings/objc/DOMInternal.mm:
        (raiseDOMException):
        * bindings/objc/DOMSVG.h:
        * bindings/objc/DOMSVGExecption.h: Added.
        * ksvg2/ksvg.h:
        * ksvg2/svg/SVGElement.cpp:
        (WebCore::SVGElement::setId):
        (WebCore::SVGElement::setXmlbase):
        * ksvg2/svg/SVGElement.h:
        * ksvg2/svg/SVGElement.idl:
        * ksvg2/svg/SVGException.h: Added.
        (WebCore::):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_binding.cpp
WebCore/bindings/objc/DOMInternal.h
WebCore/bindings/objc/DOMInternal.mm
WebCore/bindings/objc/DOMSVG.h
WebCore/bindings/objc/DOMSVGExecption.h [new file with mode: 0644]
WebCore/ksvg2/ksvg.h
WebCore/ksvg2/svg/SVGElement.cpp
WebCore/ksvg2/svg/SVGElement.h
WebCore/ksvg2/svg/SVGElement.idl
WebCore/ksvg2/svg/SVGException.h [new file with mode: 0644]

index 9bac03f73d6b9bf83685e2e3d60df9908f5a2a5d..29a7b96d40166701560faa0ea5d3c13f047524a0 100644 (file)
@@ -1,3 +1,35 @@
+2006-09-26  Sam Weinig  <sam.weinig@gmail.com>
+
+        Reviewed by Tim H.
+
+        Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=11038
+        Auto-generate DOMSVGElement for the Objective-C bindings
+
+        - Auto-generates DOMSVGElement.
+
+        - Make SVGExceptions work like all the other ExceptionCode
+          extensions (Range, XPath, etc.) by adding SVGExceptionOffset
+          and SVGExceptionMax.
+
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/kjs_binding.cpp:
+        (KJS::):
+        (KJS::setDOMException):
+        * bindings/objc/DOMInternal.h:
+        * bindings/objc/DOMInternal.mm:
+        (raiseDOMException):
+        * bindings/objc/DOMSVG.h:
+        * bindings/objc/DOMSVGExecption.h: Added.
+        * ksvg2/ksvg.h:
+        * ksvg2/svg/SVGElement.cpp:
+        (WebCore::SVGElement::setId):
+        (WebCore::SVGElement::setXmlbase):
+        * ksvg2/svg/SVGElement.h:
+        * ksvg2/svg/SVGElement.idl:
+        * ksvg2/svg/SVGException.h: Added.
+        (WebCore::):
+
 2006-09-26  Eric Seidel  <eric@eseidel.com>
 
         Reviewed by Tim H.
index abe818c7c7e93df847f2cb24af2c51f25db2f277..ded538c83519d208a96020ea7251ddab37f86fb2 100644 (file)
@@ -139,6 +139,7 @@ all : \
     DOMStyleSheet.h \
     DOMStyleSheetList.h \
     DOMSVGAngle.h \
+    DOMSVGElement.h \
     DOMSVGLength.h \
     DOMSVGLengthList.h \
     DOMSVGMatrix.h \
index 3d05a65fd7aae8e92c34adfcf4a7ed59879300aa..f6f4e6b30ea8e539a32919bd5ccd1926546825a9 100644 (file)
                8541639C0AC718680001E01B /* DOMSVGLengthListInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 854163940AC718680001E01B /* DOMSVGLengthListInternal.h */; };
                8541639D0AC718680001E01B /* DOMSVGLengthInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 854163950AC718680001E01B /* DOMSVGLengthInternal.h */; };
                8541639E0AC718680001E01B /* DOMSVGAngleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 854163960AC718680001E01B /* DOMSVGAngleInternal.h */; };
+               854949120AC858D8008AB035 /* DOMSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 854949100AC858D8008AB035 /* DOMSVGElement.h */; };
+               854949130AC858D8008AB035 /* DOMSVGElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 854949110AC858D8008AB035 /* DOMSVGElement.mm */; };
+               854949170AC85950008AB035 /* DOMSVGElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 854949160AC85950008AB035 /* DOMSVGElementInternal.h */; };
+               8549492F0AC85A32008AB035 /* DOMSVGExecption.h in Headers */ = {isa = PBXBuildFile; fileRef = 8549492E0AC85A32008AB035 /* DOMSVGExecption.h */; };
+               854949690AC87613008AB035 /* SVGException.h in Headers */ = {isa = PBXBuildFile; fileRef = 854949680AC87613008AB035 /* SVGException.h */; };
                854FE7300A2297BE0058D7AD /* NodeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 854FE7260A2297BE0058D7AD /* NodeFilter.cpp */; };
                854FE7310A2297BE0058D7AD /* NodeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 854FE7270A2297BE0058D7AD /* NodeFilter.h */; };
                854FE7320A2297BE0058D7AD /* NodeFilterCondition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 854FE7280A2297BE0058D7AD /* NodeFilterCondition.cpp */; };
                854163940AC718680001E01B /* DOMSVGLengthListInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGLengthListInternal.h; sourceTree = "<group>"; };
                854163950AC718680001E01B /* DOMSVGLengthInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGLengthInternal.h; sourceTree = "<group>"; };
                854163960AC718680001E01B /* DOMSVGAngleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGAngleInternal.h; sourceTree = "<group>"; };
+               854949100AC858D8008AB035 /* DOMSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGElement.h; sourceTree = "<group>"; };
+               854949110AC858D8008AB035 /* DOMSVGElement.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGElement.mm; sourceTree = "<group>"; };
+               854949160AC85950008AB035 /* DOMSVGElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGElementInternal.h; sourceTree = "<group>"; };
+               8549492E0AC85A32008AB035 /* DOMSVGExecption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGExecption.h; sourceTree = "<group>"; };
+               854949680AC87613008AB035 /* SVGException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGException.h; sourceTree = "<group>"; };
                854FE7260A2297BE0058D7AD /* NodeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeFilter.cpp; sourceTree = "<group>"; };
                854FE7270A2297BE0058D7AD /* NodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NodeFilter.h; sourceTree = "<group>"; };
                854FE7280A2297BE0058D7AD /* NodeFilterCondition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeFilterCondition.cpp; sourceTree = "<group>"; };
                        name = Range;
                        sourceTree = "<group>";
                };
+               8549492D0AC85A0A008AB035 /* SVG */ = {
+                       isa = PBXGroup;
+                       children = (
+                               8549492E0AC85A32008AB035 /* DOMSVGExecption.h */,
+                       );
+                       name = SVG;
+                       sourceTree = "<group>";
+               };
                854F12AC0A8EBC18000940B5 /* Core */ = {
                        isa = PBXGroup;
                        children = (
                        children = (
                                854163690AC7180B0001E01B /* DOMSVGAngle.h */,
                                854163680AC7180B0001E01B /* DOMSVGAngle.mm */,
+                               854949100AC858D8008AB035 /* DOMSVGElement.h */,
+                               854949110AC858D8008AB035 /* DOMSVGElement.mm */,
                                854163670AC7180B0001E01B /* DOMSVGLength.h */,
                                854163660AC7180B0001E01B /* DOMSVGLength.mm */,
                                854163650AC7180B0001E01B /* DOMSVGLengthList.h */,
                                85E711870AC5D5350053270F /* DOMRectInternal.h */,
                                85E711880AC5D5350053270F /* DOMStyleSheetListInternal.h */,
                                854163960AC718680001E01B /* DOMSVGAngleInternal.h */,
+                               854949160AC85950008AB035 /* DOMSVGElementInternal.h */,
                                854163950AC718680001E01B /* DOMSVGLengthInternal.h */,
                                854163940AC718680001E01B /* DOMSVGLengthListInternal.h */,
                                854163930AC718680001E01B /* DOMSVGMatrixInternal.h */,
                                A8C0F8EA089701F400BA5114 /* SVGViewElement.h */,
                                A8C0F8EB089701F400BA5114 /* SVGZoomAndPan.cpp */,
                                A8C0F8EC089701F400BA5114 /* SVGZoomAndPan.h */,
+                               854949680AC87613008AB035 /* SVGException.h */,
                        );
                        path = svg;
                        sourceTree = "<group>";
                                85C7F4430AAF7686004014DD /* Events */,
                                85992FC20AA5DD4600AC0785 /* HTML */,
                                851EE8230ABCA58A00A6AA33 /* Range */,
+                               8549492D0AC85A0A008AB035 /* SVG */,
                                859FA5F20AB0BEE2004FAEE9 /* Traversal */,
                                851EE8060ABCA25200A6AA33 /* Views */,
                                858015CC0ABCA7410080588D /* XPath */,
                                8541639C0AC718680001E01B /* DOMSVGLengthListInternal.h in Headers */,
                                8541639D0AC718680001E01B /* DOMSVGLengthInternal.h in Headers */,
                                8541639E0AC718680001E01B /* DOMSVGAngleInternal.h in Headers */,
+                               854949120AC858D8008AB035 /* DOMSVGElement.h in Headers */,
+                               854949170AC85950008AB035 /* DOMSVGElementInternal.h in Headers */,
+                               8549492F0AC85A32008AB035 /* DOMSVGExecption.h in Headers */,
+                               854949690AC87613008AB035 /* SVGException.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                854163740AC7180B0001E01B /* DOMSVGLengthList.mm in Sources */,
                                854163760AC7180B0001E01B /* DOMSVGLength.mm in Sources */,
                                854163780AC7180B0001E01B /* DOMSVGAngle.mm in Sources */,
+                               854949130AC858D8008AB035 /* DOMSVGElement.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 525f97c4560bdc5b158eb2d3bac47cd270d333ed..bf207cfb54a3da8a0cefd4b9fa3ab0f19f878c2c 100644 (file)
 #include "Range.h"
 #include "RangeException.h"
 #include "xmlhttprequest.h"
-#include "XPathEvaluator.h"
 #include "kjs_dom.h"
 #include "kjs_window.h"
 #include <kjs/collector.h>
 #include <wtf/HashMap.h>
 
+#ifdef SVG_SUPPORT
+#include "SVGException.h"
+#endif
+
+#ifdef XPATH_SUPPORT
+#include "XPathEvaluator.h"
+#endif
+
 using namespace WebCore;
 using namespace EventNames;
 
@@ -324,6 +331,14 @@ static const char * const xpathExceptionNames[] = {
 };
 #endif
 
+#ifdef SVG_SUPPORT
+static const char * const svgExceptionNames[] = {
+    "SVG_WRONG_TYPE_ERR",
+    "SVG_INVALID_VALUE_ERR",
+    "SVG_MATRIX_NOT_INVERTABLE"
+};
+#endif
+
 void setDOMException(ExecState* exec, ExceptionCode ec)
 {
   if (ec == 0 || exec->hadException())
@@ -365,6 +380,14 @@ void setDOMException(ExecState* exec, ExceptionCode ec)
     code -= XPathExceptionOffset;
     nameTable = xpathExceptionNames;
     nameTableSize = sizeof(xpathExceptionNames) / sizeof(xpathExceptionNames[0]);
+#endif
+#ifdef SVG_SUPPORT
+  } else if (code >= SVGExceptionOffset && code <= SVGExceptionMax) {
+    type = "DOM SVG";
+    code -= SVGExceptionOffset;
+    nameIndex = code;
+    nameTable = svgExceptionNames;
+    nameTableSize = sizeof(svgExceptionNames) / sizeof(svgExceptionNames[0]);
 #endif
   } else {
     nameIndex = code;
index db07311d70e17dc6669ddb6fe04a94a7713c7ceb..f2761a117c2a4690a801901312fac10ee038dae8 100644 (file)
 
 #ifdef SVG_SUPPORT
 #import "DOMSVGAngleInternal.h"
+#import "DOMSVGElementInternal.h"
 #import "DOMSVGLengthInternal.h"
 #import "DOMSVGLengthListInternal.h"
 #import "DOMSVGMatrixInternal.h"
index 3b9ba7988f256458f68cee83d068971a227213e5..5a07889e28db8c0bd8abccd1206a1cc37e0baa37 100644 (file)
@@ -31,6 +31,7 @@
 #import "FrameMac.h"
 #import "Range.h"
 #import "RangeException.h"
+#import "SVGException.h"
 #import "WebScriptObjectPrivate.h"
 #import "XPathEvaluator.h"
 #import "kjs_dom.h"
@@ -76,6 +77,9 @@ void removeDOMWrapper(DOMObjectInternal* impl)
 NSString * const DOMException = @"DOMException";
 NSString * const DOMRangeException = @"DOMRangeException";
 NSString * const DOMEventException = @"DOMEventException";
+#ifdef SVG_SUPPORT
+NSString * const DOMSVGException = @"DOMSVGException";
+#endif // SVG_SUPPORT
 #ifdef XPATH_SUPPORT
 NSString * const DOMXPathException = @"DOMXPathException";
 #endif // XPATH_SUPPORT
@@ -93,6 +97,11 @@ void raiseDOMException(ExceptionCode ec)
     } else if (ec >= EventExceptionOffset && ec <= EventExceptionMax) {
         name = DOMEventException;
         code -= EventExceptionOffset;
+#ifdef SVG_SUPPORT
+    } else if (ec >= SVGExceptionOffset && ec <= SVGExceptionMax) {
+        name = DOMSVGException;
+        code -= SVGExceptionOffset;
+#endif // SVG_SUPPORT
 #ifdef XPATH_SUPPORT
     } else if (ec >= XPathExceptionOffset && ec <= XPathExceptionMax) {
         name = DOMXPathException;
index 33d17bb93468169fc42c6b740b67ac062046e5aa..7bfe8664718a43cab79b4a2aafc13bd225a4fab0 100644 (file)
@@ -25,6 +25,8 @@
  */
 
 #import <WebCore/DOMSVGAngle.h>
+#import <WebCore/DOMSVGElement.h>
+#import <WebCore/DOMSVGException.h>
 #import <WebCore/DOMSVGLength.h>
 #import <WebCore/DOMSVGLengthList.h>
 #import <WebCore/DOMSVGMatrix.h>
diff --git a/WebCore/bindings/objc/DOMSVGExecption.h b/WebCore/bindings/objc/DOMSVGExecption.h
new file mode 100644 (file)
index 0000000..1eb121a
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+@class NSString;
+
+extern NSString * const DOMSVGException;
+
+enum DOMSVGException {
+    DOM_SVG_WRONG_TYPE_ERR           = 0,
+    DOM_SVG_INVALID_VALUE_ERR        = 1,
+    DOM_SVG_MATRIX_NOT_INVERTABLE    = 2
+};
index 77b79e518463247fb3fed1e0291c0dc9183ed178..348db0423e51ea3653483342da3b2af033608bf8 100644 (file)
@@ -24,6 +24,8 @@
 #define KSVG_H
 #ifdef SVG_SUPPORT
 
+#include "SVGException.h"
+
 /**
  * @short General namespace specific definitions.
  */
@@ -31,12 +33,6 @@ namespace WebCore {
     /**
      * All SVG constants
      */
-    enum SVGExceptionCode {
-        SVG_WRONG_TYPE_ERR           = 1,
-        SVG_INVALID_VALUE_ERR        = 2,
-        SVG_MATRIX_NOT_INVERTABLE    = 3
-    };
-       
     enum SVGCSSRuleType {
         COLOR_PROFILE_RULE = 7
     };
index 26665e9b1ba057b91467131d6a7cad6892c8817b..799023a4e73652c4042a5acf29835326738278b1 100644 (file)
@@ -65,7 +65,7 @@ String SVGElement::id() const
     return getAttribute(idAttr);
 }
 
-void SVGElement::setId(const String& value)
+void SVGElement::setId(const String& value, ExceptionCode&)
 {
     setAttribute(idAttr, value);
 }
@@ -75,7 +75,7 @@ String SVGElement::xmlbase() const
     return getAttribute(XMLNames::baseAttr);
 }
 
-void SVGElement::setXmlbase(const String& value)
+void SVGElement::setXmlbase(const String& value, ExceptionCode&)
 {
     setAttribute(XMLNames::baseAttr, value);
 }
index 6bda4f8d4c10429ec4da7021c13b076aefefdce9..84b38845184f0755beedcb19d176988aabffe307 100644 (file)
@@ -154,9 +154,9 @@ namespace WebCore {
         virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
         
         String id() const;
-        void setId(const String&);
+        void setId(const String&, ExceptionCode&);
         String xmlbase() const;
-        void setXmlbase(const String&);
+        void setXmlbase(const String&, ExceptionCode&);
 
         SVGSVGElement* ownerSVGElement() const;
         SVGElement* viewportElement() const;
index 83aecb931b6549da6f2386d8de0200c7c004059f..2fafc618cb7b8f0f3d104d9ad7e892c2d9987e93 100644 (file)
@@ -1,6 +1,7 @@
 /*
     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
-                  2004, 2005 Rob Buis <buis@kde.org>
+    Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
+    Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
     Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
 
     This file is part of the KDE project
 */
 
 module svg {
-    interface [GenerateNativeConverter, Conditional=SVG] SVGElement : core::Element {
-        attribute core::DOMString id
-            setter raises DOMException;
-        attribute core::DOMString xmlbase
-            setter raises DOMException;
+
+    interface [GenerateNativeConverter, Conditional=SVG] SVGElement : Element {
+                 attribute DOMString id
+                     setter raises(DOMException);
+                 attribute DOMString xmlbase
+                     setter raises(DOMException);
+
+#if !defined(LANGUAGE_OBJECTIVE_C)
         readonly attribute SVGSVGElement ownerSVGElement;
+#endif
+
         readonly attribute SVGElement viewportElement;
     };
-};
+
+}
diff --git a/WebCore/ksvg2/svg/SVGException.h b/WebCore/ksvg2/svg/SVGException.h
new file mode 100644 (file)
index 0000000..c6f2b66
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ * Copyright (C) 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef SVGException_h
+#define SVGException_h
+#ifdef SVG_SUPPORT
+
+namespace WebCore {
+
+    const int SVGExceptionOffset = 300;
+    const int SVGExceptionMax = 399;
+
+    enum SVGExceptionCode {
+        SVG_WRONG_TYPE_ERR          = SVGExceptionOffset,
+        SVG_INVALID_VALUE_ERR       = SVGExceptionOffset + 1,
+        SVG_MATRIX_NOT_INVERTABLE   = SVGExceptionOffset + 2
+    };
+
+} // namespace WebCore
+
+#endif // SVG_SUPPORT
+#endif // SVGException_h