Bug #: 4946
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Sep 2005 22:09:09 +0000 (22:09 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Sep 2005 22:09:09 +0000 (22:09 +0000)
Submitted by: eseidel
Reviewed by: mjs
        Pickup latest Ecma changes from KDE, including
        adding in the SVG ecma bindings and DOM 3 LS bindings.
        http://bugzilla.opendarwin.org/show_bug.cgi?id=4946

        * WebCore.xcodeproj/project.pbxproj:
        * kdom/bindings/IDLCodeGenerator.pm:
        * kdom/bindings/IDLCodeGeneratorCpp.pm:
        * kdom/bindings/IDLCodeGeneratorEcmaInterface.pm: Added.
        * kdom/bindings/IDLCodeGeneratorJs.pm:
        * kdom/bindings/idl/core/Attr.idl:
        * kdom/bindings/idl/core/CharacterData.idl:
        * kdom/bindings/idl/core/DOMConfiguration.idl:
        * kdom/bindings/idl/core/DOMException.idl:
        * kdom/bindings/idl/core/DOMImplementation.idl:
        * kdom/bindings/idl/core/DOMImplementationList.idl: Removed.
        * kdom/bindings/idl/core/DOMImplementationSource.idl: Removed.
        * kdom/bindings/idl/core/DOMString.idl: Removed.
        * kdom/bindings/idl/core/Document.idl:
        * kdom/bindings/idl/core/Element.idl:
        * kdom/bindings/idl/core/NameList.idl: Removed.
        * kdom/bindings/idl/core/NamedNodeMap.idl:
        * kdom/bindings/idl/core/Node.idl:
        * kdom/bindings/idl/core/ProcessingInstruction.idl:
        * kdom/bindings/idl/core/Text.idl:
        * kdom/bindings/idl/core/UserDataHandler.idl: Removed.
        * kdom/bindings/idl/css/CSSCharsetRule.idl:
        * kdom/bindings/idl/css/CSSMediaRule.idl:
        * kdom/bindings/idl/css/CSSPageRule.idl:
        * kdom/bindings/idl/css/CSSPrimitiveValue.idl:
        * kdom/bindings/idl/css/CSSRule.idl:
        * kdom/bindings/idl/css/CSSStyleDeclaration.idl:
        * kdom/bindings/idl/css/CSSStyleRule.idl:
        * kdom/bindings/idl/css/CSSStyleSheet.idl:
        * kdom/bindings/idl/css/CSSValue.idl:
        * kdom/bindings/idl/css/ViewCSS.idl: Removed.
        * kdom/bindings/idl/events/DocumentEvent.idl:
        * kdom/bindings/idl/events/EventException.idl:
        * kdom/bindings/idl/events/EventTarget.idl:
        * kdom/bindings/idl/ls/DOMImplementationLS.idl: Added.
        * kdom/bindings/idl/ls/LSException.idl: Added.
        * kdom/bindings/idl/ls/LSInput.idl: Added.
        * kdom/bindings/idl/ls/LSOutput.idl: Added.
        * kdom/bindings/idl/ls/LSParser.idl: Added.
        * kdom/bindings/idl/ls/LSParserFilter.idl: Added.
        * kdom/bindings/idl/ls/LSResourceResolver.idl: Added.
        * kdom/bindings/idl/ls/LSSerializer.idl: Added.
        * kdom/bindings/idl/ls/LSSerializerFilter.idl: Added.
        * kdom/bindings/idl/ls/kdomdefs.idl: Added.
        * kdom/bindings/idl/range/Range.idl:
        * kdom/bindings/idl/range/RangeException.idl:
        * kdom/bindings/idl/stylesheets/LinkStyle.idl:
        * kdom/bindings/idl/stylesheets/MediaList.idl:
        * kdom/bindings/idl/traversal/DocumentTraversal.idl:
        * kdom/bindings/idl/traversal/NodeIterator.idl:
        * kdom/bindings/idl/traversal/TreeWalker.idl:
        * kdom/bindings/idl/xpath/XPathEvaluator.idl:
        * kdom/bindings/idl/xpath/XPathException.idl:
        * kdom/bindings/idl/xpath/XPathExpression.idl:
        * kdom/bindings/idl/xpath/XPathNSResolver.idl:
        * kdom/bindings/idl/xpath/XPathNamespace.idl:
        * kdom/bindings/idl/xpath/XPathResult.idl:
        * kdom/bindings/idl/xpointer/XPointerException.idl:
        * kdom/bindings/kdombinder.sh:
        * kdom/bindings/kdomidl.pl:
        * kdom/core/CDFInterface.cpp:
        (CDFInterface::ecmaInterface):
        * kdom/core/CDFInterface.h:
        * kdom/ecma/DOMBridge.h:
        (KDOM::DOMRWBridge::put):
        * kdom/ecma/DOMLookup.h:
        * kdom/ecma/Ecma.cpp:
        (Ecma::Private::Private):
        (Ecma::setup):
        (Ecma::setupDocument):
        (Ecma::interface):
        (Ecma::createEventListener):
        (KDOM::getDOMNode):
        (KDOM::getDOMEvent):
        * kdom/ecma/Ecma.h:
        * kdom/ecma/EcmaInterface.h: Removed.
        * kdom/ecma/GlobalObject.cpp:
        (GlobalObject::get):
        (GlobalObjectFunc::callAsFunction):
        (ScheduledAction::execute):
        (GlobalQObject::parentDestroyed):
        (GlobalQObject::clearTimeout):
        (GlobalQObject::timerEvent):
        * kdom/ecma/GlobalObject.h:
        (KDOM::GlobalObject::):
        * kdom/ecma/ScriptInterpreter.cpp:
        * khtml/khtml_part.cpp:
        (KHTMLPart::begin):
        * khtml/xml/dom_docimpl.cpp:
        (DOMImplementationImpl::createKDOMDocument):
        * khtml/xml/dom_docimpl.h:
        * ksvg2/bindings/idl/svg/GetSVGDocument.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAngle.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimateColorElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimateElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimateTransformElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedAngle.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedBoolean.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedEnumeration.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedInteger.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedLength.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedLengthList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedNumber.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedNumberList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedPathData.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedPoints.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedPreserveAspectRatio.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedRect.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedString.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimatedTransformList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGAnimationElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGCircleElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGClipPathElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGColor.idl: Added.
        * ksvg2/bindings/idl/svg/SVGComponentTransferFunctionElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGCursorElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGDOMImplementation.idl: Added.
        * ksvg2/bindings/idl/svg/SVGDefsElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGDescElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGDocument.idl: Added.
        * ksvg2/bindings/idl/svg/SVGElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGElementInstance.idl: Added.
        * ksvg2/bindings/idl/svg/SVGElementInstanceList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGEllipseElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGEvent.idl: Added.
        * ksvg2/bindings/idl/svg/SVGException.idl: Added.
        * ksvg2/bindings/idl/svg/SVGExternalResourcesRequired.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEBlendElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEColorMatrixElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEComponentTransferElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFECompositeElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEFloodElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEFuncAElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEFuncBElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEFuncGElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEFuncRElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEGaussianBlurElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEImageElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEMergeElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEMergeNodeElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFEOffsetElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFETileElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFETurbulenceElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFilterElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFilterPrimitiveStandardAttributes.idl: Added.
        * ksvg2/bindings/idl/svg/SVGFitToViewBox.idl: Added.
        * ksvg2/bindings/idl/svg/SVGGElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGGradientElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGICCColor.idl: Added.
        * ksvg2/bindings/idl/svg/SVGImageElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGLangSpace.idl: Added.
        * ksvg2/bindings/idl/svg/SVGLength.idl: Added.
        * ksvg2/bindings/idl/svg/SVGLengthList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGLineElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGLinearGradientElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGLocatable.idl: Added.
        * ksvg2/bindings/idl/svg/SVGMarkerElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGMatrix.idl: Added.
        * ksvg2/bindings/idl/svg/SVGNumber.idl: Added.
        * ksvg2/bindings/idl/svg/SVGNumberList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPaint.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSeg.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegArc.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegClosePath.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubic.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubicSmooth.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadratic.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadraticSmooth.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegLineto.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegLinetoHorizontal.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegLinetoVertical.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPathSegMoveto.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPatternElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPoint.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPointList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPolygonElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPolylineElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGPreserveAspectRatio.idl: Added.
        * ksvg2/bindings/idl/svg/SVGRadialGradientElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGRect.idl: Added.
        * ksvg2/bindings/idl/svg/SVGRectElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGRenderingIntent.idl: Added.
        * ksvg2/bindings/idl/svg/SVGSVGElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGScriptElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGSetElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGStopElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGStringList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGStylable.idl: Added.
        * ksvg2/bindings/idl/svg/SVGStyleElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGSwitchElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGSymbolElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTSpanElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTests.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTextContentElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTextElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTextPositioningElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTitleElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTransform.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTransformList.idl: Added.
        * ksvg2/bindings/idl/svg/SVGTransformable.idl: Added.
        * ksvg2/bindings/idl/svg/SVGURIReference.idl: Added.
        * ksvg2/bindings/idl/svg/SVGUnitTypes.idl: Added.
        * ksvg2/bindings/idl/svg/SVGUseElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGViewElement.idl: Added.
        * ksvg2/bindings/idl/svg/SVGZoomAndPan.idl: Added.
        * ksvg2/bindings/idl/svg/SVGZoomEvent.idl: Added.
        * ksvg2/bindings/idl/svg/kdomdefs.idl: Added.
        * ksvg2/ecma/EcmaInterface.h: Removed.

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

192 files changed:
SVGSupport/kdom/bindings/IDLCodeGenerator.pm
SVGSupport/kdom/bindings/IDLCodeGeneratorCpp.pm
SVGSupport/kdom/bindings/IDLCodeGeneratorEcmaInterface.pm [new file with mode: 0644]
SVGSupport/kdom/bindings/IDLCodeGeneratorJs.pm
SVGSupport/kdom/bindings/idl/core/Attr.idl
SVGSupport/kdom/bindings/idl/core/CharacterData.idl
SVGSupport/kdom/bindings/idl/core/DOMConfiguration.idl
SVGSupport/kdom/bindings/idl/core/DOMException.idl
SVGSupport/kdom/bindings/idl/core/DOMImplementation.idl
SVGSupport/kdom/bindings/idl/core/DOMImplementationList.idl [deleted file]
SVGSupport/kdom/bindings/idl/core/DOMImplementationSource.idl [deleted file]
SVGSupport/kdom/bindings/idl/core/DOMString.idl [deleted file]
SVGSupport/kdom/bindings/idl/core/Document.idl
SVGSupport/kdom/bindings/idl/core/Element.idl
SVGSupport/kdom/bindings/idl/core/NameList.idl [deleted file]
SVGSupport/kdom/bindings/idl/core/NamedNodeMap.idl
SVGSupport/kdom/bindings/idl/core/Node.idl
SVGSupport/kdom/bindings/idl/core/ProcessingInstruction.idl
SVGSupport/kdom/bindings/idl/core/Text.idl
SVGSupport/kdom/bindings/idl/core/UserDataHandler.idl [deleted file]
SVGSupport/kdom/bindings/idl/css/CSSCharsetRule.idl
SVGSupport/kdom/bindings/idl/css/CSSMediaRule.idl
SVGSupport/kdom/bindings/idl/css/CSSPageRule.idl
SVGSupport/kdom/bindings/idl/css/CSSPrimitiveValue.idl
SVGSupport/kdom/bindings/idl/css/CSSRule.idl
SVGSupport/kdom/bindings/idl/css/CSSStyleDeclaration.idl
SVGSupport/kdom/bindings/idl/css/CSSStyleRule.idl
SVGSupport/kdom/bindings/idl/css/CSSStyleSheet.idl
SVGSupport/kdom/bindings/idl/css/CSSValue.idl
SVGSupport/kdom/bindings/idl/css/ViewCSS.idl [deleted file]
SVGSupport/kdom/bindings/idl/events/DocumentEvent.idl
SVGSupport/kdom/bindings/idl/events/EventException.idl
SVGSupport/kdom/bindings/idl/events/EventTarget.idl
SVGSupport/kdom/bindings/idl/ls/DOMImplementationLS.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/LSException.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/LSInput.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/LSOutput.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/LSParser.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/LSParserFilter.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/LSResourceResolver.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/LSSerializer.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/LSSerializerFilter.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/ls/kdomdefs.idl [new file with mode: 0644]
SVGSupport/kdom/bindings/idl/range/Range.idl
SVGSupport/kdom/bindings/idl/range/RangeException.idl
SVGSupport/kdom/bindings/idl/stylesheets/LinkStyle.idl
SVGSupport/kdom/bindings/idl/stylesheets/MediaList.idl
SVGSupport/kdom/bindings/idl/traversal/DocumentTraversal.idl
SVGSupport/kdom/bindings/idl/traversal/NodeIterator.idl
SVGSupport/kdom/bindings/idl/traversal/TreeWalker.idl
SVGSupport/kdom/bindings/idl/xpath/XPathEvaluator.idl
SVGSupport/kdom/bindings/idl/xpath/XPathException.idl
SVGSupport/kdom/bindings/idl/xpath/XPathExpression.idl
SVGSupport/kdom/bindings/idl/xpath/XPathNSResolver.idl
SVGSupport/kdom/bindings/idl/xpath/XPathNamespace.idl
SVGSupport/kdom/bindings/idl/xpath/XPathResult.idl
SVGSupport/kdom/bindings/idl/xpointer/XPointerException.idl
SVGSupport/kdom/bindings/kdombinder.sh
SVGSupport/kdom/bindings/kdomidl.pl
SVGSupport/kdom/core/CDFInterface.cpp
SVGSupport/kdom/core/CDFInterface.h
SVGSupport/kdom/ecma/DOMBridge.h
SVGSupport/kdom/ecma/DOMLookup.h
SVGSupport/kdom/ecma/Ecma.cpp
SVGSupport/kdom/ecma/Ecma.h
SVGSupport/kdom/ecma/EcmaInterface.h [deleted file]
SVGSupport/kdom/ecma/GlobalObject.cpp
SVGSupport/kdom/ecma/GlobalObject.h
SVGSupport/kdom/ecma/ScriptInterpreter.cpp
WebCore/ChangeLog-2005-12-19
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/ksvg2/bindings/idl/svg/GetSVGDocument.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAngle.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimateColorElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimateElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimateTransformElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedAngle.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedBoolean.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedEnumeration.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedInteger.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedLength.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedLengthList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedNumber.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedNumberList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedPathData.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedPoints.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedPreserveAspectRatio.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedRect.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedString.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimatedTransformList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGAnimationElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGCircleElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGClipPathElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGColor.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGComponentTransferFunctionElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGCursorElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGDOMImplementation.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGDefsElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGDescElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGDocument.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGElementInstance.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGElementInstanceList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGEllipseElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGEvent.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGException.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGExternalResourcesRequired.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEBlendElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEColorMatrixElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEComponentTransferElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFECompositeElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEFloodElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEFuncAElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEFuncBElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEFuncGElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEFuncRElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEGaussianBlurElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEImageElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEMergeElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEMergeNodeElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFEOffsetElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFETileElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFETurbulenceElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFilterElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFilterPrimitiveStandardAttributes.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGFitToViewBox.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGGElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGGradientElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGICCColor.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGImageElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGLangSpace.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGLength.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGLengthList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGLineElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGLinearGradientElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGLocatable.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGMarkerElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGMatrix.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGNumber.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGNumberList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPaint.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSeg.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegArc.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegClosePath.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubic.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubicSmooth.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadratic.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadraticSmooth.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegLineto.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegLinetoHorizontal.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegLinetoVertical.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPathSegMoveto.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPatternElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPoint.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPointList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPolygonElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPolylineElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGPreserveAspectRatio.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGRadialGradientElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGRect.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGRectElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGRenderingIntent.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGSVGElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGScriptElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGSetElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGStopElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGStringList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGStylable.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGStyleElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGSwitchElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGSymbolElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTSpanElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTests.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTextContentElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTextElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTextPositioningElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTitleElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTransform.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTransformList.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGTransformable.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGURIReference.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGUnitTypes.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGUseElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGViewElement.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGZoomAndPan.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/SVGZoomEvent.idl [new file with mode: 0644]
WebCore/ksvg2/bindings/idl/svg/kdomdefs.idl [new file with mode: 0644]
WebCore/ksvg2/ecma/EcmaInterface.h [deleted file]
WebCore/ksvg2/scripts/generateJSBindings.pl [new file with mode: 0755]

index bc105a3..95902e2 100644 (file)
@@ -10,6 +10,7 @@ my $useGenerator = "";
 my $useOutputDir = "";
 my $useDirectories = "";
 my $useDocumentation = "";
+my $useLayerOnTop = 0;
 
 my $codeGenerator = 0;
 
@@ -31,6 +32,7 @@ sub new
        $useGenerator = shift;
        $useOutputDir = shift;
        $useDocumentation = shift;
+       $useLayerOnTop = shift;
 
        bless($reference, $object);
        return $reference;
@@ -47,7 +49,7 @@ sub ProcessDocument
 
        # Dynamically load external code generation perl module...
        require $ifaceName . ".pm";
-       $codeGenerator = $ifaceName->new($object, $useOutputDir, $useDocumentation);
+       $codeGenerator = $ifaceName->new($object, $useOutputDir, $useDocumentation, $useLayerOnTop);
  
        print " | *** Starting to generate code using \"$ifaceName\"...\n |\n";
 
@@ -76,8 +78,8 @@ sub FindTopBaseClass
        #
        # It gets trickier for ie. the 'MouseEvent' interface, whose parent is
        # the 'UIEvent' interface, whose parent is the 'Event' interface. Return it.
-
        my $object = shift;
+
        my $interface = shift;
        $interface =~ s/[a-zA-Z0-9]*:://; # Strip module.
 
@@ -135,6 +137,7 @@ sub ClassHasWriteableAttributes
 {
        # Determine wheter a given interface has any writeable attributes...
        my $object = shift;
+
        my $interface = shift;
        $interface =~ s/[a-zA-Z0-9]*:://; # Strip module.
 
@@ -170,6 +173,148 @@ sub ClassHasWriteableAttributes
 }
 
 # Helper for all IDLCodeGenerator***.pm modules
+sub AllClassesWhichInheritFrom
+{
+       # Determine which interfaces inherit from the passed one...
+       my $object = shift;
+
+       my $interface = shift;
+       $interface =~ s/([a-zA-Z0-9]*::)*//; # Strip namespace(s).
+
+       # Step #1: Loop through all included directories to scan for all IDL files...
+       my @allIDLFiles = ();
+       foreach(@{$useDirectories}) {
+               $endCondition = 0;
+               @foundFilenames = ();
+
+               $object->ScanDirectory("allidls", $_, $_, 1);
+               foreach(@foundFilenames) {
+                       push(@allIDLFiles, $_);
+               }
+       }
+
+       # Step #2: Loop through all found IDL files...
+       my %classDataCache;
+       foreach(@allIDLFiles) {
+               # Step #3: Parse the found IDL file (in quiet mode).
+               my $parser = IDLParser->new(1);
+               my $document = $parser->Parse($_);
+
+               # Step #4: Cache the parsed IDL datastructures.
+               my $cacheHandle = $_; $cacheHandle =~ s/.*\/(.*)\.idl//;
+               $classDataCache{$1} = $document;
+       }
+
+       my %classDataCacheCopy = %classDataCache; # Protect!
+
+       # Step #5: Loop through all cached IDL documents...
+       my @classList = ();
+       while(my($name, $document) = each %classDataCache) {
+               $endCondition = 0;
+
+               # Step #6: Check wheter the parsed IDL file has parents...
+               $object->RecursiveInheritanceHelper($document, $interface, \@classList, \%classDataCacheCopy);
+       }
+
+       # Step #7: Return list of all classes which inherit from me!
+       return \@classList;
+}
+
+# Helper for all IDLCodeGenerator***.pm modules
+sub AllClasses
+{
+       # Determines all interfaces within a project...
+       my $object = shift;
+
+       # Step #1: Loop through all included directories to scan for all IDL files...
+       my @allIDLFiles = ();
+       foreach(@{$useDirectories}) {
+               $endCondition = 0;
+               @foundFilenames = ();
+
+               $object->ScanDirectory("allidls", $_, $_, 1);
+               foreach(@foundFilenames) {
+                       push(@allIDLFiles, $_);
+               }
+       }
+
+       # Step #2: Loop through all found IDL files...
+       my @classList = ();
+       foreach(@allIDLFiles) {
+               # Step #3: Parse the found IDL file (in quiet mode).
+               my $parser = IDLParser->new(1);
+               my $document = $parser->Parse($_);
+
+               # Step #4: Check if class is a baseclass...
+               foreach(@{$document->classes}) {
+                       my $class = $_;
+
+                       my $identifier = $class->name;
+                       my $namespace = $moduleNamespaceHash{$document->module};
+                       $identifier = $namespace . "::" . $identifier if($namespace ne "");
+
+                       my @array = grep { /^$identifier$/ } @$classList;
+
+                       my $arraySize = @array;
+                       if($arraySize eq 0) {
+                               push(@classList, $identifier);
+                       }
+               }
+       }
+
+       # Step #7: Return list of all base classes!
+       return \@classList;
+}
+
+# Internal helper for 'AllClassesWhichInheritFrom'
+sub RecursiveInheritanceHelper
+{
+       my $object = shift;
+
+       my $document = shift;
+       my $interface = shift;
+       my $classList = shift;
+       my $classDataCache = shift;
+
+       if($endCondition eq 1) {
+               return 1;
+       }
+
+       foreach(@{$document->classes}) {
+               my $class = $_;
+
+               foreach(@{$class->parents}) {
+                       my $cacheHandle = $_;
+                       $cacheHandle =~ s/[a-zA-Z0-9]*:://; # Strip module.
+
+                       if($cacheHandle eq $interface) {
+                               my $identifier = $document->module . "::" . $class->name;
+                               my @array = grep { /^$identifier$/ } @$classList; my $arraySize = @array;
+                               push(@$classList, $identifier) if($arraySize eq 0);
+
+                               $endCondition = 1;
+                               return $endCondition;
+                       } else { 
+                               my %cache = %{$classDataCache};
+
+                               my $checkDocument = $cache{$cacheHandle};
+                               $endCondition = $object->RecursiveInheritanceHelper($checkDocument, $interface,
+                                                                                                                                       $classList, $classDataCache);
+                               if($endCondition eq 1) {
+                                       my $identifier = $document->module . "::" . $class->name;
+                                       my @array = grep { /^$identifier$/ } @$classList; my $arraySize = @array;
+                                       push(@$classList, $identifier) if($arraySize eq 0);
+
+                                       return $endCondition;
+                               }
+                       }
+               }
+       }
+
+       return $endCondition;
+}
+
+# Helper for all IDLCodeGenerator***.pm modules
 sub ModuleNamespaceHash
 {
        return \%moduleNamespaceHash;
@@ -212,6 +357,7 @@ sub GenerateInclude
        my %ret = $object->ExtractNamespace($_, 0, "");
 
        my $includeFile = $ret{'namespace'};
+       $includeFile = "kdom/bindings/js/" . $includeFile if($includeFile ne "");
        $includeFile .= "/" if($includeFile ne "");
        $includeFile .= $ret{'type'};
 
@@ -284,6 +430,7 @@ sub IsPrimitiveType
 sub ScanDirectory
 {
        my $object = shift;
+
        my $interface = shift;
        my $directory = shift;
        my $useDirectory = shift;
@@ -314,9 +461,16 @@ sub ScanDirectory
                        next;
                }
 
-               # Check wheter it contains the desired file...
-               if($name eq $interface) {
-                       $foundFilename = "$useDirectory/$directory/$interface";
+               # Check wheter we found the desired file...
+               my $condition = ($name eq $interface);
+               if(($interface eq "allidls") and
+                  ($name !~ /kdomdefs/) and
+                  ($name =~ /\.idl$/)) {
+                       $condition = 1;
+               }
+
+               if($condition) {
+                       $foundFilename = "$useDirectory/$directory/$name";
 
                        if($reportAllFiles eq 0) {
                                $endCondition = 1;
index 4b6ce08..26e963f 100644 (file)
@@ -153,7 +153,7 @@ sub GenerateHeader
                push(@headerContent, "#define $printNS\_" . $extractedType{'type'} . "_H\n");
 
                # - Add default includes & parent header includes
-               push(@headerContent, "\n#include <kdom/kdom.h>\n");
+               push(@headerContent, "\n#include \"kdom/kdom.h\"\n");
                push(@headerContent, "\n") if($parentsMax > 0);
 
                foreach(@{$dataNode->parents}) {
@@ -177,11 +177,14 @@ sub GenerateHeader
        }
 
        # - Add OurClassImpl forward
-       push(@headerContent, "\tclass " . $extractedType{'type'} . "Impl;\n\n");
+       push(@headerContent, "    class " . $extractedType{'type'} . "Impl;\n\n");
 
        # - Construct documentation extractor
        my $docExtracter = DocParser->new($useDocumentation, $dataNode);
-       push(@headerContent, "\t/**\n\t *\n " . $dataNode->documentation . "\t */\n\n\t");
+       if (!defined($dataNode->documentation)) {
+               $dataNode->documentation("");
+       }
+       push(@headerContent, "    /**\n     *\n " . $dataNode->documentation . "     */\n\n    ");
 
        # - Add class definition (with correct inheritance order)
        my $parentString = "class " . $extractedType{'type'};
@@ -200,86 +203,71 @@ sub GenerateHeader
                        $parentString .= "public " . $ret{'type'};
                }
 
-               $parentString .= ",\n\t\t\t\t" if($h++ < $parentsMax - 1);
+               $parentString .= ",\n                " if($h++ < $parentsMax - 1);
        }
 
-       $parentString .= "\n\t{\n\tpublic:\n";
+       $parentString .= "\n    {\n    public:\n";
        push(@headerContent, $parentString);
 
        # - Add default ctor / impl ctor / copy ctor & destructor
-       push(@headerContent, "\t\t" . $extractedType{'type'} . "();\n");
-       push(@headerContent, "\t\texplicit " . $extractedType{'type'} . "(" . $extractedType{'type'} . "Impl *i);\n");
-       push(@headerContent, "\t\t" . $extractedType{'type'} . "(const " . $extractedType{'type'} . " &other);\n");
+       push(@headerContent, "        " . $extractedType{'type'} . "();\n");
+       push(@headerContent, "        explicit " . $extractedType{'type'} . "(" . $extractedType{'type'} . "Impl *i);\n");
+       push(@headerContent, "        " . $extractedType{'type'} . "(const " . $extractedType{'type'} . " &other);\n");
 
        if(($parentsMax > 0) and ($topBaseClass ne "")) {
                # Eventually add ctor taking a 'const MyTopMostParent &' object
-               push(@headerContent, "\t\t" . $extractedType{'type'} . "(const $topBaseClass &other);\n");
+               push(@headerContent, "        " . $extractedType{'type'} . "(const $topBaseClass &other);\n");
        }
 
-       push(@headerContent, "\t\tvirtual ~" . $extractedType{'type'} . "();\n\n");
+       push(@headerContent, "        virtual ~" . $extractedType{'type'} . "();\n\n");
 
        # - Add assignment operator
-       push(@headerContent, "\t\t" . $extractedType{'type'} . " &operator=(const " . $extractedType{'type'} . " &other);\n");
+       push(@headerContent, "        " . $extractedType{'type'} . " &operator=(const " . $extractedType{'type'} . " &other);\n");
 
        if(($parentsMax > 0) and ($topBaseClass ne "")) {
                # Eventually add assignment operator taking a 'const MyTopMostParent &' object
-               push(@headerContent, "\t\t" . $extractedType{'type'} . " &operator=(const $topBaseClass &other);\n");
+               push(@headerContent, "        " . $extractedType{'type'} . " &operator=(const $topBaseClass &other);\n");
        }
 
        # - Add impl assignment operator, if needed
        if($dataNode->noDPtrFlag) {
-               push(@headerContent, "\t\t" . $extractedType{'type'} . " &operator=(" . $extractedType{'type'} . "Impl *other);\n");
+               push(@headerContent, "        " . $extractedType{'type'} . " &operator=(" . $extractedType{'type'} . "Impl *other);\n");
        }
 
        # - Add special operators if there are no parents
        if(($parentsMax eq 0) and (!$dataNode->noDPtrFlag)) {
-               push(@headerContent, "\t\tbool operator==(const " . $extractedType{'type'} . " &other) const;\n");
-               push(@headerContent, "\t\tbool operator!=(const " . $extractedType{'type'} . " &other) const;\n");
+               push(@headerContent, "        bool operator==(const " . $extractedType{'type'} . " &other) const;\n");
+               push(@headerContent, "        bool operator!=(const " . $extractedType{'type'} . " &other) const;\n");
        }
 
-       # - Add all constants
-       my $i = 0;
-       my $constantMax = @{$dataNode->constants};
-
-       # Not needed for cpp dom wrappers, since we have include files for this (kdom.h, ksvg.h etc.)
-       #foreach(@{$dataNode->constants}) {
-       #       my $constant = $_;
-       #
-       #       my $constantString = "\n\t\tstatic const " . $object->MapDataType($constant->type) .
-       #                                                 " " . $constant->name . " = " . $constant->value . ";";
-       #
-       #       $constantString .= "\n" if($i++ eq $constantMax - 1);
-       #       push(@headerContent, $constantString);
-       #}
-
        # - Add all attributes
        foreach(@{$dataNode->attributes}) {
                my $attribute = $_;
                my $type = $attribute->signature->type;
 
                # print documentation lines
-               my $attributeString = "\n\t\t/**\n";
+               my $attributeString = "\n        /**\n";
                foreach (@{$attribute->documentation}) {
-                       $attributeString .= "\t\t * " . trim($_) . "\n";
+                       $attributeString .= "         * " . trim($_) . "\n";
                }
 
                # at the end come exception lines
                if (defined($attribute->exceptionName)) {
-                       $attributeString .= "\t\t *\n\t\t * \@exception " . $attribute->exceptionName . "\n";
+                       $attributeString .= "         *\n         * \@exception " . $attribute->exceptionName . "\n";
                        foreach (@{$attribute->exceptionDocumentation}) {
-                               $attributeString .= "\t\t * " . trim($_) . "\n";
+                               $attributeString .= "         * " . trim($_) . "\n";
                        }
                }
 
-               $attributeString .= "\t\t */\n" .
-                                                         "\t\t" . $object->ProcessType($type, $attribute->signature->hasPtrFlag, 1) .
+               $attributeString .= "         */\n" .
+                                                         "        " . $object->ProcessType($type, $attribute->signature->hasPtrFlag, 1) .
                                                          $attribute->signature->name . "() const;\n";
 
                $object->CollectDataType($type, $extractedType{'type'});
 
                if($attribute->type eq "attribute") { # Read-write accessors!
                        my $name = $attribute->signature->name; $name = ucfirst($name);
-                       $attributeString .= "\t\tvoid set$name(" .
+                       $attributeString .= "        void set$name(" .
                                                                $object->ProcessType($type, $attribute->signature->hasPtrFlag) .
                                                                $attribute->signature->name . ");\n";
                }
@@ -293,9 +281,12 @@ sub GenerateHeader
        foreach(@{$dataNode->functions}) {
                my $function = $_;
                my $type = $function->signature->type;
+               if (!defined($function->documentation)) {
+                       $function->documentation("");
+               }
 
-               my $functionString = "\n\t\t/*\n\t\t * " . $function->documentation . "\n\t\t */\n" .
-                                                        "\t\t" . $object->ProcessType($type, $function->signature->hasPtrFlag, 1) .
+               my $functionString = "\n        /*\n         * " . $function->documentation . "\n         */\n" .
+                                                        "        " . $object->ProcessType($type, $function->signature->hasPtrFlag, 1) .
                                                         $function->signature->name . "(";
 
                $object->CollectDataType($type, $extractedType{'type'});
@@ -312,21 +303,21 @@ sub GenerateHeader
                        $object->CollectDataType($type, $extractedType{'type'});
                }
 
-               $functionString .= ");\n";
+               $functionString .= ") const;\n";
                push(@headerContent, $functionString);
        }
 
        # - Add internal section
-       push(@headerContent, "\n\t\t// Internal\n");
-       push(@headerContent, "\t\tstatic " . $extractedType{'type'} . " null;\n");
-       push(@headerContent, "\t\ttypedef " . $extractedType{'type'} . "Impl Private;\n");
+       push(@headerContent, "\n        // Internal\n");
+       push(@headerContent, "        static " . $extractedType{'type'} . " null;\n");
+       push(@headerContent, "        typedef " . $extractedType{'type'} . "Impl Private;\n");
 
        # - Add d-ptr accessor handle()
-       push(@headerContent, "\n\t\t" . $extractedType{'type'} . "Impl *handle() const;\n");
+       push(@headerContent, "\n        " . $extractedType{'type'} . "Impl *handle() const;\n");
 
        # - Add d-ptr if there are no parents
        if($parentsMax eq 0) {
-               push(@headerContent, "\n\tprotected:\n\t\t" . $extractedType{'type'} . "Impl *d;\n");
+               push(@headerContent, "\n    protected:\n        " . $extractedType{'type'} . "Impl *d;\n");
        }
 
        # Prepare class forwards...
@@ -340,7 +331,7 @@ sub GenerateHeader
                my $namespace = $ret{'namespace'};
                $namespace = $useModuleNS if($namespace eq "");
 
-               my $forward = "\tclass " . $ret{'type'} . ";";
+               my $forward = "    class " . $ret{'type'} . ";";
                $forward = "\n$forward" if($first ne 1);
 
                if(exists($fixupStrings{$namespace})) {
@@ -380,7 +371,7 @@ sub GenerateHeader
        $tempData =~ s/#FIXUP_[a-zA-Z0-9:]*#//g;
 
        @headerContent = split("@", $tempData);
-       push(@headerContent, "\t};");
+       push(@headerContent, "    };");
 
        # End header...
        my @namespaces = @{$codeGenerator->SplitNamespaces($useModuleNS)};
@@ -478,7 +469,7 @@ sub GenerateImplementation
                        $type = $ret{'namespace'} . "::$type";
                }
 
-               $assString .= "\t${type}::operator=(other);";
+               $assString .= "    ${type}::operator=(other);";
                $assString .= "\n" if($h < $parentsMax);
 
                $ctorString .= "$type()";
@@ -496,13 +487,13 @@ sub GenerateImplementation
                $ctorImplString = " : d(i)";
 
                if($dataNode->noDPtrFlag) {
-                       $assString = "\tif(d != other.d)\n\t\td = other.d;\n\n";
+                       $assString = "    if(d != other.d)\n        d = other.d;\n\n";
                        $ctorImplString .= "\n{\n}\n";
-                       $assImplString = "\tif(d != other)\n\t\td = other;\n\n";
+                       $assImplString = "    if(d != other)\n        d = other;\n\n";
                } else { # Common case
-                       $assString = "\tKDOM_SAFE_SET(d, other.d);\n";
-                       $ctorImplString .= "\n{\n\tif(d)\n\t\td->ref();\n}\n";
-                       $dtorString = "\tif(d)\n\t\td->deref();\n";
+                       $assString = "    KDOM_SAFE_SET(d, other.d);\n";
+                       $ctorImplString .= "\n{\n    if(d)\n        d->ref();\n}\n";
+                       $dtorString = "    if(d)\n        d->deref();\n";
                }
        }
 
@@ -511,9 +502,9 @@ sub GenerateImplementation
                $dptrAccessor = $topBaseClass . "::d";
        }
 
-       my $dptrCheck = "\tif(!d)\n\t";
+       my $dptrCheck = "    if(!d)\n    ";
        if($dptrAccessor ne "d") {
-               $dptrCheck = "\tif(!impl)\n\t";
+               $dptrCheck = "    if(!impl)\n    ";
        }
 
        my $notFoundException = "throw new ";
@@ -534,19 +525,19 @@ sub GenerateImplementation
                                           $extractedType{'type'} . "Impl *i)$ctorImplString\n");
 
        push(@implContent, $extractedType{'type'} . "::" . $extractedType{'type'} . "(const " .
-                                          $extractedType{'type'} . " &other)$ctorString\n{\n\t(*this) = other;\n}\n\n");
+                                          $extractedType{'type'} . " &other)$ctorString\n{\n    (*this) = other;\n}\n\n");
 
        if(($parentsMax > 0) and ($topBaseClass ne "")) {
                # Eventually add ctor taking a 'const MyTopMostParent &' object
                push(@implContent, $extractedType{'type'} . "::" . $extractedType{'type'} . "(const " .
-                                                  $topBaseClass . " &other)$ctorString\n{\n\t(*this) = other;\n}\n\n");
+                                                  $topBaseClass . " &other)$ctorString\n{\n    (*this) = other;\n}\n\n");
        }
 
        push(@implContent, $extractedType{'type'} . "::~" . $extractedType{'type'} . "()\n{\n$dtorString}\n\n");
 
        # - Add assignment operator
        push(@implContent, $extractedType{'type'} . " &" . $extractedType{'type'} . "::operator=(const " .
-                                          $extractedType{'type'} . " &other)\n{\n$assString\treturn (\*this);\n}\n");
+                                          $extractedType{'type'} . " &other)\n{\n$assString    return (\*this);\n}\n");
 
        if(($parentsMax > 0) and ($topBaseClass ne "")) {
                my @parents = @{$dataNode->parents};
@@ -558,29 +549,29 @@ sub GenerateImplementation
                        $type = $ret{'namespace'} . "::$type";
                }
 
-               my $assTwoString = "\t\t\t" . $type . "::operator=(other);\n";
+               my $assTwoString = "            " . $type . "::operator=(other);\n";
 
                # Eventually add assigment operator taking a 'const MyTopMostParent &' object
                push(@implContent, "\n" . $extractedType{'type'} . " &" . $extractedType{'type'} . "::operator=(const " .
-                                                  $topBaseClass . " &other)\n{\n\t" . $topBaseClass . "Impl *ohandle = static_cast<" .
-                                                  $topBaseClass . "Impl *>(other.handle());\n\n\tif(impl != ohandle)\n\t{\n\t\tif(!" .
-                                                  "ohandle || 0 /* TODO */)\n\t\t{\n\t\t\tif(impl)\n\t\t\t\timpl->deref();\n\n\t\t\t" .
-                                                  "$dptrAccessor = 0;\n\t\t}\n\t\telse\n$assTwoString\t}\n\n\treturn (\*this);\n}\n");
+                                                  $topBaseClass . " &other)\n{\n    " . $topBaseClass . "Impl *ohandle = static_cast<" .
+                                                  $topBaseClass . "Impl *>(other.handle());\n\n    if(impl != ohandle)\n    {\n        if(!" .
+                                                  "ohandle || 0 /* TODO */)\n        {\n            if(impl)\n                impl->deref();\n\n            " .
+                                                  "$dptrAccessor = 0;\n        }\n        else\n$assTwoString    }\n\n    return (\*this);\n}\n");
        }
 
        # - Add impl assignment operator, if needed
        if($dataNode->noDPtrFlag) {
                push(@implContent, "\n" . $extractedType{'type'} . " &" . $extractedType{'type'} . "::operator=(" .
-                                                  $extractedType{'type'} . "Impl *other)\n{\n$assImplString\treturn (\*this);\n}\n");
+                                                  $extractedType{'type'} . "Impl *other)\n{\n$assImplString    return (\*this);\n}\n");
        }
 
        # - Add special operators if there are no parents
        if(($parentsMax eq 0) and (!$dataNode->noDPtrFlag)) {
                push(@implContent, "\nbool " . $extractedType{'type'} . "::operator==(const " .
-                                                  $extractedType{'type'} . " &other) const\n{\n\treturn d == other.d;\n}\n");
+                                                  $extractedType{'type'} . " &other) const\n{\n    return d == other.d;\n}\n");
 
                push(@implContent, "\nbool " . $extractedType{'type'} . "::operator!=(const " .
-                                                  $extractedType{'type'} . " &other) const\n{\n\treturn !operator==(other);\n}\n");
+                                                  $extractedType{'type'} . " &other) const\n{\n    return !operator==(other);\n}\n");
        }
 
        # - Add all attributes
@@ -594,7 +585,7 @@ sub GenerateImplementation
                my $retName = $object->ReturnStringForType($attribute->signature->type, "impl->" .
                                          $attribute->signature->name . "()");
 
-               $attributeString .= "$dptrCheck\t$notFoundException\n\n\treturn $retName\n}\n";
+               $attributeString .= "$dptrCheck    $notFoundException\n\n    return $retName\n}\n";
 
                if($attribute->type eq "attribute") { # Read-write accessors!
                        my $name = $attribute->signature->name; $name = ucfirst($name);
@@ -608,8 +599,8 @@ sub GenerateImplementation
                        my $nameString = $attribute->signature->name;
                        $nameString .= ".handle()" if($type =~ /const/);
 
-                       $attributeString .= "$dptrCheck\t$notFoundException\n\n" .
-                                                               "\timpl->set$name($nameString);\n}\n";
+                       $attributeString .= "$dptrCheck    $notFoundException\n\n" .
+                                                               "    impl->set$name($nameString);\n}\n";
                }
 
                push(@implContent, $attributeString);
@@ -646,7 +637,7 @@ sub GenerateImplementation
                my $name = $object->ReturnStringForType($function->signature->type, "impl->" .
                                                                                                $function->signature->name . "($valueString)");
 
-               $functionString .= ")\n{\n$dptrCheck\t$notFoundException\n\n\treturn $name\n}";
+               $functionString .= ") const\n{\n$dptrCheck    $notFoundException\n\n    return $name\n}";
 
                $functionString .= "\n" if($j++ < $functionMax - 1);
                push(@implContent, $functionString);
@@ -658,7 +649,7 @@ sub GenerateImplementation
 
        # - Add d-ptr accessor handle()
        push(@implContent, "\n" . $extractedType{'type'} . "Impl *" . $extractedType{'type'} .
-                                          "::handle() const\n{\n\treturn impl;\n}");
+                                          "::handle() const\n{\n    return impl;\n}");
 
        # End implementation...
        push(@implContent, "\n");
diff --git a/SVGSupport/kdom/bindings/IDLCodeGeneratorEcmaInterface.pm b/SVGSupport/kdom/bindings/IDLCodeGeneratorEcmaInterface.pm
new file mode 100644 (file)
index 0000000..e055f1f
--- /dev/null
@@ -0,0 +1,373 @@
+#
+# KDOM IDL parser
+#
+# Copyright (c) 2005 Nikolas Zimmermann <wildfox@kde.org>
+#
+package IDLCodeGeneratorEcmaInterface;
+
+my $useModule = "";
+my $useModuleNS = "";
+my $useOutputDir = "";
+my $useLayerOnTop = 0;
+
+my $codeGenerator;
+
+my $IMPL;
+my $HEADER;
+
+my @implContent; # .cpp file content
+my @headerContent; # .h file content
+
+my @classes; # Helper.
+my $headerString; # Helper.
+
+my @neededForwards; # Used to build up include list
+
+# Default .h template
+my $headerTemplate = << "EOF";
+/*
+    This file is part of the KDE project.
+    This file has been generated by kdomidl.pl. DO NOT MODIFY!
+
+    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.
+*/
+EOF
+
+# Default constructor
+sub new
+{
+       my $object = shift;
+       my $reference = { };
+
+       $codeGenerator = shift;
+       $useOutputDir = shift;
+       my $useDocumentation = shift; # not used here.
+       $useLayerOnTop = shift;
+
+       bless($reference, $object);
+       return $reference;
+}
+
+sub finish
+{
+       my $object = shift;
+
+       # Commit changes!
+       $object->WriteData();
+}
+
+# Params: 'idlDocument' struct
+sub GenerateModule
+{
+       my $object = shift;
+       my $dataNode = shift;
+
+       # Create module <-> namespace map...
+       $codeGenerator->CreateModuleNamespaceHash();
+
+       $useModule = $dataNode->module;
+
+       my %hash = %{$codeGenerator->ModuleNamespaceHash()};
+       $useModuleNS = $hash{$useModule};
+
+       # Determine all classes within the project...
+       @classes = @{$codeGenerator->AllClasses()};
+}
+
+# Params: 'domClass' struct
+sub GenerateInterface
+{
+       my $object = shift;
+       my $dataNode = shift;
+
+       $object->WriteData();
+
+       # Start actual generation..
+       print "  |  |>  Generating implementation...\n";
+       $object->GenerateImplementation($dataNode);
+
+       print "  |  |>  Generating header...\n";
+       $object->GenerateHeader($dataNode);
+
+       print " |-\n |\n";
+  
+       # Open file for writing...
+       my $implFileName = $useOutputDir . "/EcmaInterface.cpp";
+       my $headerFileName = $useOutputDir . "/EcmaInterface.h";
+
+       open($IMPL, ">$implFileName") || die "Coudln't open file $implFileName";
+       open($HEADER, ">$headerFileName") || die "Coudln't open file $headerFileName";
+}
+
+sub GenerateHeader
+{
+       my $object = shift;
+
+       my $dataNode = shift;
+
+       if(!defined($HEADER)) {
+               # - Add default header template
+               @headerContent = split("\r", $headerTemplate);
+
+               # - Add header protection
+               my $printNS = $useModuleNS; $printNS =~ s/\:\:/\_/g;
+               push(@headerContent, "\n#ifndef $printNS\_EcmaInterface_H\n");
+               push(@headerContent, "#define $printNS\_EcmaInterface_H\n\n");
+               push(@headerContent, "#include <kdom/core/CDFInterface.h>\n");
+
+               if($useModuleNS !~ /^KDOM/) {
+                       push(@headerContent, "#include <kdom/ecma/EcmaInterface.h>\n");
+               }
+
+               push(@headerContent, "#include <kdom/core/DocumentImpl.h>\n\n");
+               push(@headerContent, "namespace KJS\n{\n    class ObjectImp;\n}\n\n");
+
+               # - Add placeholder to be replaced with needed forwards, later.
+               push(@headerContent, "#FIXUP_FORWARDS#");
+
+               # - Add namespace selector(s)
+               my @namespaces = @{$codeGenerator->SplitNamespaces($useModuleNS)};
+
+               my $collectedNS = "";
+               foreach(@namespaces) {
+                       $collectedNS .= $_ . "::";
+
+                       my $showNS = substr($collectedNS, 0, length($collectedNS) - 2);
+                       push(@headerContent, "namespace $_\n{\n");
+               }
+       }
+
+       # - Add class definition...
+       my $inheritanceString = "";
+       $inheritanceString = " : public KDOM::EcmaInterface" if($useModuleNS !~ /^KDOM/);
+
+       push(@headerContent, "    class EcmaInterface${inheritanceString}\n    {\n    public:\n");
+       push(@headerContent, "        EcmaInterface() { }\n");
+       push(@headerContent, "        virtual ~EcmaInterface() { }\n\n");
+       push(@headerContent, $headerString);
+       push(@headerContent, "    };");
+
+
+       # - Build forward list...
+       if($useLayerOnTop eq 0) {
+               foreach(@classes) {
+                       push(@neededForwards, $_ . "Impl");
+               }
+       }
+
+       # End header...
+       my @namespaces = @{$codeGenerator->SplitNamespaces($useModuleNS)};
+       my $namespacesMax = @namespaces;
+
+       foreach(@namespaces) {
+               push(@headerContent, "\n};\n");
+       }
+
+       push(@headerContent, "\n#endif\n");
+
+       # ... and apply fixups!
+       my $tempData = join("@", @headerContent);
+
+       my $fixupString = "";
+
+       @neededForwards = sort { length $a <=> length $b } @neededForwards;
+       foreach(@neededForwards) {
+               my $useClass = $_;
+
+               my @namespaces = @{$codeGenerator->SplitNamespaces($useClass)};
+               my $namespaceCount = @namespaces;
+
+               my $i = 0;
+               my $collectedNS = "";
+               foreach(@namespaces) {
+                       $i++;
+                       $collectedNS .= $_ . "::";
+
+                       my $showNS = substr($collectedNS, 0, length($collectedNS) - 2);
+                       if($i < $namespaceCount) { 
+                               $fixupString .= "namespace $_ { ";
+                       } else {
+                               $fixupString .= "class ${_}; ";
+                               $fixupString .= ("} " x ($i - 1));
+                               $fixupString .= "\n";
+                       }
+               }
+       }
+
+       $fixupString .= "\n" if($fixupString ne "");
+
+       $tempData =~ s/#FIXUP_FORWARDS#/$fixupString/;
+       @headerContent = split("@", $tempData);
+}
+
+sub GenerateImplementation
+{
+       my $object = shift;
+
+       my $dataNode = shift;
+
+       my $parentsMax = @{$dataNode->parents};
+
+       my %extractedType = $codeGenerator->ExtractNamespace($dataNode->name, 1, $useModuleNS);
+       $extractedType{'type'} .= "Wrapper"; # Postfix the classname...
+
+       my $implClass = $extractedType{'type'};
+       $implClass =~ s/Wrapper$/Impl/;
+
+       if(!defined($IMPL)) {
+               # - Add default header template
+               @implContent = split("\r", $headerTemplate);
+
+               # - Add absolutely needed includes
+               if($useLayerOnTop eq 0) {
+                       push(@implContent, "\n#include <kdom/ecma/EcmaInterface.h>\n\n");
+               } elsif($useModule eq "svg") { # Special case for ksvg...
+                       push(@implContent, "\n#include <ksvg2/ecma/EcmaInterface.h>");
+                       push(@implContent, "\n#include <kdom/ecma/DOMBridge.h>\n\n");
+               }
+
+               # - Add placeholder to be replaced with needed includes, later.
+               push(@implContent, "#FIXUP_INCLUDES#");
+
+               # - Add namespace selector(s)
+               my @namespaces = @{$codeGenerator->SplitNamespaces($useModuleNS)};
+
+               my $collectedNS = "";
+               foreach(@namespaces) {
+                       $collectedNS .= $_ . "::";
+
+                       my $showNS = substr($collectedNS, 0, length($collectedNS) - 2);
+                       push(@implContent, "using namespace $showNS;\n");
+               }
+       }
+
+       $headerString = ""; # Cleanup.
+
+       my $showTypeNS = $useModuleNS;
+       $showTypeNS =~ s/([A-Z]*)[A-Za-z:]*/$1/g;
+
+       my $useThisClass = 0; # Helper.
+
+       # - Add 'inheritedFoobarCast' functions for all the kdom classes
+       #   which are reimplemented within our project (ie. ksvg2/khtml2).
+       foreach(@classes) {
+               my $class = $_;
+               if($class !~ /KDOM/) { # Skip our own base classes.
+                       next;
+               }
+
+               my $include = $class;
+               $include =~ s/([a-zA-Z0-9]*::)*//; # Strip namespace.
+
+               if($useLayerOnTop eq 0) {
+                       $headerString .= "        virtual ${_}Impl *inherited${include}" .
+                                                        "Cast(const KJS::ObjectImp *bridge);\n";
+
+                       push(@implContent, "\n${_}Impl *${showTypeNS}::EcmaInterface::inherited" .
+                                                          $include . "Cast(const KJS::ObjectImp *bridge)\n{\n" .
+                                                          "    Q_UNUSED(bridge);\n    return 0;\n}\n");
+               } else {
+                       my @inheritedByClassList = @{$codeGenerator->AllClassesWhichInheritFrom($_)};
+                       my $inheritedBySize = @inheritedByClassList;
+
+                       my $classString = "";
+                       if($inheritedBySize ne 0) {
+                               my $used = 0;
+                               foreach(@inheritedByClassList) {
+                                       my %inheritedType = $codeGenerator->ExtractNamespace($_, 1, $useModuleNS);
+
+                                       my $type = $inheritedType{'type'};
+                                       my $namespace = $inheritedType{'namespace'};
+
+                                       if($namespace !~ /^KDOM/) {
+                                               # No duplicated includes...
+                                               my @array1 = grep { /^${type}Impl$/ } @neededForwards;
+                                               my @array2 = grep { /^${type}Wrapper$/ } @neededForwards;
+                                               my $arraySize1 = @array1; my $arraySize2 = @array2;
+
+                                               push(@neededForwards, $type . "Impl") if($arraySize1 eq 0);
+                                               push(@neededForwards, $type . "Wrapper") if($arraySize2 eq 0);
+
+                                               $classString .= "    { ${class}Impl *test = ${namespace}::to${type}(0, bridge);" .
+                                                                               "\n    if(test) return test; }\n\n";
+                                       }
+                               }
+                       }
+
+                       if($classString ne "") {
+                               $headerString .= "        ${class}Impl *inherited${include}" .
+                                                                "Cast(const KJS::ObjectImp *bridge);\n";
+
+                               push(@implContent, "\n${class}Impl *${showTypeNS}::EcmaInterface::inherited" .
+                                                                  $include . "Cast(const KJS::ObjectImp *bridge)\n{\n" .
+                                                                  $classString . "    return 0;\n}\n");
+                       }
+               }
+       }
+
+       # ... and apply fixups!
+       my $tempData = join("@", @implContent);
+
+       my $fixupString = "";
+
+       foreach(@neededForwards) {
+               $_ =~ s/([a-zA-Z0-9]*::)*//; # Strip namespace.
+       }
+
+       @neededForwards = sort { length $a <=> length $b } @neededForwards;
+       foreach(@neededForwards) {
+               my $useClass = $_;
+
+               if($useClass =~ /^.*AbsImpl$/) { # Special cases for SVG generation!
+                       $useClass =~ s/AbsImpl/Impl/; # it's 'SVGPathSegArcImpl' not 'SVGPathSegArcAbsImpl'
+               } elsif($useClass =~ /^.*RelImpl$/) {
+                       $useClass =~ s/RelImpl/Impl/; # it's 'SVGPathSegArcImpl' not 'SVGPathSegArcRelImpl'
+               }
+
+               $fixupString .= "#include \"${useClass}.h\"\n";
+       }
+
+       $fixupString .= "\n" if($fixupString ne "");
+
+       $tempData =~ s/#FIXUP_INCLUDES#/$fixupString/;
+       @implContent = split("@", $tempData);
+
+       @neededForwards = ();
+}
+
+# Internal helper
+sub WriteData
+{
+       if(defined($IMPL)) {
+               # Write content to file.
+               print $IMPL @implContent;
+               close($IMPL);
+               undef($IMPL);
+
+               @implContent = "";
+       }
+
+       if(defined($HEADER)) {
+               # Write content to file.
+               print $HEADER @headerContent;
+               close($HEADER);
+               undef($HEADER);
+
+               @headerContent = "";
+       }
+}
+
+1;
index 2c0247a..b64be85 100644 (file)
@@ -8,6 +8,7 @@ package IDLCodeGeneratorJs;
 my $useModule = "";
 my $useModuleNS = "";
 my $useOutputDir = "";
+my $useLayerOnTop = 0;
 
 my $codeGenerator;
 
@@ -50,6 +51,8 @@ sub new
 
        $codeGenerator = shift;
        $useOutputDir = shift;
+       my $useDocumentation = shift; # not used here.
+       $useLayerOnTop = shift;
 
        bless($reference, $object);
        return $reference;
@@ -151,7 +154,7 @@ sub GenerateHeader
 
                # - Add default includes & parent header includes
                push(@headerContent, "\n#include <kdebug.h>\n");
-               push(@headerContent, "\n#include <kjs/object.h>\n\n");
+               push(@headerContent, "\n#include <kdom/ecma/DOMLookup.h>\n\n");
 
                foreach(@{$dataNode->parents}) {
                        my $includeFile = $codeGenerator->GenerateInclude($_);
@@ -180,11 +183,22 @@ sub GenerateHeader
                }
        }
 
+       # - Determines wheter any of our parents has any readwrite props...
+       my $hasParentReadWriteProperties = 0;
+       foreach(@{$dataNode->parents}) {
+               my %ret = $codeGenerator->ExtractNamespace($_, 1, $useModuleNS);
+
+               # Skip classes which don't define any writable attributes...
+               if($codeGenerator->ClassHasWriteableAttributes($ret{'type'}) eq 1) {
+                       $hasParentReadWriteProperties = 1;
+               }
+       }
+
        my $implClass = $extractedType{'type'};
        $implClass =~ s/Wrapper$/Impl/;
 
        # - Add class definition (with correct inheritance order)
-       my $parentString = "\tclass $implClass;\n\tclass " . $extractedType{'type'};
+       my $parentString = "    class $implClass;\n    class " . $extractedType{'type'};
        $parentString .= " : " if($parentsMax ne 0);
 
        my $h = 0;
@@ -197,53 +211,60 @@ sub GenerateHeader
                        $parentString .= "public " . $ret{'type'} . "Wrapper";
                }
 
-               $parentString .= ",\n\t\t\t\t" if($h++ < $parentsMax - 1);
+               $parentString .= ",\n                " if($h++ < $parentsMax - 1);
        }
 
-       $parentString .= "\n\t{\n\tpublic:\n";
+       $parentString .= "\n    {\n    public:\n";
        push(@headerContent, $parentString);
 
        # - Add default constructor & destructor
-       push(@headerContent, "\t\t" . $extractedType{'type'} . "($implClass *impl);\n");
-       push(@headerContent, "\t\tvirtual ~" . $extractedType{'type'} . "();\n\n");
+       push(@headerContent, "        " . $extractedType{'type'} . "($implClass *impl);\n");
+       push(@headerContent, "        virtual ~" . $extractedType{'type'} . "();\n\n");
 
        # - Add standard ecma functions
-       push(@headerContent, "\t\tvirtual const KJS::ClassInfo *classInfo() const;\n");
-       push(@headerContent, "\t\tvirtual KJS::UString toString(KJS::ExecState *exec) const;\n\n");
+       push(@headerContent, "        virtual const KJS::ClassInfo *classInfo() const;\n");
+       push(@headerContent, "        virtual KJS::UString toString(KJS::ExecState *exec) const;\n\n");
 
-       push(@headerContent, "\t\tvirtual bool hasProperty(KJS::ExecState *exec, " .
+       push(@headerContent, "        virtual bool hasProperty(KJS::ExecState *exec, " .
                                                 "const KJS::Identifier &propertyName) const;\n\n");
 
-       push(@headerContent, "\t\tvirtual KJS::ValueImp *get(KJS::ExecState *exec, " .
+       push(@headerContent, "        virtual KJS::ValueImp *get(KJS::ExecState *exec, " .
                                                 "const KJS::Identifier &propertyName, const KJS::ObjectImp *bridge) const;\n");
        
-       push(@headerContent, "\t\tKJS::ValueImp *getInParents(KJS::ExecState *exec, " .
+       push(@headerContent, "        KJS::ValueImp *getInParents(KJS::ExecState *exec, " .
                                                 "const KJS::Identifier &propertyName, const KJS::ObjectImp *bridge) const;\n\n");
 
        if($hasReadWriteProperties eq 1) {
-               push(@headerContent, "\t\tvirtual bool put(KJS::ExecState *exec, " .
+               push(@headerContent, "        virtual bool put(KJS::ExecState *exec, " .
                                                         "const KJS::Identifier &propertyName, KJS::ValueImp *value, int attr);\n");
+       }
 
-               push(@headerContent, "\t\tbool putInParents(KJS::ExecState *exec, " .
-                                                        "const KJS::Identifier &propertyName, KJS::ValueImp *value, int attr);\n\n");
+       if(($hasReadWriteProperties eq 1) or ($hasParentReadWriteProperties eq 1)) {
+               if($hasReadWriteProperties eq 0) {
+                       push(@headerContent, "        virtual bool put(KJS::ExecState *exec, " .
+                                                                "const KJS::Identifier &propertyName, KJS::ValueImp *value, int attr);\n\n");
+               } else {
+                       push(@headerContent, "        bool putInParents(KJS::ExecState *exec, " .
+                                                                "const KJS::Identifier &propertyName, KJS::ValueImp *value, int attr);\n\n");
+               };
        }
 
-       push(@headerContent, "\t\tKJS::ObjectImp *prototype(KJS::ExecState *exec) const;\n\n");
-       push(@headerContent, "\t\tKJS::ObjectImp *bridge(KJS::ExecState *exec) const;\n");
+       push(@headerContent, "        KJS::ObjectImp *prototype(KJS::ExecState *exec) const;\n\n");
+       push(@headerContent, "        KJS::ObjectImp *bridge(KJS::ExecState *exec) const;\n");
 
        my $cacheVirtual = ""; # 'cache' must be virtual for baseclasses...
        $cacheVirtual = "virtual " if($parentsMax eq 0);
 
-       push(@headerContent, "\t\t${cacheVirtual}KJS::ValueImp *cache(KJS::ExecState *exec) const;\n\n");
+       push(@headerContent, "        ${cacheVirtual}KJS::ValueImp *cache(KJS::ExecState *exec) const;\n\n");
 
-       push(@headerContent, "\t\tstatic const KJS::ClassInfo s_classInfo;\n");
-       push(@headerContent, "\t\tstatic const struct KJS::HashTable s_hashTable;\n\n");
+       push(@headerContent, "        static const KJS::ClassInfo s_classInfo;\n");
+       push(@headerContent, "        static const struct KJS::HashTable s_hashTable;\n\n");
 
        # - Add all attributes
        my $attributesMax = @{$dataNode->attributes};
        my $functionsMax = @{$dataNode->functions};
 
-       push(@headerContent, "\t\tenum\n\t\t{\n\t\t\t// Attributes\n\t\t\t");
+       push(@headerContent, "        enum\n        {\n            // Attributes\n            ");
 
        if($attributesMax eq 0) {
                push(@headerContent, "Dummy");
@@ -256,7 +277,7 @@ sub GenerateHeader
 
                $i++;
                if((($i % 2) eq 0) and ($i ne 0)) {
-                       push(@headerContent, "\n\t\t\t");
+                       push(@headerContent, "\n            ");
                }
 
                my $value = ucfirst($attribute->signature->name);
@@ -267,7 +288,7 @@ sub GenerateHeader
 
        # - Add all functions
        if($functionsMax > 0) {
-               push(@headerContent, "\n\n\t\t\t// Functions\n\t\t\t");
+               push(@headerContent, "\n\n            // Functions\n            ");
        }
 
        $i = -1;
@@ -276,7 +297,7 @@ sub GenerateHeader
 
                $i++;
                if((($i % 2) eq 0) and ($i ne 0)) {
-                       push(@headerContent, "\n\t\t\t");
+                       push(@headerContent, "\n            ");
                }
 
                my $value = ucfirst($function->signature->name);
@@ -284,19 +305,22 @@ sub GenerateHeader
                push(@headerContent, $value);
        }
 
-       push(@headerContent, "\n\t\t};\n");
+       push(@headerContent, "\n        };\n");
 
        # - Add getValueProperty function
-       push(@headerContent, "\n\t\tKJS::ValueImp *getValueProperty(KJS::ExecState *exec, int token) const;\n");
+       push(@headerContent, "\n        KJS::ValueImp *getValueProperty(KJS::ExecState *exec, int token) const;\n");
 
        # - Add putValueProperty function, if we have any writable attributes...
        if($hasReadWriteProperties eq 1) {
-               push(@headerContent, "\t\tvoid putValueProperty(KJS::ExecState *exec, int token, " .
+               push(@headerContent, "        void putValueProperty(KJS::ExecState *exec, int token, " .
                                                         "KJS::ValueImp *value, int attr);\n");
        }
 
+       # - Add 'impl' accessor
+       push(@headerContent, "\n        $implClass *impl() const { return m_impl; }\n");
+
        # - Add 'private' section to store impl ptr...
-       push(@headerContent, "\n\tprivate:\n\t\t$implClass *m_impl;\n\t};");
+       push(@headerContent, "\n    private:\n        $implClass *m_impl;\n    };");
 
        # End header...
        my @namespaces = @{$codeGenerator->SplitNamespaces($useModuleNS)};
@@ -309,8 +333,15 @@ sub GenerateHeader
                        $toId =~ s/Wrapper$//;
 
                        $addedTo = 1;
-                       push(@headerContent, "\n\n\t$implClass *$toId(KJS::ExecState *exec, " .
-                                                                "const KJS::ObjectImp *bridge);")
+                       push(@headerContent, "\n\n    $implClass *$toId(KJS::ExecState *exec, " .
+                                                                "const KJS::ObjectImp *bridge);");
+
+                       # - Add 'constructor' macro if necessary...
+                       my $constantsMax = @{$dataNode->constants};
+                       if($constantsMax > 0) {
+                               my $type = $extractedType{'type'}; $type =~ s/Wrapper$/Constructor/;
+                               push(@headerContent, "\n\n    ECMA_DEFINE_CONSTRUCTOR($type)");
+                       }
                }
 
                push(@headerContent, "\n};\n");
@@ -340,12 +371,43 @@ sub GenerateImplementation
 
                # - Add absolutely needed includes
                push(@implContent, "\n#include \"" . $extractedType{'type'} . ".h\"");
-               push(@implContent, "\n#include \"$implClass.h\"\n");
+
+               my $useClass = $implClass;
+               if($useClass =~ /^.*AbsImpl$/) { # Special cases for SVG generation!
+                       $useClass =~ s/AbsImpl/Impl/; # it's 'SVGPathSegArcImpl' not 'SVGPathSegArcAbsImpl'
+               } elsif($useClass =~ /^.*RelImpl$/) {
+                       $useClass =~ s/RelImpl/Impl/; # it's 'SVGPathSegArcImpl' not 'SVGPathSegArcRelImpl'
+               }
+
+               push(@implContent, "\n#include \"$useClass.h\"\n");
+
+               my $constantsMax = @{$dataNode->constants};
+               if($constantsMax > 0) {
+                       my $useType = lcfirst($useModule);
+                       if($useModuleNS =~ /KDOM/) {
+                               if($useModule ne "core") {
+                                       push(@implContent, "\n#include \"kdom/$useModule/kdom$useType.h\"");
+                               } else {
+                                       push(@implContent, "\n#include \"kdom.h\"");
+                               }
+                       } else {
+                               $useType = $useModuleNS; $useType =~ tr/A-Z/a-z/;
+                               push(@implContent, "\n#include \"$useType.h\"");
+                       }
+               }
 
                push(@implContent, "\n#include <kdom/ecma/Ecma.h>");
-               push(@implContent, "\n#include <kdom/ecma/DOMBridge.h>");
-               push(@implContent, "\n#include <kdom/ecma/DOMLookup.h>\n");
-               push(@implContent, "\n#include \"DOMExceptionImpl.h\"\n\n");
+
+               if($useLayerOnTop eq 0) {
+                       push(@implContent, "\n#include <kdom/ecma/EcmaInterface.h>");
+               } elsif($useModule eq "svg") { # Special case for ksvg...
+                       push(@implContent, "\n#include <ksvg2/ecma/EcmaInterface.h>");
+               }
+
+               push(@implContent, "\n#include <kdom/ecma/DOMBridge.h>\n\n");
+
+               # - Add placeholder to be replaced with needed exception includes, later.
+               push(@implContent, "#FIXUP_EXCEPTIONS#");
 
                # - Add placeholder to be replaced with needed includes, later.
                push(@implContent, "#FIXUP_INCLUDES#");
@@ -378,6 +440,17 @@ sub GenerateImplementation
                }
        }
 
+       # - Determines wheter any of our parents has any readwrite props...
+       my $hasParentReadWriteProperties = 0;
+       foreach(@{$dataNode->parents}) {
+               my %ret = $codeGenerator->ExtractNamespace($_, 1, $useModuleNS);
+
+               # Skip classes which don't define any writable attributes...
+               if($codeGenerator->ClassHasWriteableAttributes($ret{'type'}) eq 1) {
+                       $hasParentReadWriteProperties = 1;
+               }
+       }
+
        # - Add default ctor / impl ctor / copy ctor & destructor
        my $ctorString = " : m_impl(impl)";
 
@@ -399,6 +472,12 @@ sub GenerateImplementation
 
        push(@implContent, $extractedType{'type'} . "::~" . $extractedType{'type'} . "()\n{\n}\n\n");
 
+       my $inheritedType = $extractedType{'type'};
+       $inheritedType =~ s/Wrapper$//;
+
+       my $showTypeNS = $useModuleNS;
+       $showTypeNS =~ s/([A-Z]*)[A-Za-z:]*/$1/g;
+
        # - Add all attributes in a hashtable definition
        my $attributesMax = @{$dataNode->attributes};
        my $hashSize = $attributesMax;
@@ -478,34 +557,66 @@ sub GenerateImplementation
                                                                   \@hashSpecials, \@hashParameters);
        }
 
+       # - Add all constants in a hashtable definition, if we have any.
+       my $constantsMax = @{$dataNode->constants};
+       if($constantsMax ne 0) {
+               $hashSize = $constantsMax;
+               $hashName = $dataNode->name . "Constructor::s_hashTable";
+
+               @hashKeys = ();
+               @hashValues = ();
+               @hashSpecials = ();
+               @hashParameters = ();
+
+               foreach(@{$dataNode->constants}) {
+                       my $constant = $_;
+
+                       my $name = $constant->name;
+                       push(@hashKeys, $name);
+               
+                       my $value = $useModuleNS . "::" . $name;
+                       push(@hashValues, $value);
+
+                       my $special = "KJS::DontDelete|KJS::ReadOnly";
+                       push(@hashSpecials, $special);
+
+                       my $parameters = "0";
+                       push(@hashParameters, $parameters);
+               }
+
+               $object->GenerateHashTable($hashName, $hashSize,
+                                                                  \@hashKeys, \@hashValues,
+                                                                  \@hashSpecials, \@hashParameters);
+       }
+
        # - Add 'classInfo' function (always needed!)
        push(@implContent, "/* Standard ecma functions */\n" .
                                           "const KJS::ClassInfo *" . $extractedType{'type'} . "::" .
-                                          "classInfo() const\n{\n\treturn &s_classInfo;\n}\n\n");
+                                          "classInfo() const\n{\n    return &s_classInfo;\n}\n\n");
 
        # - Add 'toString' function (always needed!)
        push(@implContent, "KJS::UString " . $extractedType{'type'} . "::" .
-                                          "toString(KJS::ExecState *) const\n{\n\treturn " .
-                                          "KJS::UString(\"[object \" + QString::fromLatin1(" .
+                                          "toString(KJS::ExecState *) const\n{\n    return " .
+                                          "KJS::UString(QString::fromLatin1(\"[object \") + QString::fromLatin1(" .
                                           $extractedType{'type'} . "::s_classInfo.className) " .
-                                          "+ \"]\");\n}\n\n");
+                                          "+ QString::fromLatin1(\"]\"));\n}\n\n");
 
        # - Add 'hasProperty' function (always needed!)
        push(@implContent, "bool " . $extractedType{'type'} . "::hasProperty(" .
                                           "KJS::ExecState *exec, const KJS::Identifier &propertyName) const\n{\n" .
-                                          "\tconst KJS::HashEntry *e = KJS::Lookup::findEntry(&" . $extractedType{'type'} .
-                                          "::s_hashTable, propertyName);\n\tif(e)\n\t\treturn true;\n");
+                                          "    const KJS::HashEntry *e = KJS::Lookup::findEntry(&" . $extractedType{'type'} .
+                                          "::s_hashTable, propertyName);\n    if(e)\n        return true;\n");
 
        if(($parentsMax eq 0) and ($functionsMax eq 0)) {
-               push(@implContent, "\n\tQ_UNUSED(exec);\n");
+               push(@implContent, "\n    Q_UNUSED(exec);\n");
        } else {
                if($functionsMax ne 0) {
                        my $classIdentifier = $extractedType{'type'};
                        $classIdentifier =~ s/Wrapper$//;
 
-                       push(@implContent, "\n\tKJS::ObjectImp *proto = ${classIdentifier}WrapperProto::self(" .
-                                                          "exec);\n\tif(proto->hasProperty(exec, propertyName))\n" .
-                                                          "\t\treturn true;\n");
+                       push(@implContent, "\n    KJS::ObjectImp *proto = ${classIdentifier}WrapperProto::self(" .
+                                                          "exec);\n    if(proto->hasProperty(exec, propertyName))\n" .
+                                                          "        return true;\n");
                }
 
                if($parentsMax ne 0) {
@@ -519,25 +630,58 @@ sub GenerateImplementation
                                        $parentIdentifier = $ret{'type'} . "Wrapper";
                                }
 
-                       push(@implContent, "\n\tif(${parentIdentifier}::hasProperty(exec, " .
-                                                                  "propertyName))\n\t\treturn true;\n");
+                       push(@implContent, "\n    if(${parentIdentifier}::hasProperty(exec, " .
+                                                                  "propertyName))\n        return true;\n");
                        }
 
                        push(@implContent, "\n");
                }
        }
 
-       push(@implContent, "\treturn false;\n}\n\n");
+       # These are special cases to support [] indexing on them (no way to determine from IDL :/)
+       my $itemType = "";
+       my $isIndexable = $object->IsIndexableClass($extractedType{'type'}, \$itemType);
+       
+       if($isIndexable eq 1) {
+               push(@implContent, "\n    bool ok;");
+               push(@implContent, "\n    unsigned int i = propertyName.toArrayIndex(&ok);");
+               push(@implContent, "\n    if(ok && i < m_impl->length())\n        return true;\n\n");
+       }
+
+       push(@implContent, "    return false;\n}\n\n");
 
        # - Add 'get' function (always needed!)
        push(@implContent, "KJS::ValueImp *" . $extractedType{'type'} . "::get(KJS::ExecState *exec, " .
-                                          "const KJS::Identifier &propertyName, const KJS::ObjectImp *bridge) const\n");
+                                          "const KJS::Identifier &propertyName, const KJS::ObjectImp *bridge) const\n{");
+
+       # These are special cases to support [] indexing on them (no way to determine from IDL :/)
+       if($isIndexable eq 1) {
+               push(@implContent, "\n    bool ok;");
+               push(@implContent, "\n    unsigned int i = propertyName.toArrayIndex(&ok);");
+
+               push(@implContent, "\n    if(ok && i < m_impl->length())\n        return ");
 
+               if(($extractedType{"type"} eq "CSSStyleDeclarationWrapper") or ($extractedType{"type"} eq "MediaListWrapper")) {
+                       push(@implContent, "getDOMString(m_impl->item(i));\n");
+               } else {
+                       if(($extractedType{"type"} eq "NodeListWrapper") or ($extractedType{"type"} eq "NamedNodeMapWrapper")) {
+                               push(@implContent, "getDOMNode(exec, m_impl->item(i));\n");
+                       } else {
+                               push(@implContent, "safe_cache\<${itemType}Impl, ${itemType}Wrapper\>(exec, m_impl->item(i));\n");
+                       }
+               }
+       }
+
+       my $showNS = "";
+       if($useModuleNS !~ /KDOM/) {
+               $showNS = "KDOM::";
+       }
+       
        if($functionsMax eq 0) {
-               push(@implContent, "{\n\treturn lookupGetValue<" . $extractedType{'type'} . ">(exec, " .
+               push(@implContent, "\n    return ${showNS}lookupGetValue<" . $extractedType{'type'} . ">(exec, " .
                                                   "propertyName, &s_hashTable, this, bridge);\n}\n\n");
        } else {
-               push(@implContent, "{\n\treturn lookupGet<" . $extractedType{'type'} . "ProtoFunc, " .
+               push(@implContent, "\n    return ${showNS}lookupGet<" . $extractedType{'type'} . "ProtoFunc, " .
                                                   $extractedType{'type'} . ">(exec, propertyName, &s_hashTable, this, bridge);\n}\n\n");
        }
 
@@ -548,8 +692,8 @@ sub GenerateImplementation
        my $paramsUsed = 0;
 
        if($functionsMax ne 0) {
-               push(@implContent, "\tKJS::ObjectImp *proto = " . $extractedType{'type'} . "Proto::self(exec);\n" .
-                                                  "\tif(proto->hasProperty(exec, propertyName))\n\t\t" .
+               push(@implContent, "    KJS::ObjectImp *proto = " . $extractedType{'type'} . "Proto::self(exec);\n" .
+                                                  "    if(proto->hasProperty(exec, propertyName))\n        " .
                                                   "return proto->get(exec, propertyName);\n\n");
 
                $paramsUsed = 1;
@@ -566,7 +710,7 @@ sub GenerateImplementation
                                $parentIdentifier = $ret{'type'} . "Wrapper";
                        }
 
-                       push(@implContent, "\tif(${parentIdentifier}::hasProperty(exec, propertyName))\n\t\t" .
+                       push(@implContent, "    if(${parentIdentifier}::hasProperty(exec, propertyName))\n        " .
                                                           "return ${parentIdentifier}::get(exec, propertyName, bridge);\n\n");
                }
 
@@ -574,21 +718,27 @@ sub GenerateImplementation
        }
 
        if($paramsUsed eq 0) {
-               push(@implContent, "\tQ_UNUSED(exec); Q_UNUSED(propertyName); Q_UNUSED(bridge);\n");
+               push(@implContent, "    Q_UNUSED(exec); Q_UNUSED(propertyName); Q_UNUSED(bridge);\n");
        } elsif($paramsUsed eq 1) {
-               push(@implContent, "\tQ_UNUSED(bridge);\n");
+               push(@implContent, "    Q_UNUSED(bridge);\n");
        }
 
-       push(@implContent, "\treturn KJS::Undefined();\n}\n");
+       push(@implContent, "    return KJS::Undefined();\n}\n");
 
-       # - Add 'put'/'putInParents' functions, if we have writeable properties...
+       # - Add 'put' functions, if we have writeable properties...
        if($hasReadWriteProperties eq 1) {
                push(@implContent, "\nbool " . $extractedType{'type'} . "::put(KJS::ExecState *exec, " .
                                                   "const KJS::Identifier &propertyName, KJS::ValueImp *value, int attr)\n" .
-                                                  "{\n\treturn lookupPut<" . $extractedType{'type'} .">(exec, propertyName, " .
-                                                  "value, attr, &s_hashTable, this);\n}\n\n");
+                                                  "{\n    return ${showNS}lookupPut<" . $extractedType{'type'} .">(exec, propertyName, " .
+                                                  "value, attr, &s_hashTable, this);\n}\n");
+       }
+
+       # - Add 'putInParents' functions, if we have our any of our parents has writeable properties...
+       if(($hasReadWriteProperties eq 1) or ($hasParentReadWriteProperties eq 1)) {
+               my $functionName = "putInParents";
+               $functionName = "put" if($hasReadWriteProperties eq 0);
 
-               push(@implContent, "bool " . $extractedType{'type'} . "::putInParents(KJS::ExecState *exec, " .
+               push(@implContent, "\nbool " . $extractedType{'type'} . "::${functionName}(KJS::ExecState *exec, " .
                                                   "const KJS::Identifier &propertyName, KJS::ValueImp *value, int attr)\n{");
 
                my $generatedAnything = 0;
@@ -609,135 +759,312 @@ sub GenerateImplementation
                                $parentIdentifier = $ret{'type'} . "Wrapper";
                        }
 
-                       push(@implContent, "\n\tif(${parentIdentifier}::hasProperty(exec, " .
-                                                          "propertyName))\n\t{\n\t\t${parentIdentifier}::put(exec, " .
-                                                          "propertyName, value, attr);\n\t\treturn true;\n\t}\n");
+                       push(@implContent, "\n    if(${parentIdentifier}::hasProperty(exec, " .
+                                                          "propertyName))\n    {\n        ${parentIdentifier}::put(exec, " .
+                                                          "propertyName, value, attr);\n        return true;\n    }\n");
 
                        $generatedAnything = 1;
                }
 
                if(($parentsMax eq 0) or ($generatedAnything eq 0)) {
-                       push(@implContent, "\n\tQ_UNUSED(exec);\n\tQ_UNUSED(propertyName);\n" .
-                                                          "\tQ_UNUSED(value);\n\tQ_UNUSED(attr);\n");
+                       push(@implContent, "\n    Q_UNUSED(exec);\n    Q_UNUSED(propertyName);\n" .
+                                                          "    Q_UNUSED(value);\n    Q_UNUSED(attr);\n");
                }
 
                push(@implContent, "\n") if($generatedAnything eq 1);
-               push(@implContent, "\treturn false;\n}\n");
+               push(@implContent, "    return false;\n}\n");
        }
 
        # - Add 'cast' function for JSWrapperProtoFunc classes, if we have functions...
-       my $toId = "to" . ucfirst($extractedType{'type'});
-       $toId =~ s/Wrapper$//;
+       my $toId = "to" . ucfirst($extractedType{'type'}); $toId =~ s/Wrapper$//;
+       my $useType = $extractedType{'type'}; $useType =~ s/Wrapper$//;
 
        if($functionsMax ne 0) {
        push(@implContent, "\n$implClass *" . $extractedType{'type'} . "ProtoFunc::cast(" .
-                                                  "KJS::ExecState *exec, const KJS::ObjectImp *bridge) const\n{\n\t" .
-                                                  "return $useModuleNS" . "::$toId(exec, bridge);\n}\n");
+                                                  "KJS::ExecState *exec, const KJS::ObjectImp *bridge) const\n{" .
+                                                  "\n    return $useModuleNS" . "::$toId(exec, bridge);\n}\n");
        }
 
        # - Add 'prototype' function (always needed!)
        push(@implContent, "\nKJS::ObjectImp *" . $extractedType{'type'} . "::prototype(KJS::ExecState *exec) const");
 
        if($functionsMax eq 0) {
-               push(@implContent, "\n{\n\tif(exec)\n\t\treturn exec->interpreter()->builtinObjectPrototype();");
+               push(@implContent, "\n{\n    if(exec)\n        return exec->interpreter()->builtinObjectPrototype();");
        } else {
-               push(@implContent, "\n{\n\tif(exec)\n\t\treturn " . $extractedType{'type'} . "Proto::self(exec);");
+               push(@implContent, "\n{\n    if(exec)\n        return " . $extractedType{'type'} . "Proto::self(exec);");
        }
                        
        push(@implContent, "\n\n\treturn NULL;\n}\n");
 
        # - Add 'bridge' function (always needed!)
-       my $useBridge = "DOMBridge";
-       $useBridge = "DOMRWBridge" if($hasReadWriteProperties eq 1);
+       my $useBridge = "${showNS}DOMBridge";
+       $useBridge = "${showNS}DOMRWBridge" if(($hasReadWriteProperties eq 1) or($hasParentReadWriteProperties eq 1));
 
        push(@implContent, "\nKJS::ObjectImp *" . $extractedType{'type'} . "::bridge(" .
-                                          "KJS::ExecState *exec) const\n{\n\treturn new " .
+                                          "KJS::ExecState *exec) const\n{\n    return new " .
                                           "$useBridge<" . $extractedType{'type'} . ", $implClass>(" .
                                           "exec, m_impl);\n}\n");
 
        # - Add 'cache' function (always needed!)
-       push(@implContent, "\nKJS::ValueImp *" . $extractedType{'type'} . "::cache(KJS::ExecState *exec) const\n{\n\t" .
-                                          "return cacheDOMObject<" . $extractedType{'type'} . ", $implClass>(exec, this);\n}\n");
+       push(@implContent, "\nKJS::ValueImp *" . $extractedType{'type'} . "::cache(KJS::ExecState *exec) const\n{\n    " .
+                                          "return ${showNS}cacheDOMObject<" . $extractedType{'type'} . ", $implClass>(exec, this);\n}\n");
 
        # - Add 'to...' function (always needed!)
-       # TODO: implement stub!
        push(@implContent, "\n$implClass *" . $useModuleNS . "::$toId(KJS::ExecState *" .
-                                          "exec, const KJS::ObjectImp *bridge)\n{\n\t");
+                                          "exec, const KJS::ObjectImp *bridge)\n{");
+
+       my $useClass = $extractedType{'type'}; $useClass =~ s/Wrapper$//;
+
+       my @classList = @{$codeGenerator->AllClassesWhichInheritFrom($useClass)};
+       push(@classList, $useClass);
+
+       my %hash = %{$codeGenerator->ModuleNamespaceHash()};
+
+       foreach(@classList) {
+               my %classType = $codeGenerator->ExtractNamespace($_, 0, $useModuleNS);
 
-       push(@implContent, "\n\treturn 0;\n}\n");
+               my $type = $classType{'type'};
+               my $module = $classType{'namespace'};
+               my $moduleNS = $hash{$module};
+
+               if("${type}Wrapper" ne $extractedType{'type'}) { # Don't include ourselves twice...
+                       push(@neededIncludes, "${type}Impl");
+
+                       if(($module ne "") and ($module ne $useModule)) {
+                               push(@neededIncludes, "$module/${type}Wrapper");
+                               $type = $moduleNS . "::$type"; # Fix namespace.
+                       } else {
+                               push(@neededIncludes, "${type}Wrapper");
+                       }
+               }
+
+               my $bridge = "const ${showNS}DOMBridge<${type}Wrapper, ${type}Impl>";
+               push(@implContent, "\n    { $bridge *test = dynamic_cast<$bridge *>(bridge);" .
+                                                  "\n      if(test) return test->wrapper()->impl(); }");
+       }
+
+       if($useLayerOnTop eq 0) {
+               push(@implContent, "\n\n    ${showNS}ScriptInterpreter *interpreter = " .
+                                                  "static_cast<${showNS}ScriptInterpreter *>(exec" .
+                                                  "->interpreter());\n    ${showNS}DocumentImpl *document = " .
+                                                  "(interpreter ? interpreter->document() : 0);\n    ${showNS}Ecma" .
+                                                  " *engine = (document ? document->ecmaEngine() : 0);\n    " .
+                                                  "${showNS}EcmaInterface *interface = (engine ? engine->interface() : 0);" .
+                                                  "\n\n    if(!interface)\n        return 0;\n\n    return " .
+                                                  "interface->inherited${useType}Cast(bridge);\n}\n");
+       } else {
+               push(@implContent, "\n\n    Q_UNUSED(exec);\n    return 0;\n}\n");
+       }
+
+       my @exceptions;                 # Exceptions used in get (/ put) / call.
+       my $exceptionsMax = 0;
 
        # - Add 'getValueProperty' function (always needed!)
-       # TODO: catch exceptions!
-       push(@implContent, "\nKJS::ValueImp *" . $extractedType{'type'} . "::getValueProperty(KJS::ExecState *exec" .
-                                          ", int token) const\n{\n\tswitch(token)\n\t{");
+       push(@implContent, "\nKJS::ValueImp *" . $extractedType{'type'} . "::getValueProperty(" .
+                                          "KJS::ExecState *exec, int token) const\n{");
 
        my $execUsed = 0;
+       my $attributeString = "";
        foreach(@{$dataNode->attributes}) {
                my $attribute = $_;
 
+               my $exceptionsCount = @{$attribute->raisesExceptions};
+               if($exceptionsCount > $exceptionsMax) {
+                       $exceptionsMax = $exceptionsCount;
+               }
+
+               foreach(@{$attribute->raisesExceptions}) {
+                       my @array = grep { /${_}$/ } @exceptions;
+                       my $arraySize = @array;
+                       push(@exceptions, $_) if($arraySize eq 0);
+               }
+
                my %paramType = $codeGenerator->ExtractNamespace($attribute->signature->type, 0, $useModuleNS);
+               $paramType{'paramName'} = "m_impl->" . $attribute->signature->name . "()";
 
                my $name = $attribute->signature->name;
                my $value = $extractedType{'type'} . "::" . ucfirst($name);
 
                my $returnValue = $object->TypeToEcma($name, \%paramType, 0);
                $execUsed = 1 if($returnValue =~ /exec/);
-               push(@implContent, "\n\t\tcase $value:\n\t\t\t$returnValue");
+
+               $attributeString .= "\n        case $value:\n            $returnValue";
        }
 
-       push(@implContent, "\n\t\tdefault:\n\t\t\tkdWarning() << \"Unhandled token in" .
-                                          " \" << k_funcinfo << \" : \" << token << endl;\n\t}\n");
+       push(@implContent, "\n    KDOM_ENTER_SAFE\n") if($exceptionsMax ne 0);
+       push(@implContent, "\n    switch(token)\n    {$attributeString");
+       push(@implContent, "\n        default:\n            kdWarning() << \"Unhandled token in" .
+                                          " \" << k_funcinfo << \" : \" << token << endl;\n    }\n");
 
-       push(@implContent, "\n\tQ_UNUSED(exec);") if($execUsed eq 0);
-       push(@implContent, "\n\treturn KJS::Undefined();\n}\n");
+       my $count = 0;
+       foreach(@exceptions) {
+               my %exceptionType = $codeGenerator->ExtractNamespace($_, 1, $useModuleNS);
+
+               my $flag = ""; $flag = "_NEXT" if($count ne 0);
+               my $type = $exceptionType{'namespace'} . "::" . $exceptionType{'type'};
+               push(@implContent, "\n    KDOM_LEAVE_SAFE$flag($type);");
+
+               $count++;
+       }
+
+       push(@implContent, "\n    Q_UNUSED(exec);") if(($execUsed eq 0) and ($count eq 0));
+       push(@implContent, "\n    return KJS::Undefined();\n}\n");
 
        # - Add 'putValueProperty' function, if we have writeable attributes...
-       # TODO: catch exceptions!
        if($hasReadWriteProperties eq 1) {
                push(@implContent, "\nvoid " . $extractedType{'type'} . "::putValueProperty(KJS::ExecState *exec" .
-                                                  ", int token, KJS::ValueImp *value, int)\n{\n\tswitch(token)\n\t{");
+                                                  ", int token, KJS::ValueImp *value, int)\n{");
 
+               my $attributeString = "";
                foreach(@{$dataNode->attributes}) {
                        my $attribute = $_;
 
                        if($attribute->type !~ /^readonly\ attribute$/) {
                                my %paramType = $codeGenerator->ExtractNamespace($attribute->signature->type, 0, $useModuleNS);
-
+                               $paramType{'paramName'} = "value";
+       
                                my $name = $attribute->signature->name;
                                my $value = $extractedType{'type'} . "::" . ucfirst($name);
 
                                my $returnValue = $object->TypeToEcma("set" . ucfirst($name), \%paramType, 1);
-                               push(@implContent, "\n\t\tcase $value:\n\t\t{\n\t\t\t$returnValue\n\t\t}");
+                               $attributeString .= "\n        case $value:\n        {\n            $returnValue\n        }";
                        }
                }
 
-               push(@implContent, "\n\t\tdefault:\n\t\t\tkdWarning() << \"Unhandled token in" .
-                                                  " \" << k_funcinfo << \" : \" << token << endl;\n\t}\n}\n");
+               push(@implContent, "\n    KDOM_ENTER_SAFE\n") if($exceptionsMax ne 0);
+               push(@implContent, "\n    switch(token)\n    {$attributeString");
+               push(@implContent, "\n        default:\n            kdWarning() << \"Unhandled token in" .
+                                                  " \" << k_funcinfo << \" : \" << token << endl;\n    }\n");
+
+               my $count = 0;
+               foreach(@exceptions) {
+                       my %exceptionType = $codeGenerator->ExtractNamespace($_, 1, $useModuleNS);
+
+                       my $flag = ""; $flag = "_NEXT" if($count ne 0);
+                       my $type = $exceptionType{'namespace'} . "::" . $exceptionType{'type'};
+                       push(@implContent, "\n    KDOM_LEAVE_SAFE$flag($type);");
+
+                       $count++;
+               }
+
+               push(@implContent, "\n") if($count ne 0);
+               push(@implContent, "}\n");
        }
 
        # - Add 'call' function, if we have have functions...
-       # TODO: implement the stub! (KDOM_CHECK_THIS, KDOM_ENTER/LEAVE_SAFE, switch(id) content)
        if($functionsMax ne 0) {
-               push(@implContent, "\nKJS::ValueImp *" . $extractedType{'type'} . "ProtoFunc::callAsFunction(KJS::ExecState * /* exec */" .
-                                                  ", KJS::ObjectImp * /* thisObj */, const KJS::List & /* args */)\n{\n\t" .
-                                                  "switch(id)\n\t{\n\t\t");
+               push(@implContent, "\nKJS::ValueImp *" . $extractedType{'type'} . "ProtoFunc::callAsFunction(KJS::ExecState *exec" .
+                                                  ", KJS::ObjectImp *thisObj, const KJS::List &args)\n{\n    KDOM_CHECK_THIS(" .
+                                                  "$implClass, " . $extractedType{'type'} . ")\n");
+
+               my $argsUsed = 0;
+
+               my $functionString = "";
+               foreach(@{$dataNode->functions}) {
+                       my $function = $_;
+
+                       my $exceptionsCount = @{$function->raisesExceptions};
+                       if($exceptionsCount > $exceptionsMax) {
+                               $exceptionsMax = $exceptionsCount;
+                       }
+
+                       foreach(@{$function->raisesExceptions}) {
+                               my @array = grep { /${_}$/ } @exceptions;
+                               my $arraySize = @array;
+                               push(@exceptions, $_) if($arraySize eq 0);
+                       }
+
+                       my $parametersMax = @{$function->parameters};
+                       my $parameterString = "";
+
+                       $functionString .= "\n        case " . $extractedType{'type'} . "::" .
+                                                          ucfirst($function->signature->name) . ":\n        {";
+
+                       my $i = 0;
+                       foreach(@{$function->parameters}) {
+                               my $parameter = $_;
+
+                               my %paramType = $codeGenerator->ExtractNamespace($parameter->type, 0, $useModuleNS);
+                               $paramType{'paramName'} = "args[$i]"; $i++;
+
+                               my $returnValue = $object->TypeToEcma($parameter->name, \%paramType, 2);
+                               $functionString .= "\n            $returnValue";
+
+                               $parameterString .= $parameter->name;
+                               $parameterString .= ", " if($i < $parametersMax);
+                       }
+
+                       $argsUsed = 1 if($i ne 0);
+                       $functionString .= "\n" if($parametersMax > 1);
+
+                       my %functionType = $codeGenerator->ExtractNamespace($function->signature->type, 0, $useModuleNS);
+                       $functionType{'paramName'} = "obj->" . $function->signature->name . "($parameterString)";
+
+                       my $returnValue = $object->TypeToEcma($function->signature->name, \%functionType, 0);
+                       $functionString .= "\n            $returnValue\n        }";
+               }
+
+               push(@implContent, "    KDOM_ENTER_SAFE\n") if($exceptionsMax ne 0);
+               push(@implContent, "\n    switch(id)\n    {$functionString");
+               push(@implContent, "\n        default:\n            kdWarning() << \"Unhandled function id in \" " .
+                                                  "<< k_funcinfo << \" : \" << id << endl;\n    }\n");
+
+               my $count = 0;
+               foreach(@exceptions) {
+                       my %exceptionType = $codeGenerator->ExtractNamespace($_, 1, $useModuleNS);
+
+                       my $flag = ""; $flag = "_NEXT" if($count ne 0);
+                       my $type = $exceptionType{'namespace'} . "::" . $exceptionType{'type'};
+                       push(@implContent, "\n    KDOM_LEAVE_CALL_SAFE$flag($type);");
+
+                       $count++;
+               }
 
-               push(@implContent, "default:\n\t\t\tkdWarning() << \"Unhandled function id in \" " .
-                                                  "<< k_funcinfo << \" : \" << id << endl;\n\t\t\tbreak;\n\t}\n\n\t" .
-                                                  "return KJS::Undefined();\n}\n");
+               push(@implContent, "\n    Q_UNUSED(args);") if($argsUsed eq 0);
+               push(@implContent, "\n    return KJS::Undefined();\n}\n");
        }
 
+       # Prepare exception fixup string...
+       my $fixupExceptionString = "";
+       foreach(@exceptions) {
+               my %exceptionTypeUnprocessed = $codeGenerator->ExtractNamespace($_, 0, $useModuleNS);
+               my $namespace = $exceptionTypeUnprocessed{'namespace'};
+               $namespace = $useModule if($namespace eq "");
+
+               my %exceptionType = $codeGenerator->ExtractNamespace($_, 1, $useModuleNS);
+               $fixupExceptionString .= "#include \"" . $exceptionType{'type'} . "Impl.h\"\n";
+
+               my $cmpType = $exceptionType{'type'} . "Wrapper";
+               if($extractedType{'type'} ne $cmpType) {
+                       $fixupExceptionString .= "\n#include <kdom/bindings/js/$namespace/${cmpType}.h>\n";
+               }
+       }
+
+       $fixupExceptionString .= "\n" if($fixupExceptionString ne "");
+
        # ... and apply fixups!
        my $tempData = join("@", @implContent);
 
        my $fixupString = "";
+
+       @neededIncludes = sort { length $a <=> length $b } @neededIncludes;
        foreach(@neededIncludes) {
-               $fixupString .= "#include \"${_}.h\"\n";
+               my $useClass = $_;
+
+               if($useClass =~ /^.*AbsImpl$/) { # Special cases for SVG generation!
+                       $useClass =~ s/AbsImpl/Impl/; # it's 'SVGPathSegArcImpl' not 'SVGPathSegArcAbsImpl'
+               } elsif($useClass =~ /^.*RelImpl$/) {
+                       $useClass =~ s/RelImpl/Impl/; # it's 'SVGPathSegArcImpl' not 'SVGPathSegArcRelImpl'
+               }
+
+               $fixupString .= "#include \"${useClass}.h\"\n";
        }
 
        $fixupString .= "\n" if($fixupString ne "");
 
        $tempData =~ s/#FIXUP_INCLUDES#/$fixupString/;
+       $tempData =~ s/#FIXUP_EXCEPTIONS#/$fixupExceptionString/;
+
        @implContent = split("@", $tempData);
 }
 
@@ -799,21 +1126,33 @@ sub GenerateHashTable
 
        # first, build the string table
        my %soffset = ();
-       if($name =~ /Proto\:\:/) { # Define prototype first...
-               my $type = $name; $type =~ s/Proto\:\:.*//;
-               my $implClass = $type; $implClass =~ s/Wrapper$/Impl/;
-
-               push(@implContent, "/* Hash table for prototype */");
-
+       if(($name =~ /Proto\:\:/) or ($name =~ /Constructor\:\:/)) {
+               my $type = $name;
+               my $implClass;
+
+               if($name =~ /Proto\:\:/) {
+                       $type =~ s/Proto\:\:.*//;
+                       $implClass = $type; $implClass =~ s/Wrapper$//;
+                       push(@implContent, "/* Hash table for prototype */");
+               } else {
+                       $type =~ s/\:\:.*//;
+                       $implClass = $type; $implClass =~ s/Constructor$//;
+                       push(@implContent, "/* Hash table for constructor */");
+               }
+                       
                my @namespaces = @{$codeGenerator->SplitNamespaces($useModuleNS)};
 
                foreach(@namespaces) {
                        push(@implContent, "\nnamespace $_\n{\n");
                }
 
-               push(@implContent, "\tECMA_DEFINE_PROTOTYPE(${type}Proto)\n");
-               push(@implContent, "\tECMA_IMPLEMENT_PROTOFUNC(${type}ProtoFunc, $type, $implClass)\n");
-               push(@implContent, "\tECMA_IMPLEMENT_PROTOTYPE(\"$type\", ${type}Proto, ${type}ProtoFunc)");
+               if($name =~ /Proto\:\:/) {
+                       push(@implContent, "    ECMA_DEFINE_PROTOTYPE(${type}Proto)\n");
+                       push(@implContent, "    ECMA_IMPLEMENT_PROTOFUNC(${type}ProtoFunc, $type, ${implClass}Impl)\n");
+                       push(@implContent, "    ECMA_IMPLEMENT_PROTOTYPE(\"$type\", ${type}Proto, ${type}ProtoFunc)");
+               } else {
+                       push(@implContent, "    ECMA_IMPLEMENT_CONSTRUCTOR($type, \"${implClass}\")");
+               }
 
                foreach(@namespaces) {
                        push(@implContent, "\n};\n");
@@ -877,7 +1216,8 @@ sub GenerateHashTable
 
        push(@implContent, "};\n\n");
        push(@implContent, "const struct KJS::HashTable $name =\n");
-       push(@implContent, "{\n\t2, $size, $nameEntries, $savedSize, $nameStringTable\n};\n\n");
+#      push(@implContent, "{\n    2, $size, $nameEntries, $savedSize, $nameStringTable\n};\n\n");
+       push(@implContent, "{\n    2, $size, $nameEntries, $savedSize\n};\n\n");
 }
 
 # Internal helper
@@ -903,9 +1243,10 @@ sub TypeToEcma
 
        my $dataName = shift;
        my %dataType = %{$ref = shift};
-       my $inPutMode = shift;
+       my $processMode = shift;
 
        my $type = $dataType{'type'};
+       my $value = $dataType{'paramName'};
        my $module = $dataType{'namespace'};
 
        # Quick'n'dirty replace table.
@@ -917,45 +1258,95 @@ sub TypeToEcma
                $type = "QChar";
        }
 
+       my $showNS = "";
+       if($useModuleNS !~ /KDOM/) {
+               $showNS = "KDOM::";
+       }
+
+       my %hash = %{$codeGenerator->ModuleNamespaceHash()};
+       my $useNS = ($module ne "") ? ($hash{$module} . "::") : "";
+       $useNS = "" if($useNS eq $useModuleNS);
+
        my $includeFile = 0;
 
        my $returnValue;
-       if($inPutMode eq 0) {
+       if($processMode eq 0) { # 'get' mode...
                if($type eq "DOMTimeStamp") { # Known typedef.
-                       $returnValue = "KJS::Number((long unsigned int) ";
+                       $returnValue = "return KJS::Number((long unsigned int) $value);";
                } elsif($type eq "DOMString") {
-                       $returnValue = "getDOMString(";
+                       $returnValue = "return ${showNS}getDOMString($value);";
                } elsif($codeGenerator->IsPrimitiveType($type)) {
                        if($type eq "bool") {
-                               $returnValue = "KJS::Boolean(";
+                               $returnValue = "return KJS::Boolean($value);";
+                       } elsif($type eq "void") {
+                               $returnValue = "$value;\n\n            return KJS::Undefined();";
+                       } else {
+                               $returnValue = "return KJS::Number($value);";
+                       }
+               } else {
+                       if(($type eq "Node") or ($type eq "Element")) {
+                               push(@neededIncludes, "ElementImpl") if($type eq "Element");
+                               $returnValue = "return ${showNS}getDOMNode(exec, $value);";
+                       } elsif($type eq "EventTarget") {
+                               push(@neededIncludes, "EventTargetImpl");
+                               $returnValue = "return ${showNS}getDOMNode(exec, dynamic_cast<NodeImpl *>($value));";
+                       } elsif($type eq "Event") {
+                               $returnValue = "return ${showNS}getDOMEvent(exec, $value);";
+                       } elsif($type eq "CSSRule") {
+                               $returnValue = "return ${showNS}getDOMCSSRule(exec, $value);";
+                       } elsif($type eq "CSSValue") {
+                               $returnValue = "return ${showNS}getDOMCSSValue(exec, $value);";
                        } else {
-                               $returnValue = "KJS::Number(";
+                               $returnValue = "return ${showNS}safe_cache\<${useNS}${type}Impl, ${useNS}${type}Wrapper\>(exec, $value);";
                        }
-               } else { # TODO: - use getDOMNode/getDOMEvent etc...
-                       $returnValue = "safe_cache\<${type}Impl, ${type}Wrapper\>(exec, ";
+
                        $includeFile = 1;
                }
-       
-               $returnValue = "return ${returnValue}m_impl->$dataName());"
-       } else {
+       } elsif(($processMode eq 1) or($processMode eq 2)) { # 'put' or 'call' mode...
                if($type eq "DOMString") {
-                       $returnValue ="toDOMString(exec, value)";
+                       $returnValue ="${showNS}toDOMString(exec, $value)";
                } elsif($codeGenerator->IsPrimitiveType($type)) {
                        if($type eq "bool") {
-                               $returnValue = "value->toBoolean(exec)";
-                       } else { # TODO: - toNumber always correct?
-                               $returnValue = "value->toUInt32(exec)";
+                               $returnValue = "$value->toBoolean(exec)";
+                       } elsif($type eq "int") {
+                               $returnValue = "$value->toInt32(exec)";
+                       } elsif($type eq "unsigned int") {
+                               $returnValue = "$value->toUInt32(exec)";
+                       } elsif($type eq "short") {
+                               $returnValue = "$value->toInt32(exec)";
+                       } elsif($type eq "unsigned short") {
+                               $returnValue = "$value->toUInt16(exec)";
+                       } elsif($type eq "long") {
+                               $returnValue = "$value->toInt32(exec)";
+                       } elsif($type eq "unsigned long") {
+                               $returnValue = "$value->toUInt32(exec)";
+                       } elsif($type eq "float") {
+                               $returnValue = "(float) $value->toNumber(exec)";
+                       } elsif($type eq "double") {
+                               $returnValue = "$value->toNumber(exec)";
                        }
                } else {
-                       $returnValue = "ecma_cast\<${type}Impl\>(exec, value, &to${type})";
+                       $returnValue = "${showNS}ecma_cast\<${useNS}${type}Impl\>(exec, $value, &${useNS}to${type})";
                        $includeFile = 1;
                }
 
-               $returnValue = "m_impl->$dataName($returnValue);\n\t\t\tbreak;"
+               if($processMode eq 1) { # 'put' mode
+                       $returnValue = "m_impl->$dataName($returnValue);\n            break;"
+               } else { # 'call' mode
+                       if($codeGenerator->IsPrimitiveType($type)) {
+                               $returnValue = "${useNS}${type} ${dataName} = $returnValue;";
+                       } else {
+                               $returnValue = "${useNS}${type}Impl *${dataName} = $returnValue;";
+                       }
+               }
        }
 
-       if($includeFile eq 1) {
-               if(($module ne "") and ($module ne $useModuleNS)) {
+       # Only add include, if not yet added...
+       my @array = grep { /${type}Wrapper$/ } @neededIncludes;
+       my $arraySize = @array;
+
+       if(($includeFile eq 1) and ($arraySize eq 0)) {
+               if(($module ne "") and ($module ne $useModule)) {
                        push(@neededIncludes, "$module/${type}Wrapper");
                } else {
                        push(@neededIncludes, "${type}Wrapper");
@@ -970,12 +1361,37 @@ sub TypeToEcma
 }
 
 # Internal helper
+sub IsIndexableClass
+{
+       my $object = shift;
+
+       my $interface = shift;
+       my $itemType = shift;
+
+       # These are special cases to support [] indexing on them (no way to determine from IDL :/)
+       if(($interface eq "NodeListWrapper") or ($interface eq "NamedNodeMapWrapper")) {
+               $$itemType = "Node";
+       } elsif(($interface eq "MediaListWrapper") or ($interface eq "CSSStyleDeclarationWrapper")) {
+               $$itemType = "DOMString";
+       } elsif($interface eq "StyleSheetListWrapper") {
+               $$itemType = "StyleSheet";
+       } elsif($interface eq "CSSRuleListWrapper") {
+               $$itemType = "CSSRule";
+       } elsif($interface eq "CSSValueListWrapper") {
+               $$itemType = "CSSValue";
+       }
+
+       return ($$itemType ne "");
+}
+
+# Internal helper
 sub WriteData
 {
        if(defined($IMPL)) {
                # Write content to file.
                print $IMPL @implContent;
                close($IMPL);
+               undef($IMPL);
 
                @implContent = "";
        }
@@ -984,6 +1400,7 @@ sub WriteData
                # Write content to file.
                print $HEADER @headerContent;
                close($HEADER);
+               undef($HEADER);
 
                @headerContent = "";
        }
index a6190a3..c6fc506 100644 (file)
@@ -15,7 +15,7 @@ module core
        interface Attr : Node {
                readonly attribute DOMString name;
                readonly attribute boolean specified;
-               attribute DOMString value;
+               attribute DOMString value [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                readonly attribute Element ownerElement;
index 1068b56..cc79780 100644 (file)
 module core
 {
        interface CharacterData : Node {
-               attribute DOMString data;
+               attribute DOMString data [raises(DOMException)];
                readonly attribute unsigned long length;
 
                DOMString substringData(in unsigned long offset,
                                                                in unsigned long count)
-                                                               raises(DOMException);
+                                                               [raises(DOMException)];
 
                void appendData(in DOMString arg)
-                                               raises(DOMException);
+                                               [raises(DOMException)];
 
                void insertData(in unsigned long offset,
                                                in DOMString arg)
-                                               raises(DOMException);
+                                               [raises(DOMException)];
 
                void deleteData(in unsigned long offset,
                                                in unsigned long count)
-                                               raises(DOMException);
+                                               [raises(DOMException)];
 
                void replaceData(in unsigned long offset,
                                                 in unsigned long count,
                                                 in DOMString arg)
-                                                raises(DOMException);
+                                                [raises(DOMException)];
        };
 };
index da7f46e..028927d 100644 (file)
@@ -16,10 +16,10 @@ module core
        interface DOMConfiguration {
                void setParameter(in DOMString name,
                                                  in DOMUserData value)
-                                                 raises(DOMException);
+                                                 [raises(DOMException)];
 
                DOMUserData getParameter(in DOMString name)
-                                                                raises(DOMException);
+                                                                [raises(DOMException)];
 
                boolean canSetParameter(in DOMString name,
                                                                in DOMUserData value);
index 7e6e795..015a365 100644 (file)
 
 module core
 {
-       // Exception codes
-       const unsigned short INDEX_SIZE_ERR                                     = 1;
-       const unsigned short DOMSTRING_SIZE_ERR                         = 2;
-       const unsigned short HIERARCHY_REQUEST_ERR                      = 3;
-       const unsigned short WRONG_DOCUMENT_ERR                         = 4;
-       const unsigned short INVALID_CHARACTER_ERR                      = 5;
-       const unsigned short NO_DATA_ALLOWED_ERR                        = 6;
-       const unsigned short NO_MODIFICATION_ALLOWED_ERR        = 7;
-       const unsigned short NOT_FOUND_ERR                                      = 8;
-       const unsigned short NOT_SUPPORTED_ERR                          = 9;
-       const unsigned short INUSE_ATTRIBUTE_ERR                        = 10;
-       const unsigned short INVALID_STATE_ERR                          = 11;
-       const unsigned short SYNTAX_ERR                                         = 12;
-       const unsigned short INVALID_MODIFICATION_ERR           = 13;
-       const unsigned short NAMESPACE_ERR                                      = 14;
-       const unsigned short INVALID_ACCESS_ERR                         = 15;
-       const unsigned short VALIDATION_ERR                                     = 16;
-       const unsigned short TYPE_MISMATCH_ERR                          = 17;
+       interface DOMException {
+               readonly attribute unsigned short code;
 
-       exception DOMException {
-               unsigned short code;
+               // Exception codes
+               const unsigned short INDEX_SIZE_ERR                                     = 1;
+               const unsigned short DOMSTRING_SIZE_ERR                         = 2;
+               const unsigned short HIERARCHY_REQUEST_ERR                      = 3;
+               const unsigned short WRONG_DOCUMENT_ERR                         = 4;
+               const unsigned short INVALID_CHARACTER_ERR                      = 5;
+               const unsigned short NO_DATA_ALLOWED_ERR                        = 6;
+               const unsigned short NO_MODIFICATION_ALLOWED_ERR        = 7;
+               const unsigned short NOT_FOUND_ERR                                      = 8;
+               const unsigned short NOT_SUPPORTED_ERR                          = 9;
+               const unsigned short INUSE_ATTRIBUTE_ERR                        = 10;
+               const unsigned short INVALID_STATE_ERR                          = 11;
+               const unsigned short SYNTAX_ERR                                         = 12;
+               const unsigned short INVALID_MODIFICATION_ERR           = 13;
+               const unsigned short NAMESPACE_ERR                                      = 14;
+               const unsigned short INVALID_ACCESS_ERR                         = 15;
+               const unsigned short VALIDATION_ERR                                     = 16;
+               const unsigned short TYPE_MISMATCH_ERR                          = 17;
        };
 };
index 83310f0..087db8c 100644 (file)
@@ -12,7 +12,7 @@
 
 module core
 {
-       interface [nodptr] DOMImplementation {
+       interface [nodptr] DOMImplementation : ls::DOMImplementationLS {
                boolean hasFeature(in DOMString feature,
                                                   in DOMString version);
 
@@ -20,13 +20,13 @@ module core
                DocumentType createDocumentType(in DOMString qualifiedName,
                                                                                in DOMString publicId,
                                                                                in DOMString systemId)
-                                                                               raises(DOMException);
+                                                                               [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                Document createDocument(in DOMString namespaceURI,
                                                                in DOMString qualifiedName,
                                                                in DocumentType doctype)
-                                                               raises(DOMException);
+                                                               [raises(DOMException)];
 
                // Introduced in DOM Level 3:
                DOMObject getFeature(in DOMString feature,
@@ -34,6 +34,6 @@ module core
 
                // Introduced in DOM Level 2: [specified in seperated DOMImplementationCSS]
                css::CSSStyleSheet createCSSStyleSheet(in DOMString title,
-                                                                                          in DOMString media) raises(DOMException);
+                                                                                          in DOMString media) [raises(DOMException)];
        };
 };
diff --git a/SVGSupport/kdom/bindings/idl/core/DOMImplementationList.idl b/SVGSupport/kdom/bindings/idl/core/DOMImplementationList.idl
deleted file mode 100644 (file)
index fdd2d29..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-module core
-{
-       // Introduced in DOM Level 3:
-       interface DOMImplementationList {
-               DOMImplementation item(in unsigned long index);
-               readonly attribute unsigned long length;
-       };
-};
diff --git a/SVGSupport/kdom/bindings/idl/core/DOMImplementationSource.idl b/SVGSupport/kdom/bindings/idl/core/DOMImplementationSource.idl
deleted file mode 100644 (file)
index dec742b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-module core
-{
-       // Introduced in DOM Level 3:
-       interface DOMImplementationSource {
-               DOMImplementation getDOMImplementation(in DOMString features);
-               DOMImplementationList getDOMImplementationList(in DOMString features);
-       };
-};
diff --git a/SVGSupport/kdom/bindings/idl/core/DOMString.idl b/SVGSupport/kdom/bindings/idl/core/DOMString.idl
deleted file mode 100644 (file)
index f00c6a8..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-module core
-{
-       // TODO: Handle default parameter values! int start = 0 for instance...
-       interface DOMString {
-               readonly attribute unsigned int length;
-
-               void insert(in DOMString string, in unsigned int position);
-               int find(in char c, in int start);
-
-               void truncate(in unsigned int length);
-               void remove(in unsigned int position, in int length);
-
-               DOMString substring(in unsigned int position, in unsigned int length);
-               DOMString split(in unsigned int position);
-
-               readonly attribute DOMString lower;
-               readonly attribute DOMString upper;
-
-               readonly attribute [ptr] char unicode;
-               readonly attribute string string;
-
-               int toInt(in [ptr] boolean ok) const;
-
-               DOMString copy();
-
-               boolean isEmpty();
-       };
-};
-
-// TODO: Handle special constructors!
-// DOMString(const DOMString &other);
-// DOMString(const QChar *string, unsigned int length);
-// DOMString(const QString &string);
-// DOMString(const char *string);
-
-// TODO: Handle special operators!
-// DOMString &operator=(const DOMString &other);
-// DOMString &operator+=(const DOMString &other);
-// DOMString operator+(const DOMString &other) const;
-// const QChar &operator[](unsigned int i) const;
-
-// TODO: Handle special global operators!
-// bool operator==(const DOMString &a, const DOMString &b);
-// bool operator==(const DOMString &a, const QString &b);
-// bool operator==(const DOMString &a, const char *b);
-// bool operator!=(const DOMString &a, const DOMString &b) { return !(a == b); }
-// bool operator!=(const DOMString &a, const QString &b) { return !(a == b); }
-// bool operator!=(const DOMString &a, const char *b) { return !(a == b); }
-// bool strcmp(const DOMString &a, const DOMString &b) { return a != b; }
-
-// TODO: Handle special global functions!
-//     bool strcasecmp(const DOMString &a, const DOMString &b);
-//     bool strcasecmp(const DOMString &a, const char *b);
index 77a2e0a..1134a85 100644 (file)
@@ -27,7 +27,7 @@ module core
                readonly attribute Element documentElement;
                
                Element createElement(in DOMString tagName)
-                               raises(DOMException);
+                               [raises(DOMException)];
 
                DocumentFragment createDocumentFragment();
 
@@ -36,34 +36,34 @@ module core
                Comment createComment(in DOMString data);
 
                CDATASection createCDATASection(in DOMString data)
-                                                                               raises(DOMException);
+                                                                               [raises(DOMException)];
 
                ProcessingInstruction createProcessingInstruction(in DOMString target,
                                                                                                                  in DOMString data)
-                                                                                                                 raises(DOMException);
+                                                                                                                 [raises(DOMException)];
 
                Attr createAttribute(in DOMString name)
-                                                        raises(DOMException);
+                                                        [raises(DOMException)];
 
                EntityReference createEntityReference(in DOMString name)
-                                                                                         raises(DOMException);
+                                                                                         [raises(DOMException)];
 
                NodeList getElementsByTagName(in DOMString tagname);
 
                // Introduced in DOM Level 2:
                Node importNode(in Node importedNode,
                                                in boolean deep)
-                                               raises(DOMException);
+                                               [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                Element createElementNS(in DOMString namespaceURI,
                                                                in DOMString qualifiedName)
-                                                               raises(DOMException);
+                                                               [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                Attr createAttributeNS(in DOMString namespaceURI,
                                                           in DOMString qualifiedName)
-                                                          raises(DOMException);
+                                                          [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                NodeList getElementsByTagNameNS(in DOMString namespaceURI,
@@ -79,10 +79,10 @@ module core
                readonly attribute DOMString xmlEncoding;
 
                // Introduced in DOM Level 3:
-               attribute boolean xmlStandalone;
+               attribute boolean xmlStandalone [raises(DOMException)];
 
                // Introduced in DOM Level 3:
-               attribute DOMString xmlVersion;
+               attribute DOMString xmlVersion [raises(DOMException)];
 
                // Introduced in DOM Level 3:
                attribute boolean strictErrorChecking;
@@ -92,7 +92,7 @@ module core
 
                // Introduced in DOM Level 3:
                Node adoptNode(in Node source)
-                                          raises(DOMException);
+                                          [raises(DOMException)];
 
                // Introduced in DOM Level 3:
                readonly attribute DOMConfiguration domConfig;
@@ -104,6 +104,6 @@ module core
                Node renameNode(in Node n,
                                                in DOMString namespaceURI,
                                                in DOMString qualifiedName)
-                                               raises(DOMException);
+                                               [raises(DOMException)];
        };
 };
index 8806297..b2f8de4 100644 (file)
@@ -19,50 +19,50 @@ module core
 
                void setAttribute(in DOMString name,
                                                  in DOMString value)
-                                                 raises(DOMException);
+                                                 [raises(DOMException)];
 
                void removeAttribute(in DOMString name)
-                                                        raises(DOMException);
+                                                        [raises(DOMException)];
 
                Attr getAttributeNode(in DOMString name);
 
                Attr setAttributeNode(in Attr newAttr)
-                                                         raises(DOMException);
+                                                         [raises(DOMException)];
 
                Attr removeAttributeNode(in Attr oldAttr)
-                                                                raises(DOMException);
+                                                                [raises(DOMException)];
 
                NodeList getElementsByTagName(in DOMString name);
 
                // Introduced in DOM Level 2:
                DOMString getAttributeNS(in DOMString namespaceURI,
                                                                 in DOMString localName)
-                                                                raises(DOMException);
+                                                                [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                void setAttributeNS(in DOMString namespaceURI,
                                                        in DOMString qualifiedName,
                                                        in DOMString value)
-                                                       raises(DOMException);
+                                                       [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                void removeAttributeNS(in DOMString namespaceURI,
                                                           in DOMString localName)
-                                                          raises(DOMException);
+                                                          [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                Attr getAttributeNodeNS(in DOMString namespaceURI,
                                                                in DOMString localName)
-                                                               raises(DOMException);
+                                                               [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                Attr setAttributeNodeNS(in Attr newAttr)
-                                                               raises(DOMException);
+                                                               [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                NodeList getElementsByTagNameNS(in DOMString namespaceURI,
                                                                                in DOMString localName)
-                                                                               raises(DOMException);
+                                                                               [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                boolean hasAttribute(in DOMString name);
@@ -70,7 +70,7 @@ module core
                // Introduced in DOM Level 2:
                boolean hasAttributeNS(in DOMString namespaceURI,
                                                           in DOMString localName)
-                                                          raises(DOMException);
+                                                          [raises(DOMException)];
 
                // Introduced in DOM Level 3:
                readonly attribute TypeInfo schemaTypeInfo;
@@ -78,17 +78,17 @@ module core
                // Introduced in DOM Level 3:
                void setIdAttribute(in DOMString name,
                                                        in boolean isId)
-                                                       raises(DOMException);
+                                                       [raises(DOMException)];
 
                // Introduced in DOM Level 3:
                void setIdAttributeNS(in DOMString namespaceURI,
                                                          in DOMString localName,
                                                          in boolean isId)
-                                                         raises(DOMException);
+                                                         [raises(DOMException)];
 
                // Introduced in DOM Level 3:
                void setIdAttributeNode(in Attr idAttr,
                                                                in boolean isId)
-                                                               raises(DOMException);
+                                                               [raises(DOMException)];
        };
 };
diff --git a/SVGSupport/kdom/bindings/idl/core/NameList.idl b/SVGSupport/kdom/bindings/idl/core/NameList.idl
deleted file mode 100644 (file)
index 4d12cf6..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-module core
-{
-       // Introduced in DOM Level 3:
-       interface NameList {
-               DOMString getName(in unsigned long index);
-               DOMString getNamespaceURI(in unsigned long index);
-
-               readonly attribute unsigned long length;
-
-               boolean contains(in DOMString str);
-               boolean containsNS(in DOMString namespaceURI,
-                                                  in DOMString name);
-       };
-};
index 61007c7..1eae3af 100644 (file)
@@ -15,10 +15,10 @@ module core
        interface NamedNodeMap {
                Node getNamedItem(in DOMString name);
                Node setNamedItem(in Node arg)
-                                                 raises(DOMException);
+                                                 [raises(DOMException)];
 
                Node removeNamedItem(in DOMString name)
-                                                        raises(DOMException);
+                                                        [raises(DOMException)];
 
                Node item(in unsigned long index);
 
@@ -27,15 +27,15 @@ module core
                // Introduced in DOM Level 2:
                Node getNamedItemNS(in DOMString namespaceURI,
                                                        in DOMString localName)
-                                                       raises(DOMException);
+                                                       [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                Node setNamedItemNS(in Node arg)
-                                                       raises(DOMException);
+                                                       [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                Node removeNamedItemNS(in DOMString namespaceURI,
                                                           in DOMString localName)
-                                                          raises(DOMException);
+                                                          [raises(DOMException)];
        };
 };
index 0dca2d7..a0b7cc5 100644 (file)
@@ -28,7 +28,7 @@ module core
                const unsigned short NOTATION_NODE                                      = 12;
 
                readonly attribute DOMString nodeName;
-               attribute DOMString nodeValue;
+               attribute DOMString nodeValue [raises(DOMException)];
 
                readonly attribute unsigned short nodeType;
                readonly attribute Node parentNode;
@@ -45,20 +45,20 @@ module core
                // Modified in DOM Level 3:
                Node insertBefore(in Node newChild,
                                                  in Node refChild)
-                                                 raises(DOMException);
+                                                 [raises(DOMException)];
 
                // Modified in DOM Level 3:
                Node replaceChild(in Node newChild,
                                                  in Node oldChild)
-                                                 raises(DOMException);
+                                                 [raises(DOMException)];
 
                // Modified in DOM Level 3:
                Node removeChild(in Node oldChild)
-                                                raises(DOMException);
+                                                [raises(DOMException)];
 
                // Modified in DOM Level 3:
                Node appendChild(in Node newChild)
-                                                raises(DOMException);
+                                                [raises(DOMException)];
 
                boolean hasChildNodes();
 
@@ -75,7 +75,7 @@ module core
                readonly attribute DOMString namespaceURI;
 
                // Introduced in DOM Level 2:
-               attribute DOMString prefix;
+               attribute DOMString prefix [raises(DOMException)];
 
                // Introduced in DOM Level 2:
                readonly attribute DOMString localName;
@@ -96,10 +96,10 @@ module core
 
                // Introduced in DOM Level 3:
                unsigned short compareDocumentPosition(in Node other)
-                                                                                          raises(DOMException);
+                                                                                          [raises(DOMException)];
 
                // Introduced in DOM Level 3:
-               attribute DOMString textContent;
+               attribute DOMString textContent [raises(DOMException)];
 
                // Introduced in DOM Level 3:
                boolean isSameNode(in Node other);
index 2bb6b7d..4f6c006 100644 (file)
@@ -14,6 +14,6 @@ module core
 {
        interface ProcessingInstruction : Node {
                readonly attribute DOMString target;
-               attribute DOMString data;
+               attribute DOMString data [raises(DOMException)];
        };
 };
index 8ce9d76..4262cd5 100644 (file)
@@ -14,7 +14,7 @@ module core
 {
        interface Text : CharacterData {
                Text splitText(in unsigned long offset)
-                                          raises(DOMException);
+                                          [raises(DOMException)];
 
                // Introduced in DOM Level 3:
                readonly attribute boolean isElementContentWhitespace;
@@ -24,6 +24,6 @@ module core
 
                // Introduced in DOM Level 3:
                Text replaceWholeText(in DOMString content)
-                                                         raises(DOMException);
+                                                         [raises(DOMException)];
        };
 };
diff --git a/SVGSupport/kdom/bindings/idl/core/UserDataHandler.idl b/SVGSupport/kdom/bindings/idl/core/UserDataHandler.idl
deleted file mode 100644 (file)
index 3405b31..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2004 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] 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.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-module core
-{
-       // Introduced in DOM Level 3:
-       interface UserDataHandler {
-               // Operation types
-               const unsigned short NODE_CLONED        = 1;
-               const unsigned short NODE_IMPORTED      = 2;
-               const unsigned short NODE_DELETED       = 3;
-               const unsigned short NODE_RENAMED       = 4;
-               const unsigned short NODE_ADOPTED       = 5;
-
-               void handle(in unsigned short operation,
-                                       in DOMString key,
-                                       in DOMUserData data,
-                                       in Node src,
-                                       in Node dst);
-       };
-};
index a69c65b..ac92921 100644 (file)
@@ -16,6 +16,6 @@ module css
 {
        // Introduced in DOM Level 2:
        interface CSSCharsetRule : CSSRule {
-               attribute core::DOMString encoding;
+               attribute core::DOMString encoding [raises(core::DOMException)];
        };
 };
index 8920e04..66a7c83 100644 (file)
@@ -20,8 +20,10 @@ module css
                readonly attribute CSSRuleList cssRules;
 
                unsigned long insertRule(in core::DOMString rule,
-                                                                in unsigned long index) raises(core::DOMException);
+                                                                in unsigned long index)
+                                                                [raises(core::DOMException)];
 
-               void deleteRule(in unsigned long index) raises(core::DOMException);
+               void deleteRule(in unsigned long index)
+                                               [raises(core::DOMException)];
        };
 };
index 1ee4296..eea7ea3 100644 (file)
@@ -16,7 +16,7 @@ module css
 {
        // Introduced in DOM Level 2:
        interface CSSPageRule : CSSRule {
-               attribute core::DOMString selectorText;
+               attribute core::DOMString selectorText [raises(core::DOMException)];
                readonly attribute CSSStyleDeclaration style;
        };
 };
index d7bd0bb..a6bd484 100644 (file)
@@ -47,19 +47,19 @@ module css
                readonly attribute unsigned short  primitiveType;
 
                void setFloatValue(in unsigned short unitType,
-                                                  in float floatValue) raises(core::DOMException);
+                                                  in float floatValue)
+                                                  [raises(core::DOMException)];
 
-               float getFloatValue(in unsigned short unitType) raises(core::DOMException);
+               float getFloatValue(in unsigned short unitType)
+                                                       [raises(core::DOMException)];
 
                void setStringValue(in unsigned short stringType,
-                                                       in core::DOMString stringValue) raises(core::DOMException);
+                                                       in core::DOMString stringValue)
+                                                       [raises(core::DOMException)];
 
-               core::DOMString getDOMStringValue() raises(core::DOMException);
-
-               Counter getCounterValue() raises(core::DOMException);
-
-               Rect getRectValue() raises(core::DOMException);
-
-               RGBColor getRGBColorValue() raises(core::DOMException);
+               core::DOMString getDOMStringValue() [raises(core::DOMException)];
+               Counter getCounterValue() [raises(core::DOMException)];
+               Rect getRectValue() [raises(core::DOMException)];
+               RGBColor getRGBColorValue() [raises(core::DOMException)];
        };
 };
index ee40098..b7694ef 100644 (file)
@@ -26,7 +26,7 @@ module css
                const unsigned short PAGE_RULE          = 6;
 
                readonly attribute unsigned short type;
-               attribute core::DOMString cssText;
+               attribute core::DOMString cssText [raises(core::DOMException)];
                readonly attribute CSSStyleSheet parentStyleSheet;
                readonly attribute CSSRule parentRule;
        };
index b32f64f..35835f0 100644 (file)
@@ -16,19 +16,21 @@ module css
 {
        // Introduced in DOM Level 2:
        interface CSSStyleDeclaration {
-               attribute core::DOMString cssText;
+               attribute core::DOMString cssText [raises(core::DOMException)];
                
                core::DOMString getPropertyValue(in core::DOMString propertyName);
 
                CSSValue getPropertyCSSValue(in core::DOMString propertyName);
 
-               core::DOMString removeProperty(in core::DOMString propertyName) raises(core::DOMException);
+               core::DOMString removeProperty(in core::DOMString propertyName)
+                                                                          [raises(core::DOMException)];
 
                core::DOMString getPropertyPriority(in core::DOMString propertyName);
 
                void setProperty(in core::DOMString propertyName,
                                                 in core::DOMString value,
-                                                in core::DOMString priority) raises(core::DOMException);
+                                                in core::DOMString priority)
+                                                [raises(core::DOMException)];
 
                readonly attribute unsigned long length;
 
index f977c90..9bdaf7a 100644 (file)
@@ -16,7 +16,7 @@ module css
 {
        // Introduced in DOM Level 2:
        interface CSSStyleRule : CSSRule {
-               attribute core::DOMString selectorText;
+               attribute core::DOMString selectorText [raises(core::DOMException)];
 
                readonly attribute CSSStyleDeclaration style;
        };
index 60e1587..ba3104e 100644 (file)
@@ -20,8 +20,10 @@ module css
                readonly attribute CSSRuleList cssRules;
 
                unsigned long insertRule(in core::DOMString rule,
-                                                                in unsigned long index) raises(core::DOMException);
+                                                                in unsigned long index)
+                                                                [raises(core::DOMException)];
 
-               void deleteRule(in unsigned long index) raises(core::DOMException);
+               void deleteRule(in unsigned long index)
+                                               [raises(core::DOMException)];
        };
 };
index a7bf269..5108928 100644 (file)
@@ -22,7 +22,7 @@ module css
                const unsigned short CSS_VALUE_LIST                     = 2;
                const unsigned short CSS_CUSTOM                         = 3;
 
-               attribute core::DOMString cssText;
+               attribute core::DOMString cssText [raises(core::DOMException)];
                readonly attribute unsigned short cssValueType;
        };
 };
diff --git a/SVGSupport/kdom/bindings/idl/css/ViewCSS.idl b/SVGSupport/kdom/bindings/idl/css/ViewCSS.idl
deleted file mode 100644 (file)
index 860c19e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/css.idl
-
-module css
-{
-       // Introduced in DOM Level 2:
-       interface ViewCSS : views::AbstractView {
-               CSSStyleDeclaration getComputedStyle(in core::Element elt,
-                                                                                        in core::DOMString pseudoElt);
-       };
-};
index 043724e..146b802 100644 (file)
@@ -16,6 +16,6 @@ module events
 {
        // Introduced in DOM Level 2:
        interface [nodptr] DocumentEvent {
-               events::Event createEvent(in core::DOMString eventType) raises(core::DOMException);
+               events::Event createEvent(in core::DOMString eventType) [raises(core::DOMException)];
        };
 };
index 6ee702a..8954381 100644 (file)
 module events
 {
        // Introduced in DOM Level 2:
-       exception EventException {
-               unsigned short code;
-       };
+       interface EventException {
+               readonly attribute unsigned short code;
 
-       // EventExceptionCode
-       const unsigned short UNSPECIFIED_EVENT_TYPE_ERR = 0;
+               // EventExceptionCode
+               const unsigned short UNSPECIFIED_EVENT_TYPE_ERR = 0;
+       };
 };
index 3d732c3..8ad1b09 100644 (file)
@@ -24,6 +24,6 @@ module events
                                                                 in EventListener listener,
                                                                 in boolean useCapture);
 
-               boolean dispatchEvent(in Event evt) raises(EventException);
+               boolean dispatchEvent(in Event evt) [raises(EventException)];
        };
 };
diff --git a/SVGSupport/kdom/bindings/idl/ls/DOMImplementationLS.idl b/SVGSupport/kdom/bindings/idl/ls/DOMImplementationLS.idl
new file mode 100644 (file)
index 0000000..2d368b4
--- /dev/null
@@ -0,0 +1,14 @@
+module ls
+{
+       interface [nodptr] DOMImplementationLS {
+
+               // DOMImplementationLSMode
+               const unsigned short      MODE_SYNCHRONOUS               = 1;
+               const unsigned short      MODE_ASYNCHRONOUS              = 2;
+
+               ls::LSParser           createLSParser(in unsigned short mode, in core::DOMString schemaType) [raises(core::DOMException)];
+               ls::LSSerializer       createLSSerializer();
+               ls::LSInput            createLSInput();
+               ls::LSOutput           createLSOutput();
+       };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/LSException.idl b/SVGSupport/kdom/bindings/idl/ls/LSException.idl
new file mode 100644 (file)
index 0000000..bdf96b1
--- /dev/null
@@ -0,0 +1,6 @@
+module ls
+{
+  interface LSException {
+    readonly attribute unsigned short   code;
+  };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/LSInput.idl b/SVGSupport/kdom/bindings/idl/ls/LSInput.idl
new file mode 100644 (file)
index 0000000..30de9a1
--- /dev/null
@@ -0,0 +1,15 @@
+module ls
+{
+  interface LSInput {
+    // Depending on the language binding in use,
+    // this attribute may not be available.
+    //         attribute LSReader        characterStream;
+    //         attribute LSInputStream   byteStream;
+             attribute DOMString       stringData;
+             attribute DOMString       systemId;
+             attribute DOMString       publicId;
+             attribute DOMString       baseURI;
+             attribute DOMString       encoding;
+             attribute boolean         certifiedText;
+  };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/LSOutput.idl b/SVGSupport/kdom/bindings/idl/ls/LSOutput.idl
new file mode 100644 (file)
index 0000000..527bc70
--- /dev/null
@@ -0,0 +1,11 @@
+module ls
+{
+  interface LSOutput {
+    // Depending on the language binding in use,
+    // this attribute may not be available.
+    //         attribute LSWriter        characterStream;
+    //         attribute LSOutputStream  byteStream;
+             attribute DOMString       systemId;
+             attribute DOMString       encoding;
+  };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/LSParser.idl b/SVGSupport/kdom/bindings/idl/ls/LSParser.idl
new file mode 100644 (file)
index 0000000..0225941
--- /dev/null
@@ -0,0 +1,27 @@
+module ls
+{
+  interface LSParser {
+    readonly attribute core::DOMConfiguration domConfig;
+             attribute LSParserFilter  filter;
+    readonly attribute boolean         async;
+    readonly attribute boolean         busy;
+    core::Document           parse(in LSInput input)
+                                        raises(dom::DOMException, 
+                                               LSException);
+    core::Document           parseURI(in DOMString uri)
+                                        raises(dom::DOMException, 
+                                               LSException);
+    // ACTION_TYPES
+    const unsigned short      ACTION_APPEND_AS_CHILDREN      = 1;
+    const unsigned short      ACTION_REPLACE_CHILDREN        = 2;
+    const unsigned short      ACTION_INSERT_BEFORE           = 3;
+    const unsigned short      ACTION_INSERT_AFTER            = 4;
+    const unsigned short      ACTION_REPLACE                 = 5;
+    core::Node               parseWithContext(in LSInput input, 
+                                        in core::Node contextArg, 
+                                        in unsigned short action)
+                                        raises(dom::DOMException, 
+                                               LSException);
+    void               abort();
+  };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/LSParserFilter.idl b/SVGSupport/kdom/bindings/idl/ls/LSParserFilter.idl
new file mode 100644 (file)
index 0000000..3e73255
--- /dev/null
@@ -0,0 +1,13 @@
+module ls
+{
+  interface LSParserFilter {
+    // Constants returned by startElement and acceptNode
+//    const short               FILTER_ACCEPT                  = 1;
+//    const short               FILTER_REJECT                  = 2;
+//    const short               FILTER_SKIP                    = 3;
+//    const short               FILTER_INTERRUPT               = 4;
+    unsigned short     startElement(in core::Element elementArg);
+    unsigned short     acceptNode(in core::Node nodeArg);
+    readonly attribute unsigned long   whatToShow;
+  };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/LSResourceResolver.idl b/SVGSupport/kdom/bindings/idl/ls/LSResourceResolver.idl
new file mode 100644 (file)
index 0000000..20aa5ba
--- /dev/null
@@ -0,0 +1,10 @@
+module ls
+{
+  interface LSResourceResolver {
+    LSInput            resolveResource(in DOMString type, 
+                                       in DOMString namespaceURI, 
+                                       in DOMString publicId, 
+                                       in DOMString systemId, 
+                                       in DOMString baseURI);
+  };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/LSSerializer.idl b/SVGSupport/kdom/bindings/idl/ls/LSSerializer.idl
new file mode 100644 (file)
index 0000000..4ed5019
--- /dev/null
@@ -0,0 +1,17 @@
+module ls
+{
+  interface LSSerializer {
+    readonly attribute core::DOMConfiguration domConfig;
+             attribute DOMString       newLine;
+             attribute LSSerializerFilter filter;
+    boolean            write(in core::Node nodeArg, 
+                             in LSOutput destination)
+                                        raises(LSException);
+    boolean            writeToURI(in core::Node nodeArg, 
+                                  in DOMString uri)
+                                        raises(LSException);
+    DOMString          writeToString(in core::Node nodeArg)
+                                        raises(dom::DOMException, 
+                                               LSException);
+  };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/LSSerializerFilter.idl b/SVGSupport/kdom/bindings/idl/ls/LSSerializerFilter.idl
new file mode 100644 (file)
index 0000000..792c2d4
--- /dev/null
@@ -0,0 +1,6 @@
+module ls
+{
+  interface LSSerializerFilter : traversal::NodeFilter {
+    readonly attribute unsigned long   whatToShow;
+  };
+};
diff --git a/SVGSupport/kdom/bindings/idl/ls/kdomdefs.idl b/SVGSupport/kdom/bindings/idl/ls/kdomdefs.idl
new file mode 100644 (file)
index 0000000..8ec8155
--- /dev/null
@@ -0,0 +1 @@
+module ls [ns KDOM];
index 05ada0d..ccb30c2 100644 (file)
@@ -14,32 +14,41 @@ module range
 {
        // Introduced in DOM Level 2:
        interface Range {
-               readonly attribute core::Node startContainer;
-               readonly attribute long startOffset;
-               readonly attribute core::Node endContainer;
-               readonly attribute long endOffset;
-               readonly attribute boolean isCollapsed;
-               readonly attribute core::Node commonAncestorContainer;
+               readonly attribute core::Node startContainer [raises(core::DOMException)];
+               readonly attribute long startOffset [raises(core::DOMException)];
+               readonly attribute core::Node endContainer [raises(core::DOMException)];
+               readonly attribute long endOffset [raises(core::DOMException)];
+               readonly attribute boolean isCollapsed [raises(core::DOMException)];
+               readonly attribute core::Node commonAncestorContainer [raises(core::DOMException)];
 
                void setStart(in core::Node refNode,
-                                         in long offset) raises(RangeException, core::DOMException);
+                                         in long offset)
+                                         [raises(RangeException, core::DOMException)];
 
                void setEnd(in core::Node refNode,
-                                       in long offset) raises(RangeException, core::DOMException);
+                                       in long offset)
+                                       [raises(RangeException, core::DOMException)];
 
-               void setStartBefore(in core::Node refNode) raises(RangeException, core::DOMException);
+               void setStartBefore(in core::Node refNode)
+                                                       [raises(RangeException, core::DOMException)];
 
-               void setStartAfter(in core::Node refNode) raises(RangeException, core::DOMException);
+               void setStartAfter(in core::Node refNode)
+                                                  [raises(RangeException, core::DOMException)];
 
-               void setEndBefore(in core::Node refNode) raises(RangeException, core::DOMException);
+               void setEndBefore(in core::Node refNode)
+                                                 [raises(RangeException, core::DOMException)];
 
-               void setEndAfter(in core::Node refNode) raises(RangeException, core::DOMException);
+               void setEndAfter(in core::Node refNode)
+                                                [raises(RangeException, core::DOMException)];
 
-               void collapse(in boolean toStart) raises(core::DOMException);
+               void collapse(in boolean toStart)
+                                         [raises(core::DOMException)];
 
-               void selectNode(in core::Node refNode) raises(RangeException, core::DOMException);
+               void selectNode(in core::Node refNode)
+                                               [raises(RangeException, core::DOMException)];
 
-               void selectNodeContents(in core::Node refNode) raises(RangeException, core::DOMException);
+               void selectNodeContents(in core::Node refNode)
+                                                               [raises(RangeException, core::DOMException)];
 
                // Compare types
                const unsigned short START_TO_START     = 1;
@@ -48,22 +57,25 @@ module range
                const unsigned short END_TO_START       = 4;
 
                short compareBoundaryPoints(in unsigned short how,
-                                                                       in Range sourceRange) raises(core::DOMException);
+                                                                       in Range sourceRange)
+                                                                       [raises(core::DOMException)];
 
-               void deleteContents() raises(core::DOMException);
+               void deleteContents() [raises(core::DOMException)];
 
-               core::DocumentFragment extractContents() raises(core::DOMException);
+               core::DocumentFragment extractContents() [raises(core::DOMException)];
 
-               core::DocumentFragment cloneContents() raises(core::DOMException);
+               core::DocumentFragment cloneContents() [raises(core::DOMException)];
 
-               void insertNode(in core::Node newNode) raises(core::DOMException, RangeException);
+               void insertNode(in core::Node newNode)
+                                               [raises(core::DOMException, RangeException)];
 
-               void surroundContents(in core::Node newParent) raises(core::DOMException, RangeException);
+               void surroundContents(in core::Node newParent)
+                                                         [raises(core::DOMException, RangeException)];
 
-               Range cloneRange() raises(core::DOMException);
+               Range cloneRange() [raises(core::DOMException)];
 
-               core::DOMString toString() raises(core::DOMException);
+               core::DOMString toString() [raises(core::DOMException)];
 
-               void detach() raises(core::DOMException);
+               void detach() [raises(core::DOMException)];
        };
 };
index 3ef4b42..b826246 100644 (file)
 
 module range
 {
-       // Range exception codes
-       const unsigned short BAD_BOUNDARYPOINTS_ERR     = 1;
-       const unsigned short INVALID_NODE_TYPE_ERR      = 2;
-
        // Introduced in DOM Level 2:
-       exception RangeException {
-               unsigned short code;
+       interface RangeException {
+               readonly attribute unsigned short code;
+
+               // Range exception codes
+               const unsigned short BAD_BOUNDARYPOINTS_ERR     = 1;
+               const unsigned short INVALID_NODE_TYPE_ERR      = 2;
        };
 };
index 0baa3f2..802a11b 100644 (file)
@@ -15,7 +15,7 @@
 module stylesheets
 {
        // Introduced in DOM Level 2:
-       interface LinkStyle {
+       interface [nodptr] LinkStyle {
                readonly attribute StyleSheet sheet;
        };
 };
index a089819..d5bbbe1 100644 (file)
@@ -16,12 +16,15 @@ module stylesheets
 {
        // Introduced in DOM Level 2:
        interface MediaList {
-               attribute core::DOMString mediaText;
+               attribute core::DOMString mediaText [raises(core::DOMException)];
                readonly attribute unsigned long length;
 
                core::DOMString item(in unsigned long index);
 
-               void deleteMedium(in core::DOMString oldMedium) raises(core::DOMException);
-               void appendMedium(in core::DOMString newMedium) raises(core::DOMException);
+               void deleteMedium(in core::DOMString oldMedium)
+                                                 [raises(core::DOMException)];
+
+               void appendMedium(in core::DOMString newMedium)
+                                                 [raises(core::DOMException)];
        };
 };
index a6851be..1c08ca2 100644 (file)
@@ -17,11 +17,13 @@ module traversal
                NodeIterator createNodeIterator(in core::Node root,
                                                                                in long whatToShow,
                                                                                in NodeFilter filter,
-                                                                               in boolean entityReferenceExpansion);
+                                                                               in boolean entityReferenceExpansion)
+                                                                               [raises(core::DOMException)];
 
                TreeWalker createTreeWalker(in core::Node root,
                                                                        in long whatToShow,
                                                                        in NodeFilter filter,
-                                                                       in boolean entityReferenceExpansion) raises(core::DOMException);
+                                                                       in boolean entityReferenceExpansion)
+                                                                       [raises(core::DOMException)];
        };
 };
index e069177..3d064b8 100644 (file)
@@ -18,8 +18,8 @@ module traversal
                readonly attribute NodeFilter filter;
                readonly attribute boolean expandEntityReferences;
 
-               core::Node nextNode() raises(core::DOMException);
-               core::Node previousNode() raises(core::DOMException);
+               core::Node nextNode() [raises(core::DOMException)];
+               core::Node previousNode() [raises(core::DOMException)];
 
                void detach();
        };
index 4c235f3..8461fbf 100644 (file)
@@ -17,7 +17,7 @@ module traversal
                readonly attribute long whatToShow;
                readonly attribute NodeFilter filter;
                readonly attribute boolean expandEntityReferences;
-               attribute core::Node currentNode;
+               attribute core::Node currentNode [raises(core::DOMException)];
 
                core::Node parentNode();
 
index e8fbf1f..460f703 100644 (file)
 
 module xpath
 {
-  interface [nodptr] XPathEvaluator {
-    XPathExpression    createExpression(in core::DOMString expression, 
-                                        in XPathNSResolver resolver)
-                                        raises(XPathException, 
-                                               core::DOMException);
-    XPathNSResolver    createNSResolver(in core::Node nodeResolver);
-    XPathResult          evaluate(in core::DOMString expression, 
-                                in core::Node contextNode, 
-                                in XPathNSResolver resolver, 
-                                in unsigned short type, 
-                                in XPathResult result)
-                                        raises(XPathException, 
-                                               core::DOMException);
-  };
-};
+       interface [nodptr] XPathEvaluator {
+               XPathExpression createExpression(in core::DOMString expression,
+                                                                                in XPathNSResolver resolver)
+                                                                                [raises(XPathException, core::DOMException)];
+
+               XPathNSResolver createNSResolver(in core::Node nodeResolver);
 
+               XPathResult evaluate(in core::DOMString expression,
+                                                        in core::Node contextNode,
+                                                        in XPathNSResolver resolver,
+                                                        in unsigned short type,
+                                                        in XPathResult result)
+                                                        [raises(XPathException, core::DOMException)];
+       };
+};
index 4e32d55..b408509 100644 (file)
 
 module xpath
 {
-  exception XPathException {
-    unsigned short   code;
-  };
-  // XPathExceptionCode
-  const unsigned short      INVALID_EXPRESSION_ERR         = 51;
-  const unsigned short      TYPE_ERR                       = 52;
-};
+       interface XPathException {
+               readonly attribute unsigned short code;
 
+               // XPathExceptionCode
+               const unsigned short INVALID_EXPRESSION_ERR     = 51;
+               const unsigned short TYPE_ERR                           = 52;
+       };
+};
index 9d53167..79f1764 100644 (file)
 
 module xpath
 {
-  interface XPathExpression {
-    XPathResult          evaluate(in core::Node contextNode, 
-                                in unsigned short type, 
-                                in XPathResult result)
-                                        raises(XPathException, 
-                                               core::DOMException);
-  };
+       interface XPathExpression {
+               XPathResult evaluate(in core::Node contextNode,
+                                                        in unsigned short type,
+                                                        in XPathResult result)
+                                                        [raises(XPathException, core::DOMException)];
+       };
 };
-
index 6c29f43..ad94f13 100644 (file)
@@ -12,8 +12,7 @@
 
 module xpath
 {
-  interface XPathNSResolver {
-    core::DOMString          lookupNamespaceURI(in core::DOMString prefix);
-  };
+       interface XPathNSResolver {
+               core::DOMString lookupNamespaceURI(in core::DOMString prefix);
+       };
 };
-
index 0f3c403..ee72141 100644 (file)
 
 module xpath
 {
- interface XPathNamespace : core::Node {
+       interface XPathNamespace : core::Node {
+               // XPathNodeType
+               const unsigned short XPATH_NAMESPACE_NODE = 13;
 
-    // XPathNodeType
-    const unsigned short      XPATH_NAMESPACE_NODE           = 13;
-
-    readonly attribute core::Element         ownerElement;
-  };
+               readonly attribute core::Element ownerElement;
+       };
 };
-
index 83f3d9c..8aed494 100644 (file)
 
 module xpath
 {
-  interface XPathResult {
-
-    // XPathResultType
-    const unsigned short      ANY_TYPE                       = 0;
-    const unsigned short      NUMBER_TYPE                    = 1;
-    const unsigned short      STRING_TYPE                    = 2;
-    const unsigned short      BOOLEAN_TYPE                   = 3;
-    const unsigned short      UNORDERED_NODE_ITERATOR_TYPE   = 4;
-    const unsigned short      ORDERED_NODE_ITERATOR_TYPE     = 5;
-    const unsigned short      UNORDERED_NODE_SNAPSHOT_TYPE   = 6;
-    const unsigned short      ORDERED_NODE_SNAPSHOT_TYPE     = 7;
-    const unsigned short      ANY_UNORDERED_NODE_TYPE        = 8;
-    const unsigned short      FIRST_ORDERED_NODE_TYPE        = 9;
-
-    readonly attribute unsigned short  resultType;
-    readonly attribute double          numberValue;
-                                        // raises(XPathException) on retrieval
-
-    readonly attribute core::DOMString       stringValue;
-                                        // raises(XPathException) on retrieval
-
-    readonly attribute boolean         booleanValue;
-                                        // raises(XPathException) on retrieval
-
-    readonly attribute boolean         singleNodeValue;
-                                        // raises(XPathException) on retrieval
-
-    readonly attribute boolean         invalidIteratorState;
-    readonly attribute unsigned long   snapshotLength;
-                                        // raises(XPathException) on retrieval
-
-    core::Node               iterateNext()
-                                        raises(XPathException, 
-                                               core::DOMException);
-    core::Node               snapshotItem(in unsigned long index)
-                                        raises(XPathException);
-  };
+       interface XPathResult {
+               // XPathResultType
+               const unsigned short ANY_TYPE                                           = 0;
+               const unsigned short NUMBER_TYPE                                        = 1;
+               const unsigned short STRING_TYPE                                        = 2;
+               const unsigned short BOOLEAN_TYPE                                       = 3;
+               const unsigned short UNORDERED_NODE_ITERATOR_TYPE       = 4;
+               const unsigned short ORDERED_NODE_ITERATOR_TYPE         = 5;
+               const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE       = 6;
+               const unsigned short ORDERED_NODE_SNAPSHOT_TYPE         = 7;
+               const unsigned short ANY_UNORDERED_NODE_TYPE            = 8;
+               const unsigned short FIRST_ORDERED_NODE_TYPE            = 9;
+
+               readonly attribute unsigned short resultType;
+
+               readonly attribute double numberValue [raises(XPathException)];
+               readonly attribute core::DOMString stringValue [raises(XPathException)];
+               readonly attribute boolean booleanValue [raises(XPathException)];
+               readonly attribute core::Node  singleNodeValue [raises(XPathException)];
+
+               readonly attribute boolean invalidIteratorState;
+
+               readonly attribute unsigned long snapshotLength [raises(XPathException)];
+
+               core::Node iterateNext() [raises(XPathException, core::DOMException)];
+               core::Node snapshotItem(in unsigned long index) [raises(XPathException)];
+       };
 };
-
index 0dcb3ea..cbf894f 100644 (file)
@@ -1,6 +1,6 @@
 module xpointer
 {
-       exception XPointerException {
-               unsigned short code;
+       interface XPointerException {
+               readonly attribute unsigned short code;
        };
 };
index 22440aa..2205172 100644 (file)
@@ -10,21 +10,16 @@ SRCDIR=$1   # 1 - $(top_srcdir) variable from Makefile.am (ie. '.')
 LANG=$2                # 2 - Language generator string identifier (ie. 'cpp')
 MODULE=$3      # 3 - DOM module where IDLs live in (ie. 'core')
 INPUT=$4       # 4 - Interface to process (ie. 'Node.cpp')
+BUILDDIR=$5 # 5 - $(top_builddir) variable from Makefile.am (i.e. '.')
 
-IDL=`echo $INPUT | sed 's/\.cpp/\.idl/g' | sed 's/Wrapper//'`
+IDL=`basename $INPUT | sed 's/\.cpp/.idl/g;s/\.h/.idl/g' | sed 's/Wrapper//'`
 
-if test -f $SRCDIR/kdom/bindings/$LANG/$MODULE/$INPUT; then
-       if test $SRCDIR/kdom/bindings/idl/$MODULE/$IDL -nt $SRCDIR/kdom/bindings/$LANG/$MODULE/$INPUT; then
-               /usr/bin/env perl -I$SRCDIR/kdom/bindings $SRCDIR/kdom/bindings/kdomidl.pl \
-                                                 --generator $LANG --outputdir $SRCDIR/kdom/bindings/$LANG \
-                                                 --input $SRCDIR/kdom/bindings/idl/$MODULE/$IDL \
-                                                 --includedir $SRCDIR/kdom/bindings/idl \
-                                                 --documentation $SRCDIR/kdom/bindings/idl/$MODULE/docs-$MODULE.xml &>/dev/null
-       fi
-else
-       /usr/bin/env perl -I$SRCDIR/kdom/bindings $SRCDIR/kdom/bindings/kdomidl.pl \
-                                         --generator $LANG --outputdir $SRCDIR/kdom/bindings/$LANG \
-                                         --input $SRCDIR/kdom/bindings/idl/$MODULE/$IDL \
-                                         --includedir $SRCDIR/kdom/bindings/idl \
-                                         --documentation $SRCDIR/kdom/bindings/idl/$MODULE/docs-$MODULE.xml &>/dev/null
-fi
+test -f $BUILDDIR/kdom/bindings/$LANG/$MODULE/$INPUT \
+       && ! test $SRCDIR/kdom/bindings/idl/$MODULE/$IDL -nt $BUILDDIR/kdom/bindings/$LANG/$MODULE/$INPUT \
+       && exit 0
+       
+/usr/bin/env perl -I$SRCDIR/kdom/bindings $SRCDIR/kdom/bindings/kdomidl.pl \
+                 --generator $LANG --outputdir $BUILDDIR/kdom/bindings/$LANG \
+                 --input $SRCDIR/kdom/bindings/idl/$MODULE/$IDL \
+                 --includedir $SRCDIR/kdom/bindings/idl \
+                 --documentation $SRCDIR/kdom/bindings/idl/$MODULE/docs-$MODULE.xml
index b774396..a1e1c6f 100644 (file)
@@ -18,24 +18,27 @@ my $outputDir;
 my @includeDirs;
 my $documentationFile;
 my $inputFile;
+my $layerOnTop = 0;
 
 # Parse command line parameters.
 my $result = GetOptions("generator=s" => \$generator,
                                                "outputdir=s" => \$outputDir,
                                                "includedir=s" => \@includeDirs,
                                                "documentation=s" => \$documentationFile,
-                                               "input=s" => \$inputFile);
+                                               "input=s" => \$inputFile,
+                                               "ontop+" => \$layerOnTop);
 
 if(!defined($generator) or !defined($outputDir) or !defined($documentationFile) or
    (@includeDirs eq 0) or !defined($inputFile))
 {
        print "Usage: kdomidl.pl [--generator <string>] [--outputdir <directory>]\n" .
                  "                  [--includedir <directory>]* [--documentation <xml file>]\n" .
-                 "                  [--input <idl file>]\n\n";
+                 "                  [--input <idl file>] [--ontop]?\n\n";
 
-       print " Possible values for --generator: 'cpp' / 'js'\n";
+       print " Possible values for --generator: 'cpp' / 'js' / 'ecmaInterface'\n";
        print " You can specify multiple --includedir arguments.\n";
-       print " Use relative directory paths for --outputdir & --documentationFile.\n\n";
+       print " In projects using kdom, specify the optional --ontop flag.\n";
+       print " Use relative directory paths for --outputdir & --documentation.\n\n";
 
        exit;
 }
@@ -54,7 +57,7 @@ my $parser = IDLParser->new(0);
 my $document = $parser->Parse($inputFile);
 
 # Generate desired output for given IDL file.
-my $codeGen = IDLCodeGenerator->new(\@includeDirs, $generator, $outputDir, $documentationFile);
+my $codeGen = IDLCodeGenerator->new(\@includeDirs, $generator, $outputDir, $documentationFile, $layerOnTop);
 $codeGen->ProcessDocument($document);
 
 1;
index af2acf0..bb8b727 100644 (file)
@@ -23,6 +23,7 @@
 #include "RenderStyle.h"
 #include <kdom/ecma/GlobalObject.h>
 #include "CDFInterface.h"
+#include <kdom/ecma/EcmaInterface.h>
 
 // The auto-generated parts
 #include "domattrs.h"
@@ -106,6 +107,11 @@ int CDFInterface::getAttrID(const char *attrStr, int len) const
     return KDOM::getAttrID(attrStr, len);
 }
 
+EcmaInterface *CDFInterface::ecmaInterface() const
+{
+    return new EcmaInterface();
+}
+
 GlobalObject *CDFInterface::globalObject(DocumentImpl *doc) const
 {
     return new GlobalObject(doc);
index 9c68a73..651dc59 100644 (file)
@@ -34,11 +34,12 @@ namespace KDOM
      *
      * - CSS values/properties access / render-style
      * - XML attribute/tag names access
-     * - EcmaScript global object
+     * - EcmaScript global object / EcmaInterface object
      *
      **/
     class RenderStyle;
     class GlobalObject;
+    class EcmaInterface;
     class CDFInterface
     {
     public:
@@ -63,6 +64,7 @@ namespace KDOM
         virtual int getAttrID(const char *attrStr, int len) const;
 
         // EcmaScript interface
+        virtual EcmaInterface *ecmaInterface() const;
         virtual GlobalObject *globalObject(DocumentImpl *doc) const;
     };
 };
index 8207992..9a56d3a 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <kdebug.h>
 
+#include <kjs/interpreter.h>
 #include <kjs/object.h>
 
 namespace KJS
@@ -111,17 +112,16 @@ namespace KDOM
 
         virtual void put(KJS::ExecState *exec, const KJS::Identifier &propertyName, KJS::ValueImp *value, int attr)
         {
-/*
 #if DEBUG_BRIDGE > 0
             kdDebug(26004) << "DOMRWBridge::put(), " << propertyName.qstring()
-                           << " Name: " << classInfo()->className
-                           << " Wrapper object: " << m_wrapper << endl;
+                           << " Name: " << this->classInfo()->className
+                           << " Wrapper object: " << this->m_wrapper << endl;
 #endif
 
             // Try to see if we know this property (and need to take special action)
-            if(m_wrapper->put(exec, propertyName, value, attr))
+            if(this->m_wrapper->put(exec, propertyName, value, attr))
                 return;
-*/
+
             // We don't -> set property in ObjectImp.
             KJS::ObjectImp::put(exec, propertyName, value, attr);
         }
index 54704a8..0cbc13d 100644 (file)
 #define KDOM_DOMLookup_H
 
 #ifndef APPLE_CHANGES
-#include <iostream>
+#include <ostream>
 #endif
+
+#include <kdebug.h>
+
 #include <kjs/value.h>
 #include <kjs/object.h>
 #include <kjs/lookup.h>
@@ -149,12 +152,11 @@ namespace KDOM
         return KJS::Lookup::findEntry(&s_hashTable, propertyName); \
     } \
     KJS::ObjectImp *ClassName::prototype(KJS::ExecState *exec) const { \
-        if(exec) return exec->interpreter()->builtinObjectPrototype(); \
-        return KJS::Object::dynamicCast(KJS::Null()); \
+        return exec->interpreter()->builtinObjectPrototype(); \
     } \
     const KJS::ClassInfo ClassName::s_classInfo = { Class "Constructor", 0, &s_hashTable, 0 }; \
     KJS::ValueImp *get##ClassName(KJS::ExecState *exec) { \
-        return KDOM::cacheGlobalBridge<ClassName>(exec, "[[" Class ".constructor]]"); \
+        return KJS::cacheGlobalObject<ClassName>(exec, "[[" Class ".constructor]]"); \
     }
  
 #define ECMA_DEFINE_CONSTRUCTOR(ClassName) \
@@ -211,29 +213,63 @@ namespace KDOM
     };
 
 // To be used when casting the type of an argument
-// TODO: sync with khtml's check! (is a bit different...)
-#define KDOM_CHECK(ClassName, theObj) \
-    ClassName obj = cast(exec, theObj); \
-    if(obj == ClassName::null) { \
-        kdDebug(26004) << k_funcinfo << " Wrong object type: expected " \
-                       << ClassName::s_classInfo.className << " got " \
-                       << thisObj->classInfo()->className << endl; \
-        ObjectImp *err = throwError(exec,TypeError); \
+#define KDOM_CHECK(DOMObjImpl, DOMObjWrapper, theObj) \
+    DOMObjImpl *obj = cast(exec, static_cast<KJS::ObjectImp *>(theObj)); \
+    if(!obj) { \
+        QString errMsg = QString::fromLatin1("Attempt at calling a function that expects a ") + \
+                         QString::fromLatin1(DOMObjWrapper::s_classInfo.className) + \
+                         QString::fromLatin1(" on a ") + \
+                         QString::fromLatin1(theObj->classInfo()->className); \
+        kdDebug(26004) << k_funcinfo << " " << errMsg << endl; \
+        KJS::ObjectImp *err = KJS::throwError(exec, KJS::TypeError, errMsg.ascii()); \
         return err; \
     }
 
-// To be used in all callAsFunction() implementations!
-// Can't use if (!thisObj.inherits(&ClassName::s_classInfo) since we don't
-// use the (single-parent) inheritance of ClassInfo...
-#define KDOM_CHECK_THIS(ClassName) KDOM_CHECK(ClassName, thisObj)
+// To be used in all call() implementations!
+// Can't use if (!thisObj.inherits(&ClassName::s_classInfo) since
+// we don't use the (single-parent) inheritance of ClassInfo...
+#define KDOM_CHECK_THIS(DOMObjImpl, DOMObjWrapper) KDOM_CHECK(DOMObjImpl, DOMObjWrapper, thisObj)
 
 // Helpers to hide exception stuff...
 // used within get/putValueProprety
-// TODO: multiple exception support!
 #define KDOM_ENTER_SAFE try {
-#define KDOM_LEAVE_SAFE(Exception) } catch(Exception::Private *e) { KJS::ObjectImp *err = throwError(exec, KJS::GeneralError, QString::fromLatin1("%1 %2").arg(QString::fromLatin1(Exception(e).s_classInfo.className)).arg(QString::number(e->code())).latin1()); err->put(exec, "code", KJS::Number(e->code())); }
-#define KDOM_LEAVE_CALL_SAFE(Exception) } catch(Exception::Private *e) { KJS::ObjectImp *err = throwError(exec, KJS::GeneralError, QString::fromLatin1("%1 %2").arg(QString::fromLatin1(Exception(e).s_classInfo.className)).arg(QString::number(e->code())).latin1()); err->put(exec, "code", KJS::Number(e->code())); return err; }
 
+#define KDOM_LEAVE_SAFE_COMMON(Exception) \
+    catch(Exception##Impl *e) { \
+        KJS::ObjectImp *err = KJS::throwError(exec, KJS::GeneralError, \
+                                             QString::fromLatin1("%1 %2"). \
+                                             arg(QString::fromLatin1(Exception##Wrapper::s_classInfo.className)). \
+                                             arg(QString::number(e->code())).latin1()); \
+        err->put(exec, "code", KJS::Number(e->code())); \
+    }
+
+// The first exceptions uses this macro...
+#define KDOM_LEAVE_SAFE(Exception) \
+    } \
+    KDOM_LEAVE_SAFE_COMMON(Exception)
+
+// ... and all others this one
+#define KDOM_LEAVE_SAFE_NEXT(Exception) \
+    KDOM_LEAVE_SAFE_COMMON(Exception)
+
+#define KDOM_LEAVE_CALL_SAFE_COMMON(Exception) \
+    catch(Exception##Impl *e) { \
+        KJS::ObjectImp *err = KJS::throwError(exec, KJS::GeneralError, \
+                                             QString::fromLatin1("%1 %2"). \
+                                             arg(QString::fromLatin1(Exception##Wrapper::s_classInfo.className)). \
+                                             arg(QString::number(e->code())).latin1()); \
+        err->put(exec, "code", KJS::Number(e->code())); \
+        return err; \
+    }
+
+// The first exceptions uses this macro...
+#define KDOM_LEAVE_CALL_SAFE(Exception) \
+    } \
+    KDOM_LEAVE_CALL_SAFE_COMMON(Exception)
+
+// ... and all others this one.
+#define KDOM_LEAVE_CALL_SAFE_NEXT(Exception) \
+    KDOM_LEAVE_CALL_SAFE_COMMON(Exception)
 
 #endif
 
index a7d0d8f..5e64be7 100644 (file)
 */
 
 #include <kdebug.h>
-#include <qvariant.h>
 #include <q3ptrdict.h>
 
 #include "kdom.h"
 #include "Ecma.h"
 #include "CDFInterface.h"
 #include "GlobalObject.h"
+#include "kdom/ecma/EcmaInterface.h"
 #include "ScriptInterpreter.h"
 #include "EventListenerImpl.h"
 
@@ -103,13 +103,14 @@ using namespace KDOM;
 class Ecma::Private
 {
 public:
-    Private(DocumentImpl *doc) : document(doc), globalObject(0), interpreter(0) { init = false; }
+    Private(DocumentImpl *doc) : document(doc), globalObject(0), ecmaInterface(0), interpreter(0) { init = false; }
     virtual ~Private() { delete globalObject; }
 
     bool init;
 
     DocumentImpl *document;
     GlobalObject *globalObject;
+    EcmaInterface *ecmaInterface;
     ScriptInterpreter *interpreter;
 
     Q3PtrDict<EventListenerImpl> eventListeners;
@@ -148,6 +149,7 @@ void Ecma::setup(CDFInterface *interface)
 
     // Create handler for js calls
     d->globalObject = interface->globalObject(d->document);
+    d->ecmaInterface = interface->ecmaInterface();
 
     // Create code interpreter
     KJS::ObjectImp *kjsGlobalObject(d->globalObject);
@@ -164,12 +166,14 @@ void Ecma::setupDocument(DocumentImpl *document)
 {
     // Create base bridge for document
     DocumentWrapper *wrapper = new DocumentWrapper(document);
-    
     KJS::ObjectImp *kjsObj = wrapper->bridge(d->interpreter->globalExec());
 #ifndef APPLE_CHANGES
     kjsObj->ref();
 #endif
 
+    delete wrapper;
+
     d->interpreter->putDOMObject(document, kjsObj);
 }
 
@@ -192,6 +196,11 @@ KJS::ExecState *Ecma::globalExec() const
     return d->interpreter->globalExec();
 }
 
+EcmaInterface *Ecma::interface() const
+{
+    return d->ecmaInterface;
+}
+
 ScriptInterpreter *Ecma::interpreter() const
 {
     return d->interpreter;
@@ -250,18 +259,22 @@ EventListenerImpl *Ecma::createEventListener(KJS::ExecState *exec, KJS::ValueImp
     return i;
 }
 
-EventListenerImpl *Ecma::createEventListener(const DOMString &type, const DOMString &jsCode)
+EventListenerImpl *Ecma::createEventListener(DOMStringImpl *type, DOMStringImpl *jsCode)
 {    
+    if(!type || !jsCode)
+        return 0;
+
     KJS::Interpreter::lock();
 
     // We probably deal with sth. like onload="alert('hi');' ...
-    DOMString internalType = DOMString("[KDOM] - ") + jsCode;
-    
+    DOMStringImpl *internalType = new DOMStringImpl("[KDOM] - ");
+    internalType->append(jsCode);
+
     Q3PtrDictIterator<EventListenerImpl> it(d->eventListeners);
     for( ; it.current(); ++it)
     {
         EventListenerImpl *current = it.current();
-        if(DOMString(current->internalType()) == internalType)
+        if((current->internalType() ? current->internalType()->string() : QString::null) == internalType->string())
             return current;
     }
     
@@ -272,7 +285,7 @@ EventListenerImpl *Ecma::createEventListener(const DOMString &type, const DOMStr
     
     KJS::List args;
     args.append(eventString);
-    args.append(KJS::String(jsCode.string()));
+    args.append(KJS::String(jsCode->string()));
 
     KJS::ObjectImp *obj = constr->construct(exec, args);
     if(exec->hadException())
@@ -288,13 +301,13 @@ EventListenerImpl *Ecma::createEventListener(const DOMString &type, const DOMStr
     if(obj)
     {
         i = new EventListenerImpl();
-        i->initListener(d->document, true, obj, obj, internalType.handle());
+        i->initListener(d->document, true, obj, obj, internalType);
         addEventListener(i, obj);
     }
     else
-        kdError() << "Unable to create event listener object for event type \"" << type << "\"" << endl;
+        kdError() << "Unable to create event listener object for event type \"" << type->string() << "\"" << endl;
 
-    KJS::Interpreter::unlock();    
+    KJS::Interpreter::unlock();
     return i;
 }
 
@@ -361,21 +374,19 @@ KJS::ValueImp *KDOM::getDOMNode(KJS::ExecState *exec, NodeImpl *n)
 
     // Reuse existing bridge, if possible
     KJS::ObjectImp *request = interpreter->getDOMObject(n);
+    if(request)
+        return request;
 
     // Try hard to ask any DOM/SVG/HTML/whatever implementation
     // which may reside on top of KDOM, how to convert the current
     // Node into an EcmaScript suitable object, use standard way as fallback
-    KJS::ObjectImp *topRequest = engine->inheritedGetDOMNode(exec, n);
+    request = engine->inheritedGetDOMNode(exec, n);
     if(request)
     {
-        if(topRequest && topRequest != request)
-            return topRequest;
-        
+        interpreter->putDOMObject(n, request);
         return request;
     }
-    else if(topRequest)
-        return topRequest;
-    
+
     switch(n->nodeType())
     {
         case ELEMENT_NODE:
@@ -477,6 +488,7 @@ KJS::ValueImp *KDOM::getDOMEvent(KJS::ExecState *exec, EventImpl *e)
     }
 
     KJS::Interpreter::lock();
+
     EventImplType identifier = e->identifier();
 
     if(identifier == TypeUIEvent)
index bfd824e..c0dc0c9 100644 (file)
 #ifndef KDOM_Ecma_H
 #define KDOM_Ecma_H
 
-#include <kjs/interpreter.h>
 #include <qvariant.h>
 
+#include <kjs/interpreter.h>
+
+class QVariant;
+
 namespace KJS
 {
     class UString;
@@ -42,10 +45,10 @@ namespace KDOM
     class CSSValueImpl;
 
     class EventImpl;
-    class DOMString;
     class CDFInterface;
     class DocumentImpl;
     class DOMStringImpl;
+    class EcmaInterface;
     class EventListenerImpl;
     class ScriptInterpreter;
 
@@ -61,13 +64,14 @@ namespace KDOM
 
         KJS::ObjectImp *globalObject() const;
         KJS::ExecState *globalExec() const;
-        
+
+        EcmaInterface *interface() const;
         ScriptInterpreter *interpreter() const;
 
         // Internal, used to handle event listeners
         KJS::ObjectImp *ecmaListenerToObject(KJS::ExecState *exec, KJS::ValueImp *listener);
 
-        EventListenerImpl *createEventListener(const DOMString &type, const DOMString &jsCode);
+        EventListenerImpl *createEventListener(DOMStringImpl *type, DOMStringImpl *jsCode);
         EventListenerImpl *createEventListener(KJS::ExecState *exec, KJS::ValueImp *listener);
         EventListenerImpl *findEventListener(KJS::ExecState *exec, KJS::ValueImp *listener);
 
diff --git a/SVGSupport/kdom/ecma/EcmaInterface.h b/SVGSupport/kdom/ecma/EcmaInterface.h
deleted file mode 100644 (file)
index de3d650..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-    Copyright (C) 2004-2005 Nikolas Zimmermann <wildfox@kde.org>
-                  2004-2005 Rob Buis <buis@kde.org>
-
-    This file is part of the KDE project
-    This file is autogenerated using 'make generatedata'!
-
-    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 KDOM_EcmaInterface_H
-#define KDOM_EcmaInterface_H
-
-namespace KJS
-{
-    class ObjectImp;
-};
-
-namespace KDOM
-{
-    class CSSMediaRule;
-    class CSSPrimitiveValue;
-    class CSSRuleList;
-    class CSSStyleDeclaration;
-    class CSSStyleSheet;
-    class CSSValueList;
-    class CharacterData;
-    class DOMConfiguration;
-    class DOMErrorHandler;
-    class DOMImplementation;
-    class DOMStringList;
-    class Document;
-    class DocumentEvent;
-    class DocumentRange;
-    class DocumentTraversal;
-    class Element;
-    class Event;
-    class EventTarget;
-    class KeyboardEvent;
-    class LSParser;
-    class LSParserFilter;
-    class LSResourceResolver;
-    class LSSerializer;
-    class MediaList;
-    class MouseEvent;
-    class MutationEvent;
-    class NamedNodeMap;
-    class Node;
-    class NodeIterator;
-    class NodeList;
-    class Range;
-    class StyleSheetList;
-    class Text;
-    class TreeWalker;
-    class TypeInfo;
-    class UIEvent;
-    class XPathEvaluator;
-    class XPathExpression;
-    class XPathNSResolver;
-    class XPathResult;
-
-    class EcmaInterface
-    {
-    public:
-        EcmaInterface() { }
-        virtual ~EcmaInterface() { }
-
-        virtual CSSMediaRule inheritedCSSMediaRuleCast(const KJS::ObjectImp *p1);
-        virtual CSSPrimitiveValue inheritedCSSPrimitiveValueCast(const KJS::ObjectImp *p1);
-        virtual CSSRuleList inheritedCSSRuleListCast(const KJS::ObjectImp *p1);
-        virtual CSSStyleDeclaration inheritedCSSStyleDeclarationCast(const KJS::ObjectImp *p1);
-        virtual CSSStyleSheet inheritedCSSStyleSheetCast(const KJS::ObjectImp *p1);
-        virtual CSSValueList inheritedCSSValueListCast(const KJS::ObjectImp *p1);
-        virtual CharacterData inheritedCharacterDataCast(const KJS::ObjectImp *p1);
-        virtual DOMConfiguration inheritedDOMConfigurationCast(const KJS::ObjectImp *p1);
-        virtual DOMErrorHandler inheritedDOMErrorHandlerCast(const KJS::ObjectImp *p1);
-        virtual DOMImplementation inheritedDOMImplementationCast(const KJS::ObjectImp *p1);
-        virtual DOMStringList inheritedDOMStringListCast(const KJS::ObjectImp *p1);
-        virtual Document inheritedDocumentCast(const KJS::ObjectImp *p1);
-        virtual DocumentEvent inheritedDocumentEventCast(const KJS::ObjectImp *p1);
-        virtual DocumentRange inheritedDocumentRangeCast(const KJS::ObjectImp *p1);
-        virtual DocumentTraversal inheritedDocumentTraversalCast(const KJS::ObjectImp *p1);
-        virtual Element inheritedElementCast(const KJS::ObjectImp *p1);
-        virtual Event inheritedEventCast(const KJS::ObjectImp *p1);
-        virtual EventTarget inheritedEventTargetCast(const KJS::ObjectImp *p1);
-        virtual KeyboardEvent inheritedKeyboardEventCast(const KJS::ObjectImp *p1);
-        virtual LSParser inheritedLSParserCast(const KJS::ObjectImp *p1);
-        virtual LSParserFilter inheritedLSParserFilterCast(const KJS::ObjectImp *p1);
-        virtual LSResourceResolver inheritedLSResourceResolverCast(const KJS::ObjectImp *p1);
-        virtual LSSerializer inheritedLSSerializerCast(const KJS::ObjectImp *p1);
-        virtual MediaList inheritedMediaListCast(const KJS::ObjectImp *p1);
-        virtual MouseEvent inheritedMouseEventCast(const KJS::ObjectImp *p1);
-        virtual MutationEvent inheritedMutationEventCast(const KJS::ObjectImp *p1);
-        virtual NamedNodeMap inheritedNamedNodeMapCast(const KJS::ObjectImp *p1);
-        virtual Node inheritedNodeCast(const KJS::ObjectImp *p1);
-        virtual NodeIterator inheritedNodeIteratorCast(const KJS::ObjectImp *p1);
-        virtual NodeList inheritedNodeListCast(const KJS::ObjectImp *p1);
-        virtual Range inheritedRangeCast(const KJS::ObjectImp *p1);
-        virtual StyleSheetList inheritedStyleSheetListCast(const KJS::ObjectImp *p1);
-        virtual Text inheritedTextCast(const KJS::ObjectImp *p1);
-        virtual TreeWalker inheritedTreeWalkerCast(const KJS::ObjectImp *p1);
-        virtual TypeInfo inheritedTypeInfoCast(const KJS::ObjectImp *p1);
-        virtual UIEvent inheritedUIEventCast(const KJS::ObjectImp *p1);
-        virtual XPathEvaluator inheritedXPathEvaluatorCast(const KJS::ObjectImp *p1);
-        virtual XPathExpression inheritedXPathExpressionCast(const KJS::ObjectImp *p1);
-        virtual XPathNSResolver inheritedXPathNSResolverCast(const KJS::ObjectImp *p1);
-        virtual XPathResult inheritedXPathResultCast(const KJS::ObjectImp *p1);
-    };
-};
-
-#endif
index fa1bb54..5b837c7 100644 (file)
 #endif
 
 #include <qstylesheet.h>
+#include <qevent.h>
+#include <qtextstream.h>
+
+#include <kdom/bindings/js/core/NodeWrapper.h>
+#include <kdom/bindings/js/core/TypeInfoWrapper.h>
+#include <kdom/bindings/js/core/DOMErrorWrapper.h>
+#include <kdom/bindings/js/core/DOMExceptionWrapper.h>
+
+#include <kdom/bindings/js/events/EventWrapper.h>
+#include <kdom/bindings/js/events/MutationEventWrapper.h>
+#include <kdom/bindings/js/events/EventExceptionWrapper.h>
+
+#include <kdom/bindings/js/css/CSSRuleWrapper.h>
+#include <kdom/bindings/js/css/CSSValueWrapper.h>
+#include <kdom/bindings/js/css/CSSPrimitiveValueWrapper.h>
+
+#include <kdom/bindings/js/range/RangeWrapper.h>
+#include <kdom/bindings/js/range/RangeExceptionWrapper.h>
+
+#include <kdom/bindings/js/traversal/NodeFilterWrapper.h>
+
+#include <kdom/bindings/js/xpath/XPathResultWrapper.h>
+#include <kdom/bindings/js/xpath/XPathExceptionWrapper.h>
+#include <kdom/bindings/js/xpath/XPathNamespaceWrapper.h>
+
+#include <kdom/bindings/js/xpointer/XPointerResultWrapper.h>
 
 #include "Ecma.h"
 #include "DOMLookup.h"
@@ -42,34 +68,41 @@ using namespace KDOM;
 
 /*
 @begin GlobalObject::s_hashTable 15
- closed            GlobalObject::Closed        DontDelete|ReadOnly
- window            GlobalObject::Window        DontDelete|ReadOnly
- evt            GlobalObject::Evt            DontDelete|ReadOnly
- document        GlobalObject::Document        DontDelete|ReadOnly
-
-# Functions
- setTimeout        GlobalObject::SetTimeout    DontDelete|Function 2
- clearTimeout    GlobalObject::ClearTimeout    DontDelete|Function 1
- setInterval    GlobalObject::SetInterval    DontDelete|Function 2
- clearInterval    GlobalObject::ClearInterval    DontDelete|Function 1
- printNode        GlobalObject::PrintNode        DontDelete|Function 1
- alert            GlobalObject::Alert            DontDelete|Function 1
- prompt            GlobalObject::Prompt        DontDelete|Function 2
- confirm        GlobalObject::Confirm        DontDelete|Function 1
- debug            GlobalObject::Debug            DontDelete|Function 1
-@end
-*/
-
-/*
-# Constructors - TODO IN THE NEW ECMA CONCEPT! FIX IT!
- Node                GlobalObject::Node                    DontDelete|Function 1
- DOMException        GlobalObject::DOMException            DontDelete|Function 1
- CSSRule            GlobalObject::CSSRule                DontDelete|Function 1
- CSSValue            GlobalObject::CSSValue                DontDelete|Function 1
- CSSPrimitiveValue    GlobalObject::CSSPrimitiveValue    DontDelete|Function 1
+ # Attributes
+ closed                GlobalObject::Closed            DontDelete|ReadOnly
+ window                GlobalObject::Window            DontDelete|ReadOnly
+ evt                GlobalObject::Evt                DontDelete|ReadOnly
+ document            GlobalObject::Document            DontDelete|ReadOnly
+
+ # Functions
+ setTimeout            GlobalObject::SetTimeout        DontDelete|Function 2
+ clearTimeout        GlobalObject::ClearTimeout        DontDelete|Function 1
+ setInterval        GlobalObject::SetInterval        DontDelete|Function 2
+ clearInterval        GlobalObject::ClearInterval        DontDelete|Function 1
+ printNode            GlobalObject::PrintNode            DontDelete|Function 1
+ alert                GlobalObject::Alert                DontDelete|Function 1
+ prompt                GlobalObject::Prompt            DontDelete|Function 2
+ confirm            GlobalObject::Confirm            DontDelete|Function 1
+ debug                GlobalObject::Debug                DontDelete|Function 1
+
+ # Constants
  Event                GlobalObject::Event                DontDelete|Function 1
- EventException        GlobalObject::EventException        DontDelete|Function 1
  MutationEvent        GlobalObject::MutationEvent        DontDelete|Function 1
+ EventException        GlobalObject::EventException    DontDelete|Function 1
+ CSSRule            GlobalObject::CSSRule            DontDelete|Function 1
+ CSSValue            GlobalObject::CSSValue            DontDelete|Function 1
+ CSSPrimitiveValue    GlobalObject::CSSPrimitiveValue    DontDelete|Function 1
+ Node                GlobalObject::Node                DontDelete|Function 1
+ TypeInfo            GlobalObject::TypeInfo            DontDelete|Function 1
+ DOMError            GlobalObject::DOMError            DontDelete|Function 1
+ DOMException        GlobalObject::DOMException        DontDelete|Function 1
+ Range                GlobalObject::Range                DontDelete|Function 1
+ RangeException        GlobalObject::RangeException    DontDelete|Function 1
+ NodeFilter            GlobalObject::NodeFilter        DontDelete|Function 1
+ XPathResult        GlobalObject::XPathResult        DontDelete|Function 1
+ XPathException        GlobalObject::XPathException    DontDelete|Function 1
+ XPathNamespace        GlobalObject::XPathNamespace    DontDelete|Function 1
+ XPointerResult        GlobalObject::XPointerResult    DontDelete|Function 1
 @end
 */
 
@@ -149,8 +182,8 @@ KJS::ValueImp *GlobalObject::get(KJS::ExecState *exec, const KJS::Identifier &p)
         {
             case GlobalObject::Window:
                 return const_cast<GlobalObject *>(this);
-/*            case GlobalObject::Evt:
-                return getDOMEvent(exec, Event(interpreter->currentEvent()));*/
+            case GlobalObject::Evt:
+                return getDOMEvent(exec, interpreter->currentEvent());
             case GlobalObject::Document:
                 // special case, Ecma::setup created it, so we don't need to do it
                 return interpreter->getDOMObject(d->document);
@@ -171,6 +204,40 @@ KJS::ValueImp *GlobalObject::get(KJS::ExecState *exec, const KJS::Identifier &p)
 #endif
                     return KJS::Undefined();
             }
+            case GlobalObject::Event:
+                return getEventConstructor(exec);
+            case GlobalObject::MutationEvent:
+                return getMutationEventConstructor(exec);
+            case GlobalObject::EventException:
+                return getEventExceptionConstructor(exec);
+            case GlobalObject::CSSRule:
+                return getCSSRuleConstructor(exec);
+            case GlobalObject::CSSValue:
+                return getCSSValueConstructor(exec);
+            case GlobalObject::CSSPrimitiveValue:
+                return getCSSPrimitiveValueConstructor(exec);
+            case GlobalObject::Node:
+                return getNodeConstructor(exec);
+            case GlobalObject::TypeInfo:
+                return getTypeInfoConstructor(exec);
+            case GlobalObject::DOMError:
+                return getDOMErrorConstructor(exec);
+            case GlobalObject::DOMException:
+                return getDOMExceptionConstructor(exec);
+            case GlobalObject::Range:
+                return getRangeConstructor(exec);
+            case GlobalObject::RangeException:
+                return getRangeExceptionConstructor(exec);
+            case GlobalObject::NodeFilter:
+                return getNodeFilterConstructor(exec);
+            case GlobalObject::XPathResult:
+                return KDOM::XPath::getXPathResultConstructor(exec);
+            case GlobalObject::XPathException:
+                return KDOM::XPath::getXPathExceptionConstructor(exec);
+            case GlobalObject::XPathNamespace:
+                return KDOM::XPath::getXPathNamespaceConstructor(exec);
+            case GlobalObject::XPointerResult:
+                return KDOM::XPointer::getXPointerResultConstructor(exec);
         }
     }
 
@@ -274,7 +341,7 @@ KJS::ValueImp *GlobalObjectFunc::callAsFunction(KJS::ExecState *exec, KJS::Objec
             //KWQ(part)->runJavaScriptAlert(str);
             fprintf(stderr, "Ignoring JavaScriptAlert: %s (l: %i)\n", str.ascii(), str.length());
 #else
-            KMessageBox::error(0, QStyleSheet::convertFromPlainText(str), QString::fromLatin1("JavaScript"));
+            KMessageBox::error(0, Q3StyleSheet::convertFromPlainText(str), QString::fromLatin1("JavaScript"));
 #endif
             return KJS::Undefined();
         case GlobalObject::Confirm:
@@ -283,7 +350,7 @@ KJS::ValueImp *GlobalObjectFunc::callAsFunction(KJS::ExecState *exec, KJS::Objec
             fprintf(stderr, "Ignoring JavaScriptConfirm: %s (l: %i)\n", str.ascii(), str.length());
             return KJS::Boolean(false);
 #else
-            return KJS::Boolean(KMessageBox::warningYesNo(0, QStyleSheet::convertFromPlainText(str), QString::fromLatin1("JavaScript"), i18n("&OK"), i18n("&Cancel")) == KMessageBox::Yes);
+            return KJS::Boolean(KMessageBox::warningYesNo(0, Q3StyleSheet::convertFromPlainText(str), QString::fromLatin1("JavaScript"), i18n("&OK"), i18n("&Cancel")) == KMessageBox::Yes);
 #endif
         case GlobalObject::Debug:
             kdDebug() << "[Debug] " << str << endl;
@@ -296,9 +363,7 @@ KJS::ValueImp *GlobalObjectFunc::callAsFunction(KJS::ExecState *exec, KJS::Objec
         {
             QString result;
             QTextOStream out(&result);
-/* FIXME
-            Helper::PrintNode(out, ecma_cast<Node>(exec, args[0], &toNode));
-*/
+            Helper::PrintNode(out, ecma_cast<NodeImpl>(exec, args[0], &toNode));
             return KJS::String(result);
         }
         case GlobalObject::Prompt:
@@ -311,9 +376,9 @@ KJS::ValueImp *GlobalObjectFunc::callAsFunction(KJS::ExecState *exec, KJS::Objec
             fprintf(stderr, "Ignoring JavaScriptPrompt: %s (l: %i)\n", str.ascii(), str.length());
 #else
             if(args.size() >= 2)
-                ret = KInputDialog::getText(i18n("Prompt"), QStyleSheet::convertFromPlainText(str), args[1].toString(exec).qstring(), &ok);
+                ret = KInputDialog::getText(i18n("Prompt"), Q3StyleSheet::convertFromPlainText(str), args[1].toString(exec).qstring(), &ok);
             else
-                ret = KInputDialog::getText(i18n("Prompt"), QStyleSheet::convertFromPlainText(str), QString::null, &ok);
+                ret = KInputDialog::getText(i18n("Prompt"), Q3StyleSheet::convertFromPlainText(str), QString::null, &ok);
 #endif
             if(ok)
                 return KJS::String(ret);
@@ -402,22 +467,19 @@ void ScheduledAction::execute(GlobalObject *global)
 
     Q_ASSERT(global->doc() != 0);
 
-/* FIXME
     ScriptInterpreter *interpreter = global->doc()->ecmaEngine()->interpreter();
     if(m_isFunction)
     {
-        if(m_func.implementsCall())
+        if(m_func->implementsCall())
         {
             KJS::ExecState *exec = interpreter->globalExec();
-            Q_ASSERT(global == interpreter->globalObject().imp());
+            Q_ASSERT(global == interpreter->globalObject());
             
-            KJS::Object obj(global);
-            m_func.call(exec, obj, m_args); // note that call() creates its own execution state for the func call
+            m_func->callAsFunction(exec, global, m_args); // note that call() creates its own execution state for the func call
         }
     }
     else
         interpreter->evaluate(m_code);
-*/
 }
 
 ////////////////////// GlobalQObject ////////////////////////
@@ -434,7 +496,7 @@ void GlobalQObject::parentDestroyed()
 {
     killTimers();
     
-    QMapIterator<int, ScheduledAction *> it;
+    QMap<int, ScheduledAction *>::Iterator it;
     for(it = scheduledActions.begin(); it != scheduledActions.end(); ++it)
     {
         ScheduledAction *action = *it;
@@ -468,7 +530,7 @@ void GlobalQObject::clearTimeout(int timerId, bool delAction)
     
     if(delAction)
     {
-        QMapIterator<int, ScheduledAction *> it = scheduledActions.find(timerId);
+        QMap<int, ScheduledAction *>::Iterator it = scheduledActions.find(timerId);
         if(it != scheduledActions.end())
         {
             ScheduledAction *action = *it;
@@ -480,7 +542,7 @@ void GlobalQObject::clearTimeout(int timerId, bool delAction)
 
 void GlobalQObject::timerEvent(QTimerEvent *e)
 {
-    QMapIterator<int, ScheduledAction *> it = scheduledActions.find(e->timerId());
+    QMap<int, ScheduledAction *>::Iterator it = scheduledActions.find(e->timerId());
     if(it != scheduledActions.end())
     {
         ScheduledAction *action = *it;
index bd23b4f..cfcdc59 100644 (file)
@@ -72,7 +72,15 @@ namespace KDOM
             // Functions
             SetTimeout, ClearTimeout, SetInterval,
             ClearInterval, PrintNode, Alert, Prompt,
-            Confirm, Debug
+            Confirm, Debug,
+
+            // Constants
+            Event, MutationEvent, EventException,
+            CSSRule, CSSValue, CSSPrimitiveValue,
+            Node, TypeInfo, DOMError, DOMException,
+            Range, RangeException, NodeFilter, XPathResult,
+            XPathException, XPathNamespace, XPointerResult
+
         };
 
     private:
index b28a900..cc43cef 100644 (file)
 #include <assert.h>
 
 #include <kdebug.h>
-#include <kjs/object.h>
 
 #include <q3ptrdict.h>
 #include <q3ptrlist.h>
+#include <kjs/object.h>
 
 #include "EventImpl.h"
 #include "DocumentImpl.h"
index aba6e44..0cfc5e8 100644 (file)
@@ -1,4 +1,224 @@
 2005-09-20  Eric Seidel  <eseidel@apple.com>
+
+        Reviewed by mjs.
+
+        Pickup latest Ecma changes from KDE, including
+        adding in the SVG ecma bindings and DOM 3 LS bindings.
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=4946
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * kdom/bindings/IDLCodeGenerator.pm:
+        * kdom/bindings/IDLCodeGeneratorCpp.pm:
+        * kdom/bindings/IDLCodeGeneratorEcmaInterface.pm: Added.
+        * kdom/bindings/IDLCodeGeneratorJs.pm:
+        * kdom/bindings/idl/core/Attr.idl:
+        * kdom/bindings/idl/core/CharacterData.idl:
+        * kdom/bindings/idl/core/DOMConfiguration.idl:
+        * kdom/bindings/idl/core/DOMException.idl:
+        * kdom/bindings/idl/core/DOMImplementation.idl:
+        * kdom/bindings/idl/core/DOMImplementationList.idl: Removed.
+        * kdom/bindings/idl/core/DOMImplementationSource.idl: Removed.
+        * kdom/bindings/idl/core/DOMString.idl: Removed.
+        * kdom/bindings/idl/core/Document.idl:
+        * kdom/bindings/idl/core/Element.idl:
+        * kdom/bindings/idl/core/NameList.idl: Removed.
+        * kdom/bindings/idl/core/NamedNodeMap.idl:
+        * kdom/bindings/idl/core/Node.idl:
+        * kdom/bindings/idl/core/ProcessingInstruction.idl:
+        * kdom/bindings/idl/core/Text.idl:
+        * kdom/bindings/idl/core/UserDataHandler.idl: Removed.
+        * kdom/bindings/idl/css/CSSCharsetRule.idl:
+        * kdom/bindings/idl/css/CSSMediaRule.idl:
+        * kdom/bindings/idl/css/CSSPageRule.idl:
+        * kdom/bindings/idl/css/CSSPrimitiveValue.idl:
+        * kdom/bindings/idl/css/CSSRule.idl:
+        * kdom/bindings/idl/css/CSSStyleDeclaration.idl:
+        * kdom/bindings/idl/css/CSSStyleRule.idl:
+        * kdom/bindings/idl/css/CSSStyleSheet.idl:
+        * kdom/bindings/idl/css/CSSValue.idl:
+        * kdom/bindings/idl/css/ViewCSS.idl: Removed.
+        * kdom/bindings/idl/events/DocumentEvent.idl:
+        * kdom/bindings/idl/events/EventException.idl:
+        * kdom/bindings/idl/events/EventTarget.idl:
+        * kdom/bindings/idl/ls/DOMImplementationLS.idl: Added.
+        * kdom/bindings/idl/ls/LSException.idl: Added.
+        * kdom/bindings/idl/ls/LSInput.idl: Added.
+        * kdom/bindings/idl/ls/LSOutput.idl: Added.
+        * kdom/bindings/idl/ls/LSParser.idl: Added.
+        * kdom/bindings/idl/ls/LSParserFilter.idl: Added.
+        * kdom/bindings/idl/ls/LSResourceResolver.idl: Added.
+        * kdom/bindings/idl/ls/LSSerializer.idl: Added.
+        * kdom/bindings/idl/ls/LSSerializerFilter.idl: Added.
+        * kdom/bindings/idl/ls/kdomdefs.idl: Added.
+        * kdom/bindings/idl/range/Range.idl:
+        * kdom/bindings/idl/range/RangeException.idl:
+        * kdom/bindings/idl/stylesheets/LinkStyle.idl:
+        * kdom/bindings/idl/stylesheets/MediaList.idl:
+        * kdom/bindings/idl/traversal/DocumentTraversal.idl:
+        * kdom/bindings/idl/traversal/NodeIterator.idl:
+        * kdom/bindings/idl/traversal/TreeWalker.idl:
+        * kdom/bindings/idl/xpath/XPathEvaluator.idl:
+        * kdom/bindings/idl/xpath/XPathException.idl:
+        * kdom/bindings/idl/xpath/XPathExpression.idl:
+        * kdom/bindings/idl/xpath/XPathNSResolver.idl:
+        * kdom/bindings/idl/xpath/XPathNamespace.idl:
+        * kdom/bindings/idl/xpath/XPathResult.idl:
+        * kdom/bindings/idl/xpointer/XPointerException.idl:
+        * kdom/bindings/kdombinder.sh:
+        * kdom/bindings/kdomidl.pl:
+        * kdom/core/CDFInterface.cpp:
+        (CDFInterface::ecmaInterface):
+        * kdom/core/CDFInterface.h:
+        * kdom/ecma/DOMBridge.h:
+        (KDOM::DOMRWBridge::put):
+        * kdom/ecma/DOMLookup.h:
+        * kdom/ecma/Ecma.cpp:
+        (Ecma::Private::Private):
+        (Ecma::setup):
+        (Ecma::setupDocument):
+        (Ecma::interface):
+        (Ecma::createEventListener):
+        (KDOM::getDOMNode):
+        (KDOM::getDOMEvent):
+        * kdom/ecma/Ecma.h:
+        * kdom/ecma/EcmaInterface.h: Removed.
+        * kdom/ecma/GlobalObject.cpp:
+        (GlobalObject::get):
+        (GlobalObjectFunc::callAsFunction):
+        (ScheduledAction::execute):
+        (GlobalQObject::parentDestroyed):
+        (GlobalQObject::clearTimeout):
+        (GlobalQObject::timerEvent):
+        * kdom/ecma/GlobalObject.h:
+        (KDOM::GlobalObject::):
+        * kdom/ecma/ScriptInterpreter.cpp:
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::begin):
+        * khtml/xml/dom_docimpl.cpp:
+        (DOMImplementationImpl::createKDOMDocument):
+        * khtml/xml/dom_docimpl.h:
+        * ksvg2/bindings/idl/svg/GetSVGDocument.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAngle.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimateColorElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimateElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimateTransformElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedAngle.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedBoolean.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedEnumeration.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedInteger.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedLength.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedLengthList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedNumber.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedNumberList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedPathData.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedPoints.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedPreserveAspectRatio.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedRect.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedString.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimatedTransformList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGAnimationElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGCircleElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGClipPathElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGColor.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGComponentTransferFunctionElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGCursorElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGDOMImplementation.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGDefsElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGDescElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGDocument.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGElementInstance.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGElementInstanceList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGEllipseElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGEvent.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGException.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGExternalResourcesRequired.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEBlendElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEColorMatrixElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEComponentTransferElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFECompositeElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEFloodElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEFuncAElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEFuncBElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEFuncGElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEFuncRElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEGaussianBlurElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEImageElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEMergeElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEMergeNodeElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFEOffsetElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFETileElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFETurbulenceElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFilterElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFilterPrimitiveStandardAttributes.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGFitToViewBox.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGGElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGGradientElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGICCColor.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGImageElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGLangSpace.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGLength.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGLengthList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGLineElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGLinearGradientElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGLocatable.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGMarkerElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGMatrix.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGNumber.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGNumberList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPaint.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSeg.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegArc.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegClosePath.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubic.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubicSmooth.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadratic.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadraticSmooth.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegLineto.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegLinetoHorizontal.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegLinetoVertical.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPathSegMoveto.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPatternElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPoint.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPointList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPolygonElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPolylineElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGPreserveAspectRatio.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGRadialGradientElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGRect.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGRectElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGRenderingIntent.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGSVGElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGScriptElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGSetElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGStopElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGStringList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGStylable.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGStyleElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGSwitchElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGSymbolElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTSpanElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTests.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTextContentElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTextElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTextPositioningElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTitleElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTransform.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTransformList.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGTransformable.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGURIReference.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGUnitTypes.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGUseElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGViewElement.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGZoomAndPan.idl: Added.
+        * ksvg2/bindings/idl/svg/SVGZoomEvent.idl: Added.
+        * ksvg2/bindings/idl/svg/kdomdefs.idl: Added.
+        * ksvg2/ecma/EcmaInterface.h: Removed.
+
+2005-09-20  Eric Seidel  <eseidel@apple.com>
         Fix by Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
 
         Reviewed by eseidel.
index 6c15f8a..1266085 100644 (file)
                A802435308AC8651001B29DA /* DOMObjectImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A802435108AC8651001B29DA /* DOMObjectImpl.h */; };
                A810E39508A4160F00333D98 /* KCanvasTreeDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = A810E39308A4160F00333D98 /* KCanvasTreeDebug.h */; };
                A810E39608A4160F00333D98 /* KCanvasTreeDebug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A810E39408A4160F00333D98 /* KCanvasTreeDebug.cpp */; };
+               A8122E7208D564B400844FA3 /* GetSVGDocumentWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122CFA08D564B100844FA3 /* GetSVGDocumentWrapper.h */; };
+               A8122E7408D564B400844FA3 /* SVGAElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122CFC08D564B100844FA3 /* SVGAElementWrapper.cpp */; };
+               A8122E7508D564B400844FA3 /* SVGAElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122CFD08D564B100844FA3 /* SVGAElementWrapper.h */; };
+               A8122E7608D564B400844FA3 /* SVGAngleWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122CFE08D564B100844FA3 /* SVGAngleWrapper.cpp */; };
+               A8122E7708D564B400844FA3 /* SVGAngleWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122CFF08D564B100844FA3 /* SVGAngleWrapper.h */; };
+               A8122E7808D564B400844FA3 /* SVGAnimateColorElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D0008D564B100844FA3 /* SVGAnimateColorElementWrapper.cpp */; };
+               A8122E7908D564B400844FA3 /* SVGAnimateColorElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D0108D564B200844FA3 /* SVGAnimateColorElementWrapper.h */; };
+               A8122E7A08D564B400844FA3 /* SVGAnimatedAngleWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D0208D564B200844FA3 /* SVGAnimatedAngleWrapper.cpp */; };
+               A8122E7B08D564B400844FA3 /* SVGAnimatedAngleWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D0308D564B200844FA3 /* SVGAnimatedAngleWrapper.h */; };
+               A8122E7C08D564B400844FA3 /* SVGAnimatedBooleanWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D0408D564B200844FA3 /* SVGAnimatedBooleanWrapper.cpp */; };
+               A8122E7D08D564B400844FA3 /* SVGAnimatedBooleanWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D0508D564B200844FA3 /* SVGAnimatedBooleanWrapper.h */; };
+               A8122E7E08D564B400844FA3 /* SVGAnimatedEnumerationWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D0608D564B200844FA3 /* SVGAnimatedEnumerationWrapper.cpp */; };
+               A8122E7F08D564B400844FA3 /* SVGAnimatedEnumerationWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D0708D564B200844FA3 /* SVGAnimatedEnumerationWrapper.h */; };
+               A8122E8008D564B400844FA3 /* SVGAnimatedIntegerWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D0808D564B200844FA3 /* SVGAnimatedIntegerWrapper.cpp */; };
+               A8122E8108D564B400844FA3 /* SVGAnimatedIntegerWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D0908D564B200844FA3 /* SVGAnimatedIntegerWrapper.h */; };
+               A8122E8208D564B400844FA3 /* SVGAnimatedLengthListWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D0A08D564B200844FA3 /* SVGAnimatedLengthListWrapper.cpp */; };
+               A8122E8308D564B400844FA3 /* SVGAnimatedLengthListWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D0B08D564B200844FA3 /* SVGAnimatedLengthListWrapper.h */; };
+               A8122E8408D564B400844FA3 /* SVGAnimatedLengthWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D0C08D564B200844FA3 /* SVGAnimatedLengthWrapper.cpp */; };
+               A8122E8508D564B400844FA3 /* SVGAnimatedLengthWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D0D08D564B200844FA3 /* SVGAnimatedLengthWrapper.h */; };
+               A8122E8608D564B400844FA3 /* SVGAnimatedNumberListWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D0E08D564B200844FA3 /* SVGAnimatedNumberListWrapper.cpp */; };
+               A8122E8708D564B400844FA3 /* SVGAnimatedNumberListWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D0F08D564B200844FA3 /* SVGAnimatedNumberListWrapper.h */; };
+               A8122E8808D564B400844FA3 /* SVGAnimatedNumberWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D1008D564B200844FA3 /* SVGAnimatedNumberWrapper.cpp */; };
+               A8122E8908D564B400844FA3 /* SVGAnimatedNumberWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D1108D564B200844FA3 /* SVGAnimatedNumberWrapper.h */; };
+               A8122E8A08D564B400844FA3 /* SVGAnimatedPathDataWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D1208D564B200844FA3 /* SVGAnimatedPathDataWrapper.cpp */; };
+               A8122E8B08D564B400844FA3 /* SVGAnimatedPathDataWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D1308D564B200844FA3 /* SVGAnimatedPathDataWrapper.h */; };
+               A8122E8C08D564B400844FA3 /* SVGAnimatedPointsWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D1408D564B200844FA3 /* SVGAnimatedPointsWrapper.cpp */; };
+               A8122E8D08D564B400844FA3 /* SVGAnimatedPointsWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D1508D564B200844FA3 /* SVGAnimatedPointsWrapper.h */; };
+               A8122E8E08D564B400844FA3 /* SVGAnimatedPreserveAspectRatioWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D1608D564B200844FA3 /* SVGAnimatedPreserveAspectRatioWrapper.cpp */; };
+               A8122E8F08D564B400844FA3 /* SVGAnimatedPreserveAspectRatioWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D1708D564B200844FA3 /* SVGAnimatedPreserveAspectRatioWrapper.h */; };
+               A8122E9008D564B400844FA3 /* SVGAnimatedRectWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D1808D564B200844FA3 /* SVGAnimatedRectWrapper.cpp */; };
+               A8122E9108D564B400844FA3 /* SVGAnimatedRectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D1908D564B200844FA3 /* SVGAnimatedRectWrapper.h */; };
+               A8122E9208D564B400844FA3 /* SVGAnimatedStringWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D1A08D564B200844FA3 /* SVGAnimatedStringWrapper.cpp */; };
+               A8122E9308D564B400844FA3 /* SVGAnimatedStringWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D1B08D564B200844FA3 /* SVGAnimatedStringWrapper.h */; };
+               A8122E9408D564B400844FA3 /* SVGAnimatedTransformListWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D1C08D564B200844FA3 /* SVGAnimatedTransformListWrapper.cpp */; };
+               A8122E9508D564B400844FA3 /* SVGAnimatedTransformListWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D1D08D564B200844FA3 /* SVGAnimatedTransformListWrapper.h */; };
+               A8122E9608D564B400844FA3 /* SVGAnimateElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D1E08D564B200844FA3 /* SVGAnimateElementWrapper.cpp */; };
+               A8122E9708D564B400844FA3 /* SVGAnimateElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D1F08D564B200844FA3 /* SVGAnimateElementWrapper.h */; };
+               A8122E9808D564B400844FA3 /* SVGAnimateTransformElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D2008D564B200844FA3 /* SVGAnimateTransformElementWrapper.cpp */; };
+               A8122E9908D564B400844FA3 /* SVGAnimateTransformElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D2108D564B200844FA3 /* SVGAnimateTransformElementWrapper.h */; };
+               A8122E9A08D564B400844FA3 /* SVGAnimationElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D2208D564B200844FA3 /* SVGAnimationElementWrapper.cpp */; };
+               A8122E9B08D564B400844FA3 /* SVGAnimationElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D2308D564B200844FA3 /* SVGAnimationElementWrapper.h */; };
+               A8122E9C08D564B400844FA3 /* SVGCircleElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D2408D564B200844FA3 /* SVGCircleElementWrapper.cpp */; };
+               A8122E9D08D564B400844FA3 /* SVGCircleElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D2508D564B200844FA3 /* SVGCircleElementWrapper.h */; };
+               A8122E9E08D564B400844FA3 /* SVGClipPathElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D2608D564B200844FA3 /* SVGClipPathElementWrapper.cpp */; };
+               A8122E9F08D564B400844FA3 /* SVGClipPathElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D2708D564B200844FA3 /* SVGClipPathElementWrapper.h */; };
+               A8122EA008D564B400844FA3 /* SVGColorWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D2808D564B200844FA3 /* SVGColorWrapper.cpp */; };
+               A8122EA108D564B400844FA3 /* SVGColorWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D2908D564B200844FA3 /* SVGColorWrapper.h */; };
+               A8122EA208D564B400844FA3 /* SVGComponentTransferFunctionElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D2A08D564B200844FA3 /* SVGComponentTransferFunctionElementWrapper.cpp */; };
+               A8122EA308D564B400844FA3 /* SVGComponentTransferFunctionElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D2B08D564B200844FA3 /* SVGComponentTransferFunctionElementWrapper.h */; };
+               A8122EA408D564B400844FA3 /* SVGCursorElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D2C08D564B200844FA3 /* SVGCursorElementWrapper.cpp */; };
+               A8122EA508D564B400844FA3 /* SVGCursorElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D2D08D564B200844FA3 /* SVGCursorElementWrapper.h */; };
+               A8122EA608D564B400844FA3 /* SVGDefsElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D2E08D564B200844FA3 /* SVGDefsElementWrapper.cpp */; };
+               A8122EA708D564B400844FA3 /* SVGDefsElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D2F08D564B200844FA3 /* SVGDefsElementWrapper.h */; };
+               A8122EA808D564B400844FA3 /* SVGDescElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D3008D564B200844FA3 /* SVGDescElementWrapper.cpp */; };
+               A8122EA908D564B400844FA3 /* SVGDescElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D3108D564B200844FA3 /* SVGDescElementWrapper.h */; };
+               A8122EAA08D564B400844FA3 /* SVGDocumentWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D3208D564B200844FA3 /* SVGDocumentWrapper.cpp */; };
+               A8122EAB08D564B400844FA3 /* SVGDocumentWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D3308D564B200844FA3 /* SVGDocumentWrapper.h */; };
+               A8122EAC08D564B400844FA3 /* SVGDOMImplementationWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D3408D564B200844FA3 /* SVGDOMImplementationWrapper.cpp */; };
+               A8122EAD08D564B400844FA3 /* SVGDOMImplementationWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D3508D564B200844FA3 /* SVGDOMImplementationWrapper.h */; };
+               A8122EAE08D564B400844FA3 /* SVGElementInstanceListWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D3608D564B200844FA3 /* SVGElementInstanceListWrapper.cpp */; };
+               A8122EAF08D564B400844FA3 /* SVGElementInstanceListWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D3708D564B200844FA3 /* SVGElementInstanceListWrapper.h */; };
+               A8122EB008D564B400844FA3 /* SVGElementInstanceWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D3808D564B200844FA3 /* SVGElementInstanceWrapper.cpp */; };
+               A8122EB108D564B400844FA3 /* SVGElementInstanceWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D3908D564B200844FA3 /* SVGElementInstanceWrapper.h */; };
+               A8122EB208D564B400844FA3 /* SVGElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D3A08D564B200844FA3 /* SVGElementWrapper.cpp */; };
+               A8122EB308D564B400844FA3 /* SVGElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D3B08D564B200844FA3 /* SVGElementWrapper.h */; };
+               A8122EB408D564B400844FA3 /* SVGEllipseElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D3C08D564B200844FA3 /* SVGEllipseElementWrapper.cpp */; };
+               A8122EB508D564B400844FA3 /* SVGEllipseElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D3D08D564B200844FA3 /* SVGEllipseElementWrapper.h */; };
+               A8122EB608D564B400844FA3 /* SVGEventWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D3E08D564B200844FA3 /* SVGEventWrapper.cpp */; };
+               A8122EB708D564B400844FA3 /* SVGEventWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D3F08D564B200844FA3 /* SVGEventWrapper.h */; };
+               A8122EB808D564B400844FA3 /* SVGExceptionWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D4008D564B200844FA3 /* SVGExceptionWrapper.cpp */; };
+               A8122EB908D564B400844FA3 /* SVGExceptionWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D4108D564B200844FA3 /* SVGExceptionWrapper.h */; };
+               A8122EBA08D564B400844FA3 /* SVGExternalResourcesRequiredWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D4208D564B200844FA3 /* SVGExternalResourcesRequiredWrapper.cpp */; };
+               A8122EBB08D564B400844FA3 /* SVGExternalResourcesRequiredWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D4308D564B200844FA3 /* SVGExternalResourcesRequiredWrapper.h */; };
+               A8122EBC08D564B400844FA3 /* SVGFEBlendElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D4408D564B200844FA3 /* SVGFEBlendElementWrapper.cpp */; };
+               A8122EBD08D564B400844FA3 /* SVGFEBlendElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D4508D564B200844FA3 /* SVGFEBlendElementWrapper.h */; };
+               A8122EBE08D564B400844FA3 /* SVGFEColorMatrixElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D4608D564B200844FA3 /* SVGFEColorMatrixElementWrapper.cpp */; };
+               A8122EBF08D564B400844FA3 /* SVGFEColorMatrixElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D4708D564B200844FA3 /* SVGFEColorMatrixElementWrapper.h */; };
+               A8122EC008D564B400844FA3 /* SVGFEComponentTransferElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D4808D564B200844FA3 /* SVGFEComponentTransferElementWrapper.cpp */; };
+               A8122EC108D564B400844FA3 /* SVGFEComponentTransferElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D4908D564B200844FA3 /* SVGFEComponentTransferElementWrapper.h */; };
+               A8122EC208D564B400844FA3 /* SVGFECompositeElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D4A08D564B200844FA3 /* SVGFECompositeElementWrapper.cpp */; };
+               A8122EC308D564B400844FA3 /* SVGFECompositeElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D4B08D564B200844FA3 /* SVGFECompositeElementWrapper.h */; };
+               A8122EC408D564B400844FA3 /* SVGFEFloodElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D4C08D564B200844FA3 /* SVGFEFloodElementWrapper.cpp */; };
+               A8122EC508D564B400844FA3 /* SVGFEFloodElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D4D08D564B200844FA3 /* SVGFEFloodElementWrapper.h */; };
+               A8122EC608D564B400844FA3 /* SVGFEFuncAElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D4E08D564B200844FA3 /* SVGFEFuncAElementWrapper.cpp */; };
+               A8122EC708D564B400844FA3 /* SVGFEFuncAElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D4F08D564B200844FA3 /* SVGFEFuncAElementWrapper.h */; };
+               A8122EC808D564B400844FA3 /* SVGFEFuncBElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D5008D564B200844FA3 /* SVGFEFuncBElementWrapper.cpp */; };
+               A8122EC908D564B400844FA3 /* SVGFEFuncBElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D5108D564B200844FA3 /* SVGFEFuncBElementWrapper.h */; };
+               A8122ECA08D564B400844FA3 /* SVGFEFuncGElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D5208D564B200844FA3 /* SVGFEFuncGElementWrapper.cpp */; };
+               A8122ECB08D564B400844FA3 /* SVGFEFuncGElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D5308D564B200844FA3 /* SVGFEFuncGElementWrapper.h */; };
+               A8122ECC08D564B400844FA3 /* SVGFEFuncRElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D5408D564B200844FA3 /* SVGFEFuncRElementWrapper.cpp */; };
+               A8122ECD08D564B400844FA3 /* SVGFEFuncRElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D5508D564B200844FA3 /* SVGFEFuncRElementWrapper.h */; };
+               A8122ECE08D564B400844FA3 /* SVGFEGaussianBlurElementWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8122D5608D564B200844FA3 /* SVGFEGaussianBlurElementWrapper.cpp */; };
+               A8122ECF08D564B400844FA3 /* SVGFEGaussianBlurElementWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8122D5708D564B200844FA3 /* SVGFEGa