WebCore:
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Aug 2006 03:33:34 +0000 (03:33 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Aug 2006 03:33:34 +0000 (03:33 +0000)
        Reviewed by Tim H.

        - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=4624
          WebCore needs autogenerated Obj-C DOM bindings

          First round of auto-generated Objective C DOM bindings, starting
          with the DOM Core.

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOM.mm:
        (-[DOMNode description]):
        (-[DOMNode KJS::Bindings::]):
        (-[DOMNode dispatchEvent:]):
        (-[DOMNamedNodeMap _initWithNamedNodeMap:]):
        (+[DOMNamedNodeMap _namedNodeMapWith:]):
        (-[DOMNodeList _initWithNodeList:]):
        (+[DOMNodeList _nodeListWith:]):
        (-[DOMImplementation _initWithDOMImplementation:]):
        (+[DOMImplementation _DOMImplementationWith:]):
        (-[DOMImplementation _DOMImplementation]):
        (+[DOMDocumentFragment _documentFragmentWith:]):
        (-[DOMDocumentFragment _fragment]):
        (-[DOMDocument createCSSStyleDeclaration]):
        (+[DOMDocument _documentWith:]):
        (-[DOMDocument _document]):
        (-[DOMDocument _ownerElement]):
        (+[DOMAttr _attrWith:]):
        (-[DOMAttr _attr]):
        (+[DOMDocumentType _documentTypeWith:WebCore::]):
        (-[DOMDocumentType WebCore::]):
        (+[DOMText _textWith:WebCore::]):
        (+[DOMComment _commentWith:WebCore::]):
        (+[DOMCDATASection _CDATASectionWith:WebCore::]):
        (+[DOMProcessingInstruction _processingInstructionWith:WebCore::]):
        (+[DOMEntityReference _entityReferenceWith:WebCore::]):
        * bindings/objc/DOMCSS.h:
        * bindings/objc/DOMCSS.mm:
        * bindings/objc/DOMCore.h:
        * bindings/objc/DOMEvents.h:
        * bindings/objc/DOMEvents.mm:
        * bindings/objc/DOMExtensions.h:
        * bindings/objc/DOMHTML.mm:
        (+[DOMHTMLDocument _HTMLDocumentWith:WebCore::]):
        * bindings/objc/DOMHTMLInternal.h:
        * bindings/objc/DOMImplementationFront.h:
        * bindings/objc/DOMInternal.h:
        * bindings/objc/DOMNode.h: Added.
        * bindings/objc/DOMNode.mm: Added.
        (-[DOMNode dealloc]):
        (-[DOMNode finalize]):
        (-[DOMNode nodeName]):
        (-[DOMNode nodeValue]):
        (-[DOMNode setNodeValue:]):
        (-[DOMNode nodeType]):
        (-[DOMNode parentNode]):
        (-[DOMNode childNodes]):
        (-[DOMNode firstChild]):
        (-[DOMNode lastChild]):
        (-[DOMNode previousSibling]):
        (-[DOMNode nextSibling]):
        (-[DOMNode attributes]):
        (-[DOMNode ownerDocument]):
        (-[DOMNode insertBefore::]):
        (-[DOMNode replaceChild::]):
        (-[DOMNode removeChild:]):
        (-[DOMNode appendChild:]):
        (-[DOMNode hasChildNodes]):
        (-[DOMNode cloneNode:]):
        (-[DOMNode normalize]):
        (-[DOMNode isSupported::]):
        (-[DOMNode namespaceURI]):
        (-[DOMNode prefix]):
        (-[DOMNode setPrefix:]):
        (-[DOMNode localName]):
        (-[DOMNode hasAttributes]):
        (-[DOMNode isSameNode:]):
        (-[DOMNode isEqualNode:]):
        (-[DOMNode isDefaultNamespace:]):
        (-[DOMNode lookupPrefix:]):
        (-[DOMNode lookupNamespaceURI:]):
        (-[DOMNode textContent]):
        (-[DOMNode setTextContent:]):
        (-[DOMNode boundingBox]):
        (-[DOMNode lineBoxRects]):
        * bindings/objc/DOMObject.h: Added.
        * bindings/objc/DOMObject.mm: Added.
        (-[DOMObject init]):
        (-[DOMObject dealloc]):
        (-[DOMObject finalize]):
        (-[DOMObject copyWithZone:]):
        (-[DOMObject sheet]):
        * bindings/objc/DOMPrivate.h:
        * bindings/objc/DOMRange.h:
        * bindings/objc/DOMStylesheets.h:
        * bindings/objc/DOMTraversal.h:
        * bindings/objc/DOMViews.h:
        * bindings/objc/DOMViews.mm:
        * bindings/objc/DOMXPath.h:
        * bindings/objc/DOMXPath.mm:
        * bindings/scripts/CodeGenerator.pm:
        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorObjC.pm: Added.
        * dom/Attr.idl:
        * dom/CDATASection.idl: Added.
        * dom/Comment.idl: Added.
        * dom/DOMImplementation.idl:
        * dom/Document.idl:
        * dom/Element.idl:
        * dom/EntityReference.idl: Added.
        * dom/NamedNodeMap.idl: Added.
        * dom/NodeList.idl: Added.
        * dom/ProcessingInstruction.idl:

WebKit:

        Reviewed by Tim H.

        - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=4624
          WebCore needs autogenerated Obj-C DOM bindings

          First round of auto-generated Objective C DOM bindings, starting
          with the DOM Core.

        * WebKit.xcodeproj/project.pbxproj:

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

41 files changed:
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMCSS.h
WebCore/bindings/objc/DOMCSS.mm
WebCore/bindings/objc/DOMCore.h
WebCore/bindings/objc/DOMEvents.h
WebCore/bindings/objc/DOMEvents.mm
WebCore/bindings/objc/DOMExtensions.h
WebCore/bindings/objc/DOMHTML.mm
WebCore/bindings/objc/DOMHTMLInternal.h
WebCore/bindings/objc/DOMImplementationFront.h
WebCore/bindings/objc/DOMInternal.h
WebCore/bindings/objc/DOMNode.h [new file with mode: 0644]
WebCore/bindings/objc/DOMNode.mm [new file with mode: 0644]
WebCore/bindings/objc/DOMObject.h [new file with mode: 0644]
WebCore/bindings/objc/DOMObject.mm [new file with mode: 0644]
WebCore/bindings/objc/DOMPrivate.h
WebCore/bindings/objc/DOMRange.h
WebCore/bindings/objc/DOMStylesheets.h
WebCore/bindings/objc/DOMTraversal.h
WebCore/bindings/objc/DOMViews.h
WebCore/bindings/objc/DOMViews.mm
WebCore/bindings/objc/DOMXPath.h
WebCore/bindings/objc/DOMXPath.mm
WebCore/bindings/scripts/CodeGenerator.pm
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bindings/scripts/CodeGeneratorObjC.pm [new file with mode: 0644]
WebCore/dom/Attr.idl
WebCore/dom/CDATASection.idl [new file with mode: 0644]
WebCore/dom/Comment.idl [new file with mode: 0644]
WebCore/dom/DOMImplementation.idl
WebCore/dom/Document.idl
WebCore/dom/Element.idl
WebCore/dom/EntityReference.idl [new file with mode: 0644]
WebCore/dom/NamedNodeMap.idl [new file with mode: 0644]
WebCore/dom/NodeList.idl [new file with mode: 0644]
WebCore/dom/ProcessingInstruction.idl
WebKit/ChangeLog
WebKit/WebKit.xcodeproj/project.pbxproj

index 0329aa4f1ac07050a3df1e6085f75850f5b55116..d55d2770c44cf1e046549b1d6683efc9f8773d16 100644 (file)
@@ -1,3 +1,119 @@
+2006-08-27  Sam Weinig  <sam.weinig@gmail.com>
+
+        Reviewed by Tim H.
+
+        - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=4624
+          WebCore needs autogenerated Obj-C DOM bindings
+
+          First round of auto-generated Objective C DOM bindings, starting
+          with the DOM Core.
+
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/objc/DOM.mm:
+        (-[DOMNode description]):
+        (-[DOMNode KJS::Bindings::]):
+        (-[DOMNode dispatchEvent:]):
+        (-[DOMNamedNodeMap _initWithNamedNodeMap:]):
+        (+[DOMNamedNodeMap _namedNodeMapWith:]):
+        (-[DOMNodeList _initWithNodeList:]):
+        (+[DOMNodeList _nodeListWith:]):
+        (-[DOMImplementation _initWithDOMImplementation:]):
+        (+[DOMImplementation _DOMImplementationWith:]):
+        (-[DOMImplementation _DOMImplementation]):
+        (+[DOMDocumentFragment _documentFragmentWith:]):
+        (-[DOMDocumentFragment _fragment]):
+        (-[DOMDocument createCSSStyleDeclaration]):
+        (+[DOMDocument _documentWith:]):
+        (-[DOMDocument _document]):
+        (-[DOMDocument _ownerElement]):
+        (+[DOMAttr _attrWith:]):
+        (-[DOMAttr _attr]):
+        (+[DOMDocumentType _documentTypeWith:WebCore::]):
+        (-[DOMDocumentType WebCore::]):
+        (+[DOMText _textWith:WebCore::]):
+        (+[DOMComment _commentWith:WebCore::]):
+        (+[DOMCDATASection _CDATASectionWith:WebCore::]):
+        (+[DOMProcessingInstruction _processingInstructionWith:WebCore::]):
+        (+[DOMEntityReference _entityReferenceWith:WebCore::]):
+        * bindings/objc/DOMCSS.h:
+        * bindings/objc/DOMCSS.mm:
+        * bindings/objc/DOMCore.h:
+        * bindings/objc/DOMEvents.h:
+        * bindings/objc/DOMEvents.mm:
+        * bindings/objc/DOMExtensions.h:
+        * bindings/objc/DOMHTML.mm:
+        (+[DOMHTMLDocument _HTMLDocumentWith:WebCore::]):
+        * bindings/objc/DOMHTMLInternal.h:
+        * bindings/objc/DOMImplementationFront.h:
+        * bindings/objc/DOMInternal.h:
+        * bindings/objc/DOMNode.h: Added.
+        * bindings/objc/DOMNode.mm: Added.
+        (-[DOMNode dealloc]):
+        (-[DOMNode finalize]):
+        (-[DOMNode nodeName]):
+        (-[DOMNode nodeValue]):
+        (-[DOMNode setNodeValue:]):
+        (-[DOMNode nodeType]):
+        (-[DOMNode parentNode]):
+        (-[DOMNode childNodes]):
+        (-[DOMNode firstChild]):
+        (-[DOMNode lastChild]):
+        (-[DOMNode previousSibling]):
+        (-[DOMNode nextSibling]):
+        (-[DOMNode attributes]):
+        (-[DOMNode ownerDocument]):
+        (-[DOMNode insertBefore::]):
+        (-[DOMNode replaceChild::]):
+        (-[DOMNode removeChild:]):
+        (-[DOMNode appendChild:]):
+        (-[DOMNode hasChildNodes]):
+        (-[DOMNode cloneNode:]):
+        (-[DOMNode normalize]):
+        (-[DOMNode isSupported::]):
+        (-[DOMNode namespaceURI]):
+        (-[DOMNode prefix]):
+        (-[DOMNode setPrefix:]):
+        (-[DOMNode localName]):
+        (-[DOMNode hasAttributes]):
+        (-[DOMNode isSameNode:]):
+        (-[DOMNode isEqualNode:]):
+        (-[DOMNode isDefaultNamespace:]):
+        (-[DOMNode lookupPrefix:]):
+        (-[DOMNode lookupNamespaceURI:]):
+        (-[DOMNode textContent]):
+        (-[DOMNode setTextContent:]):
+        (-[DOMNode boundingBox]):
+        (-[DOMNode lineBoxRects]):
+        * bindings/objc/DOMObject.h: Added.
+        * bindings/objc/DOMObject.mm: Added.
+        (-[DOMObject init]):
+        (-[DOMObject dealloc]):
+        (-[DOMObject finalize]):
+        (-[DOMObject copyWithZone:]):
+        (-[DOMObject sheet]):
+        * bindings/objc/DOMPrivate.h:
+        * bindings/objc/DOMRange.h:
+        * bindings/objc/DOMStylesheets.h:
+        * bindings/objc/DOMTraversal.h:
+        * bindings/objc/DOMViews.h:
+        * bindings/objc/DOMViews.mm:
+        * bindings/objc/DOMXPath.h:
+        * bindings/objc/DOMXPath.mm:
+        * bindings/scripts/CodeGenerator.pm:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * bindings/scripts/CodeGeneratorObjC.pm: Added.
+        * dom/Attr.idl:
+        * dom/CDATASection.idl: Added.
+        * dom/Comment.idl: Added.
+        * dom/DOMImplementation.idl:
+        * dom/Document.idl:
+        * dom/Element.idl:
+        * dom/EntityReference.idl: Added.
+        * dom/NamedNodeMap.idl: Added.
+        * dom/NodeList.idl: Added.
+        * dom/ProcessingInstruction.idl:
+
 2006-08-27  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by Tim H.
index 209b789bb6b975d8202d601b7ceec88e06b1a71d..34fbaf73f65d55a337e66e8d984bb143f09afce7 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -27,6 +28,7 @@
 VPATH = \
     $(WebCore) \
     $(WebCore)/bindings/js \
+    $(WebCore)/bindings/objc \
     $(WebCore)/css \
     $(WebCore)/dom \
     $(WebCore)/html \
@@ -44,6 +46,22 @@ all : \
     CharsetData.cpp \
     ColorData.c \
     DocTypeStrings.cpp \
+    DOMAttr.h \
+    DOMCDATASection.h \
+    DOMCharacterData.h \
+    DOMComment.h \
+    DOMDOMImplementation.h \
+    DOMDocument.h \
+    DOMDocumentFragment.h \
+    DOMDocumentType.h \
+    DOMElement.h \
+    DOMEntity.h \
+    DOMEntityReference.h \
+    DOMNamedNodeMap.h \
+    DOMNodeList.h \
+    DOMNotation.h \
+    DOMProcessingInstruction.h \
+    DOMText.h \
     HTMLEntityNames.c \
     JSAttr.h \
     JSCSSPrimitiveValue.h \
@@ -287,6 +305,19 @@ ksvgcssvalues.h :
 
 endif
 
+# new-style Objective-C bindings
+
+OBJC_BINDINGS_SCRIPTS = \
+    bindings/scripts/CodeGenerator.pm \
+    bindings/scripts/CodeGeneratorObjC.pm \
+    bindings/scripts/IDLParser.pm \
+    bindings/scripts/IDLStructure.pm \
+    bindings/scripts/generate-bindings.pl \
+#
+
+DOM%.h : %.idl $(OBJC_BINDINGS_SCRIPTS)
+       perl -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES)" --generator ObjC --include dom --include html --include xpath --include ksvg2/svg --outputdir  . $<
+
 # new-style JavaScript bindings
 
 JS_BINDINGS_SCRIPTS = \
index 25dbdbf0e19a7112a63c684698cdd8342c360bf7..97f6d090518967d15d6a719262e9a69731019f90 100644 (file)
                85031B4F0A44EFC700F992E0 /* UIEventWithKeyState.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B390A44EFC700F992E0 /* UIEventWithKeyState.h */; };
                85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B3A0A44EFC700F992E0 /* WheelEvent.cpp */; };
                85031B510A44EFC700F992E0 /* WheelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B3B0A44EFC700F992E0 /* WheelEvent.h */; };
+               85089CC80A98C22600A275AA /* Comment.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85089CC70A98C22600A275AA /* Comment.idl */; };
+               85089CCA0A98C2AB00A275AA /* CDATASection.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85089CC90A98C2AB00A275AA /* CDATASection.idl */; };
+               85089CCC0A98C33A00A275AA /* EntityReference.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85089CCB0A98C33A00A275AA /* EntityReference.idl */; };
+               85089CD70A98C42800A275AA /* DOMCDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 85089CCF0A98C42700A275AA /* DOMCDATASection.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85089CD80A98C42800A275AA /* DOMCDATASection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85089CD00A98C42700A275AA /* DOMCDATASection.mm */; };
+               85089CD90A98C42800A275AA /* DOMComment.h in Headers */ = {isa = PBXBuildFile; fileRef = 85089CD10A98C42700A275AA /* DOMComment.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85089CDA0A98C42800A275AA /* DOMComment.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85089CD20A98C42700A275AA /* DOMComment.mm */; };
+               85089CDB0A98C42800A275AA /* DOMDocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 85089CD30A98C42800A275AA /* DOMDocumentFragment.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85089CDC0A98C42800A275AA /* DOMDocumentFragment.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85089CD40A98C42800A275AA /* DOMDocumentFragment.mm */; };
+               85089CDD0A98C42800A275AA /* DOMEntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 85089CD50A98C42800A275AA /* DOMEntityReference.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85089CDE0A98C42800A275AA /* DOMEntityReference.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85089CD60A98C42800A275AA /* DOMEntityReference.mm */; };
+               8518DCE90A9CC80D0091B7A6 /* DOMDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8518DCE70A9CC80C0091B7A6 /* DOMDOMImplementation.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               8518DCEA0A9CC80D0091B7A6 /* DOMDOMImplementation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8518DCE80A9CC80D0091B7A6 /* DOMDOMImplementation.mm */; };
+               8518DD780A9CF31B0091B7A6 /* DOMNamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8518DD760A9CF31B0091B7A6 /* DOMNamedNodeMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               8518DD790A9CF31B0091B7A6 /* DOMNamedNodeMap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8518DD770A9CF31B0091B7A6 /* DOMNamedNodeMap.mm */; };
                85217E020A5ECD4700DB8D00 /* XSLImportRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85217E000A5ECD4700DB8D00 /* XSLImportRule.cpp */; };
                85217E030A5ECD4700DB8D00 /* XSLImportRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 85217E010A5ECD4700DB8D00 /* XSLImportRule.h */; };
                854FE7300A2297BE0058D7AD /* NodeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 854FE7260A2297BE0058D7AD /* NodeFilter.cpp */; };
                854FE7370A2297BE0058D7AD /* Traversal.h in Headers */ = {isa = PBXBuildFile; fileRef = 854FE72D0A2297BE0058D7AD /* Traversal.h */; };
                854FE7380A2297BE0058D7AD /* TreeWalker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 854FE72E0A2297BE0058D7AD /* TreeWalker.cpp */; };
                854FE7390A2297BE0058D7AD /* TreeWalker.h in Headers */ = {isa = PBXBuildFile; fileRef = 854FE72F0A2297BE0058D7AD /* TreeWalker.h */; };
+               856C89FC0A90F068005C687B /* DOMNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 856C89FA0A90F068005C687B /* DOMNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               856C89FD0A90F068005C687B /* DOMNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 856C89FB0A90F068005C687B /* DOMNode.mm */; };
+               856C8AE40A912649005C687B /* DOMObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 856C8AE20A912649005C687B /* DOMObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               856C8AE50A912649005C687B /* DOMObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 856C8AE30A912649005C687B /* DOMObject.mm */; };
+               85ACA9860A9B520300671E90 /* DOMCharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACA9840A9B520300671E90 /* DOMCharacterData.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85ACA9870A9B520300671E90 /* DOMCharacterData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACA9850A9B520300671E90 /* DOMCharacterData.mm */; };
+               85ACA99C0A9B575900671E90 /* DOMText.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACA99A0A9B575900671E90 /* DOMText.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85ACA99D0A9B575900671E90 /* DOMText.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACA99B0A9B575900671E90 /* DOMText.mm */; };
+               85ACA9C00A9B5FA500671E90 /* DOMElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACA9BE0A9B5FA500671E90 /* DOMElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85ACA9C10A9B5FA500671E90 /* DOMElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACA9BF0A9B5FA500671E90 /* DOMElement.mm */; };
+               85ACA9FB0A9B631000671E90 /* NamedNodeMap.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85ACA9F90A9B631000671E90 /* NamedNodeMap.idl */; };
+               85ACA9FC0A9B631000671E90 /* NodeList.idl in Resources */ = {isa = PBXBuildFile; fileRef = 85ACA9FA0A9B631000671E90 /* NodeList.idl */; };
+               85ACAA8D0A9B759C00671E90 /* DOMNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACAA890A9B759C00671E90 /* DOMNodeList.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85ACAA8E0A9B759C00671E90 /* DOMNodeList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACAA8A0A9B759C00671E90 /* DOMNodeList.mm */; };
+               85ACABB00A9CAF8000671E90 /* DOMDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACABAE0A9CAF8000671E90 /* DOMDocument.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85ACABB10A9CAF8000671E90 /* DOMDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACABAF0A9CAF8000671E90 /* DOMDocument.mm */; };
+               85CA96B80A9621A600690CCF /* DOMEntity.h in Headers */ = {isa = PBXBuildFile; fileRef = 85CA96B60A9621A600690CCF /* DOMEntity.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85CA96B90A9621A600690CCF /* DOMEntity.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85CA96B70A9621A600690CCF /* DOMEntity.mm */; };
+               85CA96EA0A9624E900690CCF /* DOMNotation.h in Headers */ = {isa = PBXBuildFile; fileRef = 85CA96E80A9624E900690CCF /* DOMNotation.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85CA96EB0A9624E900690CCF /* DOMNotation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85CA96E90A9624E900690CCF /* DOMNotation.mm */; };
+               85CA975C0A962E5400690CCF /* DOMDocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 85CA975A0A962E5400690CCF /* DOMDocumentType.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85CA975D0A962E5400690CCF /* DOMDocumentType.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85CA975B0A962E5400690CCF /* DOMDocumentType.mm */; };
+               85D389B20A991A7F00282145 /* DOMAttr.h in Headers */ = {isa = PBXBuildFile; fileRef = 85D389B00A991A7F00282145 /* DOMAttr.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85D389B30A991A7F00282145 /* DOMAttr.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85D389B10A991A7F00282145 /* DOMAttr.mm */; };
                85EC9AFA0A71A2C600EEEAED /* FontData.h in Headers */ = {isa = PBXBuildFile; fileRef = 85EC9AF80A71A2C600EEEAED /* FontData.h */; };
                85EC9AFB0A71A2C600EEEAED /* Language.h in Headers */ = {isa = PBXBuildFile; fileRef = 85EC9AF90A71A2C600EEEAED /* Language.h */; };
+               85F56A7A0A98CE3700ADB60A /* DOMProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 85F56A780A98CE3700ADB60A /* DOMProcessingInstruction.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               85F56A7B0A98CE3700ADB60A /* DOMProcessingInstruction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85F56A790A98CE3700ADB60A /* DOMProcessingInstruction.mm */; };
                93032CC809AEC34300F82A18 /* PathCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93032CC709AEC34300F82A18 /* PathCG.cpp */; };
                93032CCA09AEC34B00F82A18 /* Path.h in Headers */ = {isa = PBXBuildFile; fileRef = 93032CC909AEC34B00F82A18 /* Path.h */; };
                9305B24D098F1B6B00C28855 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9305B24C098F1B6B00C28855 /* Timer.h */; };
                85031B390A44EFC700F992E0 /* UIEventWithKeyState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UIEventWithKeyState.h; sourceTree = "<group>"; };
                85031B3A0A44EFC700F992E0 /* WheelEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = WheelEvent.cpp; sourceTree = "<group>"; };
                85031B3B0A44EFC700F992E0 /* WheelEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WheelEvent.h; sourceTree = "<group>"; };
+               85089CC70A98C22600A275AA /* Comment.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Comment.idl; sourceTree = "<group>"; };
+               85089CC90A98C2AB00A275AA /* CDATASection.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CDATASection.idl; sourceTree = "<group>"; };
+               85089CCB0A98C33A00A275AA /* EntityReference.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = EntityReference.idl; sourceTree = "<group>"; };
+               85089CCF0A98C42700A275AA /* DOMCDATASection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCDATASection.h; sourceTree = "<group>"; };
+               85089CD00A98C42700A275AA /* DOMCDATASection.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMCDATASection.mm; sourceTree = "<group>"; };
+               85089CD10A98C42700A275AA /* DOMComment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMComment.h; sourceTree = "<group>"; };
+               85089CD20A98C42700A275AA /* DOMComment.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMComment.mm; sourceTree = "<group>"; };
+               85089CD30A98C42800A275AA /* DOMDocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMDocumentFragment.h; sourceTree = "<group>"; };
+               85089CD40A98C42800A275AA /* DOMDocumentFragment.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMDocumentFragment.mm; sourceTree = "<group>"; };
+               85089CD50A98C42800A275AA /* DOMEntityReference.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEntityReference.h; sourceTree = "<group>"; };
+               85089CD60A98C42800A275AA /* DOMEntityReference.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMEntityReference.mm; sourceTree = "<group>"; };
+               8518DCE70A9CC80C0091B7A6 /* DOMDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMDOMImplementation.h; sourceTree = "<group>"; };
+               8518DCE80A9CC80D0091B7A6 /* DOMDOMImplementation.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMDOMImplementation.mm; sourceTree = "<group>"; };
+               8518DD760A9CF31B0091B7A6 /* DOMNamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMNamedNodeMap.h; sourceTree = "<group>"; };
+               8518DD770A9CF31B0091B7A6 /* DOMNamedNodeMap.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNamedNodeMap.mm; sourceTree = "<group>"; };
                85217E000A5ECD4700DB8D00 /* XSLImportRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XSLImportRule.cpp; sourceTree = "<group>"; };
                85217E010A5ECD4700DB8D00 /* XSLImportRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XSLImportRule.h; sourceTree = "<group>"; };
                854FE7260A2297BE0058D7AD /* NodeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeFilter.cpp; sourceTree = "<group>"; };
                854FE72D0A2297BE0058D7AD /* Traversal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Traversal.h; sourceTree = "<group>"; };
                854FE72E0A2297BE0058D7AD /* TreeWalker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TreeWalker.cpp; sourceTree = "<group>"; };
                854FE72F0A2297BE0058D7AD /* TreeWalker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TreeWalker.h; sourceTree = "<group>"; };
+               856C89FA0A90F068005C687B /* DOMNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMNode.h; sourceTree = "<group>"; };
+               856C89FB0A90F068005C687B /* DOMNode.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNode.mm; sourceTree = "<group>"; };
+               856C8AE20A912649005C687B /* DOMObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMObject.h; sourceTree = "<group>"; };
+               856C8AE30A912649005C687B /* DOMObject.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMObject.mm; sourceTree = "<group>"; };
+               859B7FB90A8D288800A5F1EA /* CodeGeneratorObjC.pm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.perl; name = CodeGeneratorObjC.pm; path = bindings/scripts/CodeGeneratorObjC.pm; sourceTree = SOURCE_ROOT; };
+               85ACA9840A9B520300671E90 /* DOMCharacterData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCharacterData.h; sourceTree = "<group>"; };
+               85ACA9850A9B520300671E90 /* DOMCharacterData.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMCharacterData.mm; sourceTree = "<group>"; };
+               85ACA99A0A9B575900671E90 /* DOMText.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMText.h; sourceTree = "<group>"; };
+               85ACA99B0A9B575900671E90 /* DOMText.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMText.mm; sourceTree = "<group>"; };
+               85ACA9BE0A9B5FA500671E90 /* DOMElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMElement.h; sourceTree = "<group>"; };
+               85ACA9BF0A9B5FA500671E90 /* DOMElement.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMElement.mm; sourceTree = "<group>"; };
+               85ACA9F90A9B631000671E90 /* NamedNodeMap.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NamedNodeMap.idl; sourceTree = "<group>"; };
+               85ACA9FA0A9B631000671E90 /* NodeList.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NodeList.idl; sourceTree = "<group>"; };
+               85ACAA890A9B759C00671E90 /* DOMNodeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMNodeList.h; sourceTree = "<group>"; };
+               85ACAA8A0A9B759C00671E90 /* DOMNodeList.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNodeList.mm; sourceTree = "<group>"; };
+               85ACABAE0A9CAF8000671E90 /* DOMDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMDocument.h; sourceTree = "<group>"; };
+               85ACABAF0A9CAF8000671E90 /* DOMDocument.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMDocument.mm; sourceTree = "<group>"; };
+               85CA96B60A9621A600690CCF /* DOMEntity.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEntity.h; sourceTree = "<group>"; };
+               85CA96B70A9621A600690CCF /* DOMEntity.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMEntity.mm; sourceTree = "<group>"; };
+               85CA96E80A9624E900690CCF /* DOMNotation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMNotation.h; sourceTree = "<group>"; };
+               85CA96E90A9624E900690CCF /* DOMNotation.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNotation.mm; sourceTree = "<group>"; };
+               85CA975A0A962E5400690CCF /* DOMDocumentType.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMDocumentType.h; sourceTree = "<group>"; };
+               85CA975B0A962E5400690CCF /* DOMDocumentType.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMDocumentType.mm; sourceTree = "<group>"; };
+               85D389B00A991A7F00282145 /* DOMAttr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMAttr.h; sourceTree = "<group>"; };
+               85D389B10A991A7F00282145 /* DOMAttr.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMAttr.mm; sourceTree = "<group>"; };
                85EC9AF80A71A2C600EEEAED /* FontData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontData.h; sourceTree = "<group>"; };
                85EC9AF90A71A2C600EEEAED /* Language.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Language.h; sourceTree = "<group>"; };
+               85F56A780A98CE3700ADB60A /* DOMProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMProcessingInstruction.h; sourceTree = "<group>"; };
+               85F56A790A98CE3700ADB60A /* DOMProcessingInstruction.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMProcessingInstruction.mm; sourceTree = "<group>"; };
                93032CC709AEC34300F82A18 /* PathCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathCG.cpp; sourceTree = "<group>"; };
                93032CC909AEC34B00F82A18 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Path.h; sourceTree = "<group>"; };
                9305B24C098F1B6B00C28855 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = "<group>"; };
                        path = mac;
                        sourceTree = "<group>";
                };
+               854F12AC0A8EBC18000940B5 /* Core */ = {
+                       isa = PBXGroup;
+                       children = (
+                               856C89FA0A90F068005C687B /* DOMNode.h */,
+                               856C89FB0A90F068005C687B /* DOMNode.mm */,
+                               856C8AE20A912649005C687B /* DOMObject.h */,
+                               856C8AE30A912649005C687B /* DOMObject.mm */,
+                       );
+                       name = Core;
+                       sourceTree = "<group>";
+               };
+               85B232260A8BF3A100FDF47B /* Derived Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               85D389B00A991A7F00282145 /* DOMAttr.h */,
+                               85D389B10A991A7F00282145 /* DOMAttr.mm */,
+                               85089CCF0A98C42700A275AA /* DOMCDATASection.h */,
+                               85089CD00A98C42700A275AA /* DOMCDATASection.mm */,
+                               85ACA9840A9B520300671E90 /* DOMCharacterData.h */,
+                               85ACA9850A9B520300671E90 /* DOMCharacterData.mm */,
+                               85089CD10A98C42700A275AA /* DOMComment.h */,
+                               85089CD20A98C42700A275AA /* DOMComment.mm */,
+                               8518DCE70A9CC80C0091B7A6 /* DOMDOMImplementation.h */,
+                               8518DCE80A9CC80D0091B7A6 /* DOMDOMImplementation.mm */,
+                               85ACABAE0A9CAF8000671E90 /* DOMDocument.h */,
+                               85ACABAF0A9CAF8000671E90 /* DOMDocument.mm */,
+                               85089CD30A98C42800A275AA /* DOMDocumentFragment.h */,
+                               85089CD40A98C42800A275AA /* DOMDocumentFragment.mm */,
+                               85CA975A0A962E5400690CCF /* DOMDocumentType.h */,
+                               85CA975B0A962E5400690CCF /* DOMDocumentType.mm */,
+                               85ACA9BE0A9B5FA500671E90 /* DOMElement.h */,
+                               85ACA9BF0A9B5FA500671E90 /* DOMElement.mm */,
+                               85CA96B60A9621A600690CCF /* DOMEntity.h */,
+                               85CA96B70A9621A600690CCF /* DOMEntity.mm */,
+                               85089CD50A98C42800A275AA /* DOMEntityReference.h */,
+                               85089CD60A98C42800A275AA /* DOMEntityReference.mm */,
+                               8518DD760A9CF31B0091B7A6 /* DOMNamedNodeMap.h */,
+                               8518DD770A9CF31B0091B7A6 /* DOMNamedNodeMap.mm */,
+                               85ACAA890A9B759C00671E90 /* DOMNodeList.h */,
+                               85ACAA8A0A9B759C00671E90 /* DOMNodeList.mm */,
+                               85CA96E80A9624E900690CCF /* DOMNotation.h */,
+                               85CA96E90A9624E900690CCF /* DOMNotation.mm */,
+                               85F56A780A98CE3700ADB60A /* DOMProcessingInstruction.h */,
+                               85F56A790A98CE3700ADB60A /* DOMProcessingInstruction.mm */,
+                               85ACA99A0A9B575900671E90 /* DOMText.h */,
+                               85ACA99B0A9B575900671E90 /* DOMText.mm */,
+                       );
+                       name = "Derived Sources";
+                       path = DerivedSources/WebCore;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
                93032CCC09AEC36200F82A18 /* cg */ = {
                        isa = PBXGroup;
                        children = (
                BC1A3794097C6FC40019F3D8 /* objc */ = {
                        isa = PBXGroup;
                        children = (
-                               1CAF347E0A6C405200ABE06E /* WebScriptObject.h */,
-                               1CAF347F0A6C405200ABE06E /* WebScriptObject.mm */,
-                               1CAF34800A6C405200ABE06E /* WebScriptObjectPrivate.h */,
+                               85B232260A8BF3A100FDF47B /* Derived Sources */,
+                               854F12AC0A8EBC18000940B5 /* Core */,
+                               859B7FB90A8D288800A5F1EA /* CodeGeneratorObjC.pm */,
                                BC1A3797097C715F0019F3D8 /* DOM.h */,
                                BC1A3798097C715F0019F3D8 /* DOM.mm */,
                                BC1A3799097C715F0019F3D8 /* DOMCore.h */,
                                1A1D137E0A5325520064BF5F /* DOMXPath.h */,
                                1A1D137F0A5325520064BF5F /* DOMXPath.mm */,
                                1A1D13C90A5329090064BF5F /* DOMXPathInternal.h */,
+                               1CAF347E0A6C405200ABE06E /* WebScriptObject.h */,
+                               1CAF347F0A6C405200ABE06E /* WebScriptObject.mm */,
+                               1CAF34800A6C405200ABE06E /* WebScriptObjectPrivate.h */,
                        );
                        path = objc;
                        sourceTree = "<group>";
                                85031B270A44EFC700F992E0 /* BeforeUnloadEvent.h */,
                                6550B693099DF0270090D781 /* CDATASection.cpp */,
                                6550B694099DF0270090D781 /* CDATASection.h */,
+                               85089CC90A98C2AB00A275AA /* CDATASection.idl */,
                                6550B695099DF0270090D781 /* CharacterData.cpp */,
                                6550B696099DF0270090D781 /* CharacterData.h */,
                                93EEC1E609C2877700C515D1 /* CharacterData.idl */,
                                85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */,
                                6550B697099DF0270090D781 /* Comment.cpp */,
                                6550B698099DF0270090D781 /* Comment.h */,
+                               85089CC70A98C22600A275AA /* Comment.idl */,
                                A81872140977D3C0005826D9 /* ContainerNode.cpp */,
                                A81872110977D3C0005826D9 /* ContainerNode.h */,
                                A8C4A7F809D563270003AC8D /* CSSMappedAttributeDeclaration.cpp */,
                                93EEC1EB09C2877700C515D1 /* Entity.idl */,
                                A8EA7EB90A1945D000A8EF5F /* EntityReference.cpp */,
                                A8EA7EB80A1945D000A8EF5F /* EntityReference.h */,
+                               85089CCB0A98C33A00A275AA /* EntityReference.idl */,
                                85031B2B0A44EFC700F992E0 /* Event.cpp */,
                                85031B2C0A44EFC700F992E0 /* Event.h */,
                                14E836D209F8512000B85AE4 /* Event.idl */,
                                A8C4A7F009D563270003AC8D /* NamedMappedAttrMap.cpp */,
                                A8C4A7EF09D563270003AC8D /* NamedMappedAttrMap.h */,
                                A81872180977D3C0005826D9 /* NamedNodeMap.h */,
+                               85ACA9F90A9B631000671E90 /* NamedNodeMap.idl */,
                                A81872190977D3C0005826D9 /* NameNodeList.cpp */,
                                A81872130977D3C0005826D9 /* NameNodeList.h */,
                                A8C4A7EE09D563270003AC8D /* Node.cpp */,
                                1A750D870A90E394000FF215 /* NodeIterator.idl */,
                                A81872160977D3C0005826D9 /* NodeList.cpp */,
                                A81872100977D3C0005826D9 /* NodeList.h */,
+                               85ACA9FA0A9B631000671E90 /* NodeList.idl */,
                                A8EA7EB70A1945D000A8EF5F /* Notation.cpp */,
                                A8EA7EB60A1945D000A8EF5F /* Notation.h */,
                                93EEC1F409C2877700C515D1 /* Notation.idl */,
                                BCAA90A00A7EB03A008B1229 /* PlatformScrollBar.h in Headers */,
                                85EC9AFA0A71A2C600EEEAED /* FontData.h in Headers */,
                                85EC9AFB0A71A2C600EEEAED /* Language.h in Headers */,
+                               856C89FC0A90F068005C687B /* DOMNode.h in Headers */,
+                               856C8AE40A912649005C687B /* DOMObject.h in Headers */,
+                               85CA96B80A9621A600690CCF /* DOMEntity.h in Headers */,
+                               85CA96EA0A9624E900690CCF /* DOMNotation.h in Headers */,
+                               85CA975C0A962E5400690CCF /* DOMDocumentType.h in Headers */,
                                1AB7FC690A8B92EC00D9D37B /* XPathEvaluator.h in Headers */,
                                1AB7FC6C0A8B92EC00D9D37B /* XPathExpression.h in Headers */,
                                1AB7FC6F0A8B92EC00D9D37B /* XPathExpressionNode.h in Headers */,
                                1ACE53F70A8D19470022947D /* JSXMLSerializer.h in Headers */,
                                1A750D5D0A90DEE1000FF215 /* JSTreeWalker.h in Headers */,
                                1A750D8E0A90E521000FF215 /* JSNodeIterator.h in Headers */,
+                               85089CD70A98C42800A275AA /* DOMCDATASection.h in Headers */,
+                               85089CD90A98C42800A275AA /* DOMComment.h in Headers */,
+                               85089CDB0A98C42800A275AA /* DOMDocumentFragment.h in Headers */,
+                               85089CDD0A98C42800A275AA /* DOMEntityReference.h in Headers */,
+                               85F56A7A0A98CE3700ADB60A /* DOMProcessingInstruction.h in Headers */,
+                               85D389B20A991A7F00282145 /* DOMAttr.h in Headers */,
+                               85ACA9860A9B520300671E90 /* DOMCharacterData.h in Headers */,
+                               85ACA99C0A9B575900671E90 /* DOMText.h in Headers */,
+                               85ACA9C00A9B5FA500671E90 /* DOMElement.h in Headers */,
+                               85ACAA8D0A9B759C00671E90 /* DOMNodeList.h in Headers */,
+                               85ACABB00A9CAF8000671E90 /* DOMDocument.h in Headers */,
+                               8518DCE90A9CC80D0091B7A6 /* DOMDOMImplementation.h in Headers */,
+                               8518DD780A9CF31B0091B7A6 /* DOMNamedNodeMap.h in Headers */,
                                657429170A9C2D0B00C52C97 /* IconDataCache.h in Headers */,
                                657429180A9C2D0B00C52C97 /* SQLStatement.h in Headers */,
                                657429190A9C2D0B00C52C97 /* SQLTransaction.h in Headers */,
                                1CD4418F0A4CE76F00A007AB /* northSouthResizeCursor.tiff in Resources */,
                                1CD441900A4CE76F00A007AB /* northWestSouthEastResizeCursor.tiff in Resources */,
                                1A750D880A90E394000FF215 /* NodeIterator.idl in Resources */,
+                               85089CC80A98C22600A275AA /* Comment.idl in Resources */,
+                               85089CCA0A98C2AB00A275AA /* CDATASection.idl in Resources */,
+                               85089CCC0A98C33A00A275AA /* EntityReference.idl in Resources */,
+                               85ACA9FB0A9B631000671E90 /* NamedNodeMap.idl in Resources */,
+                               85ACA9FC0A9B631000671E90 /* NodeList.idl in Resources */,
                                5115095C0A9CE04700901013 /* urlIcon.tiff in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                                BCAA90C30A7EBA60008B1229 /* ScrollBar.cpp in Sources */,
                                93B0FD8A0A759BED0080AD44 /* StringImplMac.mm in Sources */,
                                93B0FD8B0A759BED0080AD44 /* StringMac.mm in Sources */,
+                               856C89FD0A90F068005C687B /* DOMNode.mm in Sources */,
+                               856C8AE50A912649005C687B /* DOMObject.mm in Sources */,
+                               85CA96B90A9621A600690CCF /* DOMEntity.mm in Sources */,
+                               85CA96EB0A9624E900690CCF /* DOMNotation.mm in Sources */,
+                               85CA975D0A962E5400690CCF /* DOMDocumentType.mm in Sources */,
                                1AB7FC680A8B92EC00D9D37B /* XPathEvaluator.cpp in Sources */,
                                1AB7FC6B0A8B92EC00D9D37B /* XPathExpression.cpp in Sources */,
                                1AB7FC6E0A8B92EC00D9D37B /* XPathExpressionNode.cpp in Sources */,
                                1A750D8D0A90E521000FF215 /* JSNodeIterator.cpp in Sources */,
                                1A750DD40A90E729000FF215 /* JSNodeIteratorCustom.cpp in Sources */,
                                1A750E340A90F89F000FF215 /* JSTreeWalkerCustom.cpp in Sources */,
+                               85089CD80A98C42800A275AA /* DOMCDATASection.mm in Sources */,
+                               85089CDA0A98C42800A275AA /* DOMComment.mm in Sources */,
+                               85089CDC0A98C42800A275AA /* DOMDocumentFragment.mm in Sources */,
+                               85089CDE0A98C42800A275AA /* DOMEntityReference.mm in Sources */,
+                               85F56A7B0A98CE3700ADB60A /* DOMProcessingInstruction.mm in Sources */,
+                               85D389B30A991A7F00282145 /* DOMAttr.mm in Sources */,
+                               85ACA9870A9B520300671E90 /* DOMCharacterData.mm in Sources */,
+                               85ACA99D0A9B575900671E90 /* DOMText.mm in Sources */,
+                               85ACA9C10A9B5FA500671E90 /* DOMElement.mm in Sources */,
+                               85ACAA8E0A9B759C00671E90 /* DOMNodeList.mm in Sources */,
+                               85ACABB10A9CAF8000671E90 /* DOMDocument.mm in Sources */,
+                               8518DCEA0A9CC80D0091B7A6 /* DOMDOMImplementation.mm in Sources */,
+                               8518DD790A9CF31B0091B7A6 /* DOMNamedNodeMap.mm in Sources */,
                                5186C0560A9C21470034FE94 /* IconDataCache.cpp in Sources */,
                                BC837C720A9D0D1A006B186A /* FloatPointCG.cpp in Sources */,
                                BC837C730A9D0D1A006B186A /* FloatRectCG.cpp in Sources */,
index 0286cbf2088bb1e9989af21ea12f36505968e312..427e281126138bb9ee68607d6c7cee09ef0aea7e 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004-2006 Apple Computer, Inc.  All rights reserved.
  * Copyright (C) 2006 James G. Speth (speth@end.com)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #import "DOM.h"
 
 #import "CDATASection.h"
-#import "csshelper.h"
 #import "CSSStyleSheet.h"
 #import "Comment.h"
 #import "DOMEventsInternal.h"
+#import "DOMHTML.h"
 #import "DOMImplementationFront.h"
 #import "DOMInternal.h"
 #import "DOMPrivate.h"
+#import "DeprecatedValueList.h"
 #import "Document.h"
 #import "DocumentFragment.h"
 #import "DocumentType.h"
-#import "Entity.h"
 #import "EntityReference.h"
 #import "Event.h"
 #import "EventListener.h"
 #import "HTMLDocument.h"
 #import "HTMLNames.h"
 #import "HTMLPlugInElement.h"
+#import "IntRect.h"
 #import "NodeFilter.h"
 #import "NodeFilterCondition.h"
 #import "NodeIterator.h"
 #import "NodeList.h"
-#import "Notation.h"
 #import "ProcessingInstruction.h"
 #import "QualifiedName.h"
 #import "Range.h"
 #import "RenderImage.h"
+#import "Text.h"
 #import "TreeWalker.h"
 #import "WebScriptObjectPrivate.h"
+#import "csshelper.h"
+
+// From old DOMCore.h
+#import "DOMNode.h"
+#import "DOMObject.h"
+
+// Generated Objective-C Bindings
+#import "DOMAttr.h"
+#import "DOMCDATASection.h"
+#import "DOMCharacterData.h"
+#import "DOMComment.h"
+#import "DOMDOMImplementation.h"
+#import "DOMDocument.h"
+#import "DOMDocumentFragment.h"
+#import "DOMDocumentType.h"
+#import "DOMElement.h"
+#import "DOMEntity.h"
+#import "DOMEntityReference.h"
+#import "DOMNamedNodeMap.h"
+#import "DOMNodeList.h"
+#import "DOMNotation.h"
+#import "DOMProcessingInstruction.h"
+#import "DOMText.h"
+
 #import <objc/objc-class.h>
 
 using WebCore::AtomicString;
 using WebCore::AtomicStringImpl;
 using WebCore::Attr;
-using WebCore::CharacterData;
-using WebCore::DeprecatedValueList;
 using WebCore::Document;
 using WebCore::DocumentFragment;
-using WebCore::DocumentType;
 using WebCore::DOMImplementationFront;
 using WebCore::Element;
-using WebCore::Entity;
 using WebCore::Event;
 using WebCore::EventListener;
 using WebCore::ExceptionCode;
 using WebCore::HTMLDocument;
 using WebCore::HTMLElement;
 using WebCore::FrameMac;
-using WebCore::IntRect;
 using WebCore::KURL;
 using WebCore::NamedNodeMap;
 using WebCore::Node;
@@ -85,32 +106,15 @@ using WebCore::NodeFilter;
 using WebCore::NodeFilterCondition;
 using WebCore::NodeIterator;
 using WebCore::NodeList;
-using WebCore::Notation;
-using WebCore::ProcessingInstruction;
 using WebCore::QualifiedName;
 using WebCore::Range;
 using WebCore::RenderImage;
 using WebCore::RenderObject;
 using WebCore::String;
-using WebCore::Text;
 using WebCore::TreeWalker;
 
 using namespace WebCore::HTMLNames;
 
-@interface DOMAttr (WebCoreInternal)
-+ (DOMAttr *)_attrWith:(Attr *)impl;
-- (Attr *)_attr;
-@end
-
-@interface DOMDocumentType (WebCoreInternal)
-- (DocumentType *)_documentType;
-@end
-
-@interface DOMImplementation (WebCoreInternal)
-+ (DOMImplementation *)_DOMImplementationWith:(DOMImplementationFront *)impl;
-- (DOMImplementationFront *)_DOMImplementation;
-@end
-
 class ObjCEventListener : public EventListener {
 public:
     static ObjCEventListener *find(id <DOMEventListener>);
@@ -131,42 +135,10 @@ typedef HashMap<AtomicStringImpl*, Class> ObjCClassMap;
 static ObjCClassMap* elementClassMap;
 static ListenerMap* listenerMap;
 
+
 //------------------------------------------------------------------------------------------
 // DOMObject
 
-@implementation DOMObject
-
-// Prevent creation of DOM objects by clients who just "[[xxx alloc] init]".
-- (id)init
-{
-    [NSException raise:NSGenericException format:@"+[%@ init]: should never be used", NSStringFromClass([self class])];
-    [self release];
-    return nil;
-}
-
-- (void)dealloc
-{
-    if (_internal) {
-        removeDOMWrapper(_internal);
-    }
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    if (_internal) {
-        removeDOMWrapper(_internal);
-    }
-    [super finalize];
-}
-
-- (id)copyWithZone:(NSZone *)zone
-{
-    return [self retain];
-}
-
-@end
-
 @implementation DOMObject (WebCoreInternal)
 
 - (id)_init
@@ -176,271 +148,10 @@ static ListenerMap* listenerMap;
 
 @end
 
+
 //------------------------------------------------------------------------------------------
 // DOMNode
 
-@implementation DOMNode
-
-- (void)dealloc
-{
-    if (_internal) {
-        DOM_cast<Node *>(_internal)->deref();
-    }
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    if (_internal) {
-        DOM_cast<Node *>(_internal)->deref();
-    }
-    [super finalize];
-}
-
-- (NSString *)description
-{
-    if (!_internal) {
-        return [NSString stringWithFormat:@"<%@: null>",
-            [[self class] description], self];
-    }
-    NSString *value = [self nodeValue];
-    if (value) {
-        return [NSString stringWithFormat:@"<%@ [%@]: %p '%@'>",
-            [[self class] description], [self nodeName], _internal, value];
-    }
-    return [NSString stringWithFormat:@"<%@ [%@]: %p>",
-        [[self class] description], [self nodeName], _internal];
-}
-
-- (NSString *)nodeName
-{
-    return [self _node]->nodeName();
-}
-
-- (NSString *)nodeValue
-{
-    // Documentation says we can raise a DOMSTRING_SIZE_ERR.
-    // However, the lower layer does not report that error up to us.
-    return [self _node]->nodeValue();
-}
-
-- (void)setNodeValue:(NSString *)string
-{
-    ASSERT(string);
-    
-    ExceptionCode ec = 0;
-    [self _node]->setNodeValue(string, ec);
-    raiseOnDOMError(ec);
-}
-
-- (unsigned short)nodeType
-{
-    return [self _node]->nodeType();
-}
-
-- (DOMNode *)parentNode
-{
-    return [DOMNode _nodeWith:[self _node]->parentNode()];
-}
-
-- (DOMNodeList *)childNodes
-{
-    return [DOMNodeList _nodeListWith:[self _node]->childNodes().get()];
-}
-
-- (DOMNode *)firstChild
-{
-    return [DOMNode _nodeWith:[self _node]->firstChild()];
-}
-
-- (DOMNode *)lastChild
-{
-    return [DOMNode _nodeWith:[self _node]->lastChild()];
-}
-
-- (DOMNode *)previousSibling
-{
-    return [DOMNode _nodeWith:[self _node]->previousSibling()];
-}
-
-- (DOMNode *)nextSibling
-{
-    return [DOMNode _nodeWith:[self _node]->nextSibling()];
-}
-
-- (DOMNamedNodeMap *)attributes
-{
-    // DOM level 2 core specification says: 
-    // A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
-    return nil;
-}
-
-- (DOMDocument *)ownerDocument
-{
-    return [DOMDocument _documentWith:[self _node]->document()];
-}
-
-- (DOMNode *)insertBefore:(DOMNode *)newChild :(DOMNode *)refChild
-{
-    ASSERT(newChild);
-    ASSERT(refChild);
-
-    ExceptionCode ec = 0;
-    if ([self _node]->insertBefore([newChild _node], [refChild _node], ec))
-        return newChild;
-    raiseOnDOMError(ec);
-    return nil;
-}
-
-- (DOMNode *)replaceChild:(DOMNode *)newChild :(DOMNode *)oldChild
-{
-    ASSERT(newChild);
-    ASSERT(oldChild);
-
-    ExceptionCode ec = 0;
-    if ([self _node]->replaceChild([newChild _node], [oldChild _node], ec))
-        return oldChild;
-    raiseOnDOMError(ec);
-    return nil;
-}
-
-- (DOMNode *)removeChild:(DOMNode *)oldChild
-{
-    ASSERT(oldChild);
-
-    ExceptionCode ec = 0;
-    if ([self _node]->removeChild([oldChild _node], ec))
-        return oldChild;
-    raiseOnDOMError(ec);
-    return nil;
-}
-
-- (DOMNode *)appendChild:(DOMNode *)newChild
-{
-    ASSERT(newChild);
-
-    ExceptionCode ec = 0;
-    if ([self _node]->appendChild([newChild _node], ec))
-        return newChild;
-    raiseOnDOMError(ec);
-    return nil;
-}
-
-- (BOOL)hasChildNodes
-{
-    return [self _node]->hasChildNodes();
-}
-
-- (DOMNode *)cloneNode:(BOOL)deep
-{
-    return [DOMNode _nodeWith:[self _node]->cloneNode(deep).get()];
-}
-
-- (void)normalize
-{
-    [self _node]->normalize();
-}
-
-- (BOOL)isSupported:(NSString *)feature :(NSString *)version
-{
-    ASSERT(feature);
-    ASSERT(version);
-
-    return [self _node]->isSupported(feature, version);
-}
-
-- (NSString *)namespaceURI
-{
-    return [self _node]->namespaceURI();
-}
-
-- (NSString *)prefix
-{
-    return [self _node]->prefix();
-}
-
-- (void)setPrefix:(NSString *)prefix
-{
-    ASSERT(prefix);
-
-    ExceptionCode ec = 0;
-    String prefixStr(prefix);
-    [self _node]->setPrefix(prefixStr.impl(), ec);
-    raiseOnDOMError(ec);
-}
-
-- (NSString *)localName
-{
-    return [self _node]->localName();
-}
-
-- (BOOL)hasAttributes
-{
-    return [self _node]->hasAttributes();
-}
-
-- (BOOL)isSameNode:(DOMNode *)other
-{
-    return [self _node]->isSameNode([other _node]);
-}
-
-- (BOOL)isEqualNode:(DOMNode *)other
-{
-    return [self _node]->isEqualNode([other _node]);
-}
-
-- (BOOL)isDefaultNamespace:(NSString *)namespaceURI
-{
-    return [self _node]->isDefaultNamespace(namespaceURI);
-}
-
-- (NSString *)lookupPrefix:(NSString *)namespaceURI
-{
-    return [self _node]->lookupPrefix(namespaceURI);
-}
-
-- (NSString *)lookupNamespaceURI:(NSString *)prefix
-{
-    return [self _node]->lookupNamespaceURI(prefix);
-}
-
-- (NSString *)textContent
-{
-    return [self _node]->textContent();
-}
-
-- (void)setTextContent:(NSString *)text
-{
-    ExceptionCode ec = 0;
-    [self _node]->setTextContent(text, ec);
-    raiseOnDOMError(ec);
-}
-
-- (NSRect)boundingBox
-{
-    WebCore::RenderObject *renderer = [self _node]->renderer();
-    if (renderer)
-        return renderer->absoluteBoundingBoxRect();
-    return NSZeroRect;
-}
-
-- (NSArray *)lineBoxRects
-{
-    WebCore::RenderObject *renderer = [self _node]->renderer();
-    if (renderer) {
-        NSMutableArray *results = [[NSMutableArray alloc] init];
-        DeprecatedValueList<IntRect> rects = renderer->lineBoxRects();
-        if (!rects.isEmpty()) {
-            for (DeprecatedValueList<IntRect>::ConstIterator it = rects.begin(); it != rects.end(); ++it)
-                [results addObject:[NSValue valueWithRect:*it]];
-        }
-        return [results autorelease];
-    }
-    return nil;
-}
-
-@end
-
 static void addElementClass(const QualifiedName& tag, Class objCClass)
 {
     elementClassMap->set(tag.localName().impl(), objCClass);
@@ -529,6 +240,22 @@ static Class elementClass(const AtomicString& tagName)
 
 @implementation DOMNode (WebCoreInternal)
 
+// FIXME: should this go in the main implementation?
+- (NSString *)description
+{
+    if (!_internal) {
+        return [NSString stringWithFormat:@"<%@: null>",
+            [[self class] description], self];
+    }
+    NSString *value = [self nodeValue];
+    if (value) {
+        return [NSString stringWithFormat:@"<%@ [%@]: %p '%@'>",
+            [[self class] description], [self nodeName], _internal, value];
+    }
+    return [NSString stringWithFormat:@"<%@ [%@]: %p>",
+        [[self class] description], [self nodeName], _internal];
+}
+
 - (id)_initWithNode:(Node *)impl
 {
     ASSERT(impl);
@@ -609,10 +336,10 @@ static Class elementClass(const AtomicString& tagName)
 
 - (const KJS::Bindings::RootObject *)_executionContext
 {
-    if (Node *n = [self _node])
+    if (Node *n = [self _node]) {
         if (FrameMac *f = Mac(n->document()->frame()))
             return f->executionContextForDOM();
-
+    }
     return 0;
 }
 
@@ -627,6 +354,7 @@ static Class elementClass(const AtomicString& tagName)
 
 @end
 
+// FIXME: this should be auto-genenerate in DOMNode.mm
 @implementation DOMNode (DOMEventTarget)
 
 - (void)addEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture
@@ -654,826 +382,205 @@ static Class elementClass(const AtomicString& tagName)
         raiseDOMException(DOM_NOT_SUPPORTED_ERR);
 
     ExceptionCode ec = 0;
-    BOOL result = EventTargetNodeCast([self _node])->dispatchEvent([event _event], ec);
-    raiseOnDOMError(ec);
-    return result;
-}
-
-@end
-
-//------------------------------------------------------------------------------------------
-// DOMNamedNodeMap
-
-@implementation DOMNamedNodeMap
-
-- (void)dealloc
-{
-    if (_internal) {
-        DOM_cast<NamedNodeMap *>(_internal)->deref();
-    }
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    if (_internal) {
-        DOM_cast<NamedNodeMap *>(_internal)->deref();
-    }
-    [super finalize];
-}
-
-- (NamedNodeMap *)_namedNodeMap
-{
-    return DOM_cast<NamedNodeMap *>(_internal);
-}
-
-- (DOMNode *)getNamedItem:(NSString *)name
-{
-    ASSERT(name);
-
-    return [DOMNode _nodeWith:[self _namedNodeMap]->getNamedItem(name).get()];
-}
-
-- (DOMNode *)setNamedItem:(DOMNode *)arg
-{
-    ASSERT(arg);
-
-    int exception = 0;
-    DOMNode *result = [DOMNode _nodeWith:[self _namedNodeMap]->setNamedItem([arg _node], exception).get()];
-    raiseOnDOMError(exception);
-    return result;
-}
-
-- (DOMNode *)removeNamedItem:(NSString *)name
-{
-    ASSERT(name);
-
-    int exception = 0;
-    DOMNode *result = [DOMNode _nodeWith:[self _namedNodeMap]->removeNamedItem(name, exception).get()];
-    raiseOnDOMError(exception);
-    return result;
-}
-
-- (DOMNode *)item:(unsigned)index
-{
-    return [DOMNode _nodeWith:[self _namedNodeMap]->item(index).get()];
-}
-
-- (unsigned)length
-{
-    return [self _namedNodeMap]->length();
-}
-
-- (DOMNode *)getNamedItemNS:(NSString *)namespaceURI :(NSString *)localName
-{
-    if (!namespaceURI || !localName) {
-        return nil;
-    }
-
-    return [DOMNode _nodeWith:[self _namedNodeMap]->getNamedItemNS(namespaceURI, localName).get()];
-}
-
-- (DOMNode *)setNamedItemNS:(DOMNode *)arg
-{
-    ASSERT(arg);
-
-    int exception = 0;
-    DOMNode *result = [DOMNode _nodeWith:[self _namedNodeMap]->setNamedItemNS([arg _node], exception).get()];
-    raiseOnDOMError(exception);
-    return result;
-}
-
-- (DOMNode *)removeNamedItemNS:(NSString *)namespaceURI :(NSString *)localName
-{
-    ASSERT(namespaceURI);
-    ASSERT(localName);
-
-    int exception = 0;
-    DOMNode *result = [DOMNode _nodeWith:[self _namedNodeMap]->removeNamedItemNS(namespaceURI, localName, exception).get()];
-    raiseOnDOMError(exception);
-    return result;
-}
-
-@end
-
-@implementation DOMNamedNodeMap (WebCoreInternal)
-
-- (id)_initWithNamedNodeMap:(NamedNodeMap *)impl
-{
-    ASSERT(impl);
-
-    [super _init];
-    _internal = DOM_cast<DOMObjectInternal *>(impl);
-    impl->ref();
-    addDOMWrapper(self, impl);
-    return self;
-}
-
-+ (DOMNamedNodeMap *)_namedNodeMapWith:(NamedNodeMap *)impl
-{
-    if (!impl)
-        return nil;
-    
-    id cachedInstance;
-    cachedInstance = getDOMWrapper(impl);
-    if (cachedInstance)
-        return [[cachedInstance retain] autorelease];
-    
-    return [[[self alloc] _initWithNamedNodeMap:impl] autorelease];
-}
-
-@end
-
-//------------------------------------------------------------------------------------------
-// DOMNodeList
-
-@implementation DOMNodeList
-
-- (void)dealloc
-{
-    if (_internal) {
-        DOM_cast<NodeList *>(_internal)->deref();
-    }
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    if (_internal) {
-        DOM_cast<NodeList *>(_internal)->deref();
-    }
-    [super finalize];
-}
-
-- (NodeList *)_nodeList
-{
-    return DOM_cast<NodeList *>(_internal);
-}
-
-- (DOMNode *)item:(unsigned)index
-{
-    return [DOMNode _nodeWith:[self _nodeList]->item(index)];
-}
-
-- (unsigned)length
-{
-    return [self _nodeList]->length();
-}
-
-@end
-
-@implementation DOMNodeList (WebCoreInternal)
-
-- (id)_initWithNodeList:(NodeList *)impl
-{
-    ASSERT(impl);
-
-    [super _init];
-    _internal = DOM_cast<DOMObjectInternal *>(impl);
-    impl->ref();
-    addDOMWrapper(self, impl);
-    return self;
-}
-
-+ (DOMNodeList *)_nodeListWith:(NodeList *)impl
-{
-    if (!impl)
-        return nil;
-    
-    id cachedInstance;
-    cachedInstance = getDOMWrapper(impl);
-    if (cachedInstance)
-        return [[cachedInstance retain] autorelease];
-    
-    return [[[self alloc] _initWithNodeList:impl] autorelease];
-}
-
-@end
-
-//------------------------------------------------------------------------------------------
-// DOMImplementation
-
-@implementation DOMImplementation
-
-- (void)dealloc
-{
-    if (_internal)
-        DOM_cast<DOMImplementationFront *>(_internal)->deref();
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    if (_internal)
-        DOM_cast<DOMImplementationFront *>(_internal)->deref();
-    [super finalize];
-}
-
-- (BOOL)hasFeature:(NSString *)feature :(NSString *)version
-{
-    ASSERT(feature);
-    ASSERT(version);
-
-    return [self _DOMImplementation]->hasFeature(feature, version);
-}
-
-- (DOMDocumentType *)createDocumentType:(NSString *)qualifiedName :(NSString *)publicId :(NSString *)systemId
-{
-    ASSERT(qualifiedName);
-    ASSERT(publicId);
-    ASSERT(systemId);
-
-    ExceptionCode ec = 0;
-    RefPtr<DocumentType> impl = [self _DOMImplementation]->createDocumentType(qualifiedName, publicId, systemId, ec);
-    raiseOnDOMError(ec);
-    return static_cast<DOMDocumentType *>([DOMNode _nodeWith:impl.get()]);
-}
-
-- (DOMDocument *)createDocument:(NSString *)namespaceURI :(NSString *)qualifiedName :(DOMDocumentType *)doctype
-{
-    ASSERT(namespaceURI);
-    ASSERT(qualifiedName);
-
-    ExceptionCode ec = 0;
-    RefPtr<Document> impl = [self _DOMImplementation]->createDocument(namespaceURI, qualifiedName, [doctype _documentType], ec);
-    raiseOnDOMError(ec);
-    return static_cast<DOMDocument *>([DOMNode _nodeWith:impl.get()]);
-}
-
-- (DOMHTMLDocument *)createHTMLDocument:(NSString *)title
-{
-    RefPtr<HTMLDocument> impl = [self _DOMImplementation]->createHTMLDocument(title);
-    return static_cast<DOMHTMLDocument *>([DOMNode _nodeWith:impl.get()]);
-}
-@end
-
-@implementation DOMImplementation (DOMImplementationCSS)
-
-- (DOMCSSStyleSheet *)createCSSStyleSheet:(NSString *)title :(NSString *)media
-{
-    ASSERT(title);
-    ASSERT(media);
-
-    ExceptionCode ec = 0;
-    DOMCSSStyleSheet *result = [DOMCSSStyleSheet _CSSStyleSheetWith:[self _DOMImplementation]->createCSSStyleSheet(title, media, ec).get()];
-    raiseOnDOMError(ec);
-    return result;
-}
-
-@end
-@implementation DOMImplementation (WebCoreInternal)
-
-- (id)_initWithDOMImplementation:(DOMImplementationFront *)impl
-{
-    ASSERT(impl);
-
-    [super _init];
-    _internal = DOM_cast<DOMObjectInternal *>(impl);
-    impl->ref();
-    addDOMWrapper(self, impl);
-    return self;
-}
-
-+ (DOMImplementation *)_DOMImplementationWith:(DOMImplementationFront *)impl
-{
-    if (!impl)
-        return nil;
-    
-    id cachedInstance;
-    cachedInstance = getDOMWrapper(impl);
-    if (cachedInstance)
-        return [[cachedInstance retain] autorelease];
-    
-    return [[[self alloc] _initWithDOMImplementation:impl] autorelease];
-}
-
-- (DOMImplementationFront *)_DOMImplementation
-{
-    return DOM_cast<DOMImplementationFront *>(_internal);
-}
-
-@end
-
-//------------------------------------------------------------------------------------------
-// DOMDocumentFragment
-
-@implementation DOMDocumentFragment
-
-@end
-
-@implementation DOMDocumentFragment (WebCoreInternal)
-
-+ (DOMDocumentFragment *)_documentFragmentWith:(DocumentFragment *)impl
-{
-    return static_cast<DOMDocumentFragment *>([DOMNode _nodeWith:impl]);
-}
-
-- (DocumentFragment *)_fragment
-{
-    return static_cast<DocumentFragment *>(DOM_cast<Node *>(_internal));
-}
-
-@end
-
-//------------------------------------------------------------------------------------------
-// DOMDocument
-
-@implementation DOMDocument
-
-- (DOMNode *)adoptNode:(DOMNode *)source
-{
-    ExceptionCode ec = 0;
-    DOMNode *result = [DOMNode _nodeWith:[self _document]->adoptNode([source _node], ec).get()];
-    raiseOnDOMError(ec);
-    return result;
-}
-
-- (DOMDocumentType *)doctype
-{
-    return static_cast<DOMDocumentType *>([DOMNode _nodeWith:[self _document]->doctype()]);
-}
-
-- (DOMImplementation *)implementation
-{
-    return [DOMImplementation _DOMImplementationWith:implementationFront([self _document])];
-}
-
-- (DOMElement *)documentElement
-{
-    return static_cast<DOMElement *>([DOMNode _nodeWith:[self _document]->documentElement()]);
-}
-
-- (DOMElement *)createElement:(NSString *)tagName
-{
-    ASSERT(tagName);
-
-    ExceptionCode ec = 0;
-    DOMElement *result = static_cast<DOMElement *>([DOMNode _nodeWith:[self _document]->createElement(tagName, ec).get()]);
-    raiseOnDOMError(ec);
-    return result;
-}
-
-- (DOMDocumentFragment *)createDocumentFragment
-{
-    return static_cast<DOMDocumentFragment *>([DOMNode _nodeWith:[self _document]->createDocumentFragment().get()]);
-}
-
-- (DOMText *)createTextNode:(NSString *)data
-{
-    ASSERT(data);
-    return static_cast<DOMText *>([DOMNode _nodeWith:[self _document]->createTextNode(data).get()]);
-}
-
-- (DOMComment *)createComment:(NSString *)data
-{
-    ASSERT(data);
-    return static_cast<DOMComment *>([DOMNode _nodeWith:[self _document]->createComment(data).get()]);
-}
-
-- (DOMCDATASection *)createCDATASection:(NSString *)data
-{
-    ASSERT(data);
-    int exception = 0;
-    DOMCDATASection *result = static_cast<DOMCDATASection *>([DOMNode _nodeWith:[self _document]->createCDATASection(data, exception).get()]);
-    raiseOnDOMError(exception);
-    return result;
-}
-
-- (DOMProcessingInstruction *)createProcessingInstruction:(NSString *)target :(NSString *)data
-{
-    ASSERT(target);
-    ASSERT(data);
-    int exception = 0;
-    DOMProcessingInstruction *result = static_cast<DOMProcessingInstruction *>([DOMNode _nodeWith:[self _document]->createProcessingInstruction(target, data, exception).get()]);
-    raiseOnDOMError(exception);
-    return result;
-}
-
-- (DOMAttr *)createAttribute:(NSString *)name
-{
-    ASSERT(name);
-    int exception = 0;
-    DOMAttr *result = [DOMAttr _attrWith:[self _document]->createAttribute(name, exception).get()];
-    raiseOnDOMError(exception);
-    return result;
-}
-
-- (DOMEntityReference *)createEntityReference:(NSString *)name
-{
-    ASSERT(name);
-    int exception = 0;
-    DOMEntityReference *result = static_cast<DOMEntityReference *>([DOMNode _nodeWith:[self _document]->createEntityReference(name, exception).get()]);
-    raiseOnDOMError(exception);
-    return result;
-}
-
-- (DOMNodeList *)getElementsByTagName:(NSString *)tagname
-{
-    ASSERT(tagname);
-    return [DOMNodeList _nodeListWith:[self _document]->getElementsByTagName(tagname).get()];
-}
-
-- (DOMNode *)importNode:(DOMNode *)importedNode :(BOOL)deep
-{
-    ExceptionCode ec = 0;
-    DOMNode *result = [DOMNode _nodeWith:[self _document]->importNode([importedNode _node], deep, ec).get()];
-    raiseOnDOMError(ec);
-    return result;
-}
-
-- (DOMElement *)createElementNS:(NSString *)namespaceURI :(NSString *)qualifiedName
-{
-    ASSERT(namespaceURI);
-    ASSERT(qualifiedName);
-
-    ExceptionCode ec = 0;
-    DOMNode *result = [DOMNode _nodeWith:[self _document]->createElementNS(namespaceURI, qualifiedName, ec).get()];
-    raiseOnDOMError(ec);
-    return static_cast<DOMElement *>(result);
-}
-
-- (DOMAttr *)createAttributeNS:(NSString *)namespaceURI :(NSString *)qualifiedName
-{
-    ASSERT(namespaceURI);
-    ASSERT(qualifiedName);
-
-    int exception = 0;
-    DOMAttr *result = [DOMAttr _attrWith:[self _document]->createAttributeNS(namespaceURI, qualifiedName, exception).get()];
-    raiseOnDOMError(exception);
-    return result;
-}
-
-- (DOMNodeList *)getElementsByTagNameNS:(NSString *)namespaceURI :(NSString *)localName
-{
-    ASSERT(namespaceURI);
-    ASSERT(localName);
-
-    return [DOMNodeList _nodeListWith:[self _document]->getElementsByTagNameNS(namespaceURI, localName).get()];
-}
-
-- (DOMElement *)getElementById:(NSString *)elementId
-{
-    ASSERT(elementId);
-
-    return static_cast<DOMElement *>([DOMNode _nodeWith:[self _document]->getElementById(elementId)]);
-}
-
-@end
-
-@implementation DOMDocument (DOMDocumentRange)
-
-- (DOMRange *)createRange
-{
-    return [DOMRange _rangeWith:[self _document]->createRange().get()];
-}
-
-@end
-
-@implementation DOMDocument (DOMDocumentCSS)
-
-- (DOMCSSStyleDeclaration *)getOverrideStyle:(DOMElement *)elt :(NSString *)pseudoElt
-{
-    Element *element = [elt _element];
-    String pseudoEltString(pseudoElt);
-    return [DOMCSSStyleDeclaration _styleDeclarationWith:[self _document]->getOverrideStyle(element, pseudoEltString.impl())];
-}
-
-@end
-
-@implementation DOMDocument (DOMDocumentStyle)
-
-- (DOMStyleSheetList *)styleSheets
-{
-    return [DOMStyleSheetList _styleSheetListWith:[self _document]->styleSheets()];
-}
-
-@end
-
-@implementation DOMDocument (DOMDocumentExtensions)
-
-- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration
-{
-    return [DOMCSSStyleDeclaration _styleDeclarationWith:[self _document]->createCSSStyleDeclaration().get()];
-}
-
-@end
-
-@implementation DOMDocument (WebCoreInternal)
-
-+ (DOMDocument *)_documentWith:(Document *)impl
-{
-    return static_cast<DOMDocument *>([DOMNode _nodeWith:impl]);
-}
-
-- (Document *)_document
-{
-    return static_cast<Document *>(DOM_cast<Node *>(_internal));
-}
-
-- (DOMElement *)_ownerElement
-{
-    return [DOMElement _elementWith:[self _document]->ownerElement()];
-}
-
-@end
-
-//------------------------------------------------------------------------------------------
-// DOMCharacterData
-
-@implementation DOMCharacterData
-
-- (CharacterData *)_characterData
-{
-    return static_cast<CharacterData *>(DOM_cast<Node *>(_internal));
-}
-
-- (NSString *)data
-{
-    // Documentation says we can raise a DOMSTRING_SIZE_ERR.
-    // However, the lower layer does not report that error up to us.
-    return [self _characterData]->data();
-}
-
-- (void)setData:(NSString *)data
-{
-    ASSERT(data);
-    
-    ExceptionCode ec = 0;
-    [self _characterData]->setData(data, ec);
-    raiseOnDOMError(ec);
-}
-
-- (unsigned)length
-{
-    return [self _characterData]->length();
-}
-
-- (NSString *)substringData:(unsigned)offset :(unsigned)count
-{
-    ExceptionCode ec = 0;
-    NSString *result = [self _characterData]->substringData(offset, count, ec);
-    raiseOnDOMError(ec);
-    return result;
-}
-
-- (void)appendData:(NSString *)arg
-{
-    ASSERT(arg);
-    
-    ExceptionCode ec = 0;
-    [self _characterData]->appendData(arg, ec);
-    raiseOnDOMError(ec);
-}
-
-- (void)insertData:(unsigned)offset :(NSString *)arg
-{
-    ASSERT(arg);
-    
-    ExceptionCode ec = 0;
-    [self _characterData]->insertData(offset, arg, ec);
-    raiseOnDOMError(ec);
-}
-
-- (void)deleteData:(unsigned)offset :(unsigned) count
-{
-    ExceptionCode ec = 0;
-    [self _characterData]->deleteData(offset, count, ec);
-    raiseOnDOMError(ec);
-}
-
-- (void)replaceData:(unsigned)offset :(unsigned)count :(NSString *)arg
-{
-    ASSERT(arg);
-
-    ExceptionCode ec = 0;
-    [self _characterData]->replaceData(offset, count, arg, ec);
+    BOOL result = EventTargetNodeCast([self _node])->dispatchEvent([event _event], ec);
     raiseOnDOMError(ec);
+    return result;
 }
 
 @end
 
-//------------------------------------------------------------------------------------------
-// DOMAttr
 
-@implementation DOMAttr
+//------------------------------------------------------------------------------------------
+// DOMNamedNodeMap
 
-- (NSString *)name
-{
-    return [self _attr]->nodeName();
-}
+@implementation DOMNamedNodeMap (WebCoreInternal)
 
-- (BOOL)specified
+- (id)_initWithNamedNodeMap:(NamedNodeMap *)impl
 {
-    return [self _attr]->specified();
-}
+    ASSERT(impl);
 
-- (NSString *)value
-{
-    return [self _attr]->nodeValue();
+    [super _init];
+    _internal = DOM_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    addDOMWrapper(self, impl);
+    return self;
 }
 
-- (void)setValue:(NSString *)value
++ (DOMNamedNodeMap *)_namedNodeMapWith:(NamedNodeMap *)impl
 {
-    ASSERT(value);
-
-    ExceptionCode ec = 0;
-    [self _attr]->setValue(value, ec);
-    raiseOnDOMError(ec);
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapper(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithNamedNodeMap:impl] autorelease];
 }
 
-- (DOMElement *)ownerElement
-{
-    return [DOMElement _elementWith:[self _attr]->ownerElement()];
-}
+@end
 
-- (DOMCSSStyleDeclaration *)style
-{
-    return [DOMCSSStyleDeclaration _styleDeclarationWith: [self _attr]->style()];
-}
 
-@end
+//------------------------------------------------------------------------------------------
+// DOMNodeList
 
-@implementation DOMAttr (WebCoreInternal)
+@implementation DOMNodeList (WebCoreInternal)
 
-+ (DOMAttr *)_attrWith:(Attr *)impl
+- (id)_initWithNodeList:(NodeList *)impl
 {
-    return static_cast<DOMAttr *>([DOMNode _nodeWith:impl]);
+    ASSERT(impl);
+
+    [super _init];
+    _internal = DOM_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    addDOMWrapper(self, impl);
+    return self;
 }
 
-- (Attr *)_attr
++ (DOMNodeList *)_nodeListWith:(NodeList *)impl
 {
-    return static_cast<Attr *>(DOM_cast<Node *>(_internal));
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapper(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithNodeList:impl] autorelease];
 }
 
 @end
 
-//------------------------------------------------------------------------------------------
-// DOMElement
 
-@implementation DOMElement
+//------------------------------------------------------------------------------------------
+// DOMImplementation
+@implementation DOMImplementation (WebCoreInternal)
 
-- (NSString *)tagName
+- (id)_initWithDOMImplementation:(DOMImplementationFront *)impl
 {
-    return [self _element]->nodeName();
-}
+    ASSERT(impl);
 
-- (DOMNamedNodeMap *)attributes
-{
-    return [DOMNamedNodeMap _namedNodeMapWith:[self _element]->attributes()];
+    [super _init];
+    _internal = DOM_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    addDOMWrapper(self, impl);
+    return self;
 }
 
-- (NSString *)getAttribute:(NSString *)name
++ (DOMImplementation *)_DOMImplementationWith:(DOMImplementationFront *)impl
 {
-    ASSERT(name);
-    return [self _element]->getAttribute(name);
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapper(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithDOMImplementation:impl] autorelease];
 }
 
-- (void)setAttribute:(NSString *)name :(NSString *)value
+- (DOMImplementationFront *)_DOMImplementation
 {
-    ASSERT(name);
-    ASSERT(value);
-
-    int exception = 0;
-    [self _element]->setAttribute(name, value, exception);
-    raiseOnDOMError(exception);
+    return DOM_cast<DOMImplementationFront *>(_internal);
 }
 
-- (void)removeAttribute:(NSString *)name
-{
-    ASSERT(name);
+@end
 
-    int exception = 0;
-    [self _element]->removeAttribute(name, exception);
-    raiseOnDOMError(exception);
-}
 
-- (DOMAttr *)getAttributeNode:(NSString *)name
-{
-    ASSERT(name);
+//------------------------------------------------------------------------------------------
+// DOMDocumentFragment
 
-    return [DOMAttr _attrWith:[self _element]->getAttributeNode(name).get()];
-}
+@implementation DOMDocumentFragment (WebCoreInternal)
 
-- (DOMAttr *)setAttributeNode:(DOMAttr *)newAttr
++ (DOMDocumentFragment *)_documentFragmentWith:(DocumentFragment *)impl
 {
-    ASSERT(newAttr);
-
-    int exception = 0;
-    DOMAttr *result = [DOMAttr _attrWith:[self _element]->setAttributeNode([newAttr _attr], exception).get()];
-    raiseOnDOMError(exception);
-    return result;
+    return static_cast<DOMDocumentFragment *>([DOMNode _nodeWith:impl]);
 }
 
-- (DOMAttr *)removeAttributeNode:(DOMAttr *)oldAttr
+- (DocumentFragment *)_fragment
 {
-    ASSERT(oldAttr);
-
-    int exception = 0;
-    DOMAttr *result = [DOMAttr _attrWith:[self _element]->removeAttributeNode([oldAttr _attr], exception).get()];
-    raiseOnDOMError(exception);
-    return result;
+    return static_cast<DocumentFragment *>(DOM_cast<Node *>(_internal));
 }
 
-- (DOMNodeList *)getElementsByTagName:(NSString *)name
-{
-    ASSERT(name);
+@end
 
-    return [DOMNodeList _nodeListWith:[self _element]->getElementsByTagName(name).get()];
-}
 
-- (NSString *)getAttributeNS:(NSString *)namespaceURI :(NSString *)localName
-{
-    ASSERT(namespaceURI);
-    ASSERT(localName);
+//------------------------------------------------------------------------------------------
+// DOMDocument
 
-    return [self _element]->getAttributeNS(namespaceURI, localName);
-}
+// FIXME: this should be auto-genenerate in DOMDocument.mm
+@implementation DOMDocument (DOMDocumentExtensions)
 
-- (void)setAttributeNS:(NSString *)namespaceURI :(NSString *)qualifiedName :(NSString *)value
+- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration
 {
-    ASSERT(namespaceURI);
-    ASSERT(qualifiedName);
-    ASSERT(value);
-
-    int exception = 0;
-    [self _element]->setAttributeNS(namespaceURI, qualifiedName, value, exception);
-    raiseOnDOMError(exception);
+    return [DOMCSSStyleDeclaration _styleDeclarationWith:[self _document]->createCSSStyleDeclaration().get()];
 }
 
-- (void)removeAttributeNS:(NSString *)namespaceURI :(NSString *)localName
-{
-    ASSERT(namespaceURI);
-    ASSERT(localName);
+@end
 
-    int exception = 0;
-    [self _element]->removeAttributeNS(namespaceURI, localName, exception);
-    raiseOnDOMError(exception);
-}
+@implementation DOMDocument (WebCoreInternal)
 
-- (DOMAttr *)getAttributeNodeNS:(NSString *)namespaceURI :(NSString *)localName
++ (DOMDocument *)_documentWith:(Document *)impl
 {
-    ASSERT(namespaceURI);
-    ASSERT(localName);
-
-    return [DOMAttr _attrWith:[self _element]->getAttributeNodeNS(namespaceURI, localName).get()];
+    return static_cast<DOMDocument *>([DOMNode _nodeWith:impl]);
 }
 
-- (DOMAttr *)setAttributeNodeNS:(DOMAttr *)newAttr
+- (Document *)_document
 {
-    ASSERT(newAttr);
-
-    int exception = 0;
-    DOMAttr *result = [DOMAttr _attrWith:[self _element]->setAttributeNodeNS([newAttr _attr], exception).get()];
-    raiseOnDOMError(exception);
-    return result;
+    return static_cast<Document *>(DOM_cast<Node *>(_internal));
 }
 
-- (DOMNodeList *)getElementsByTagNameNS:(NSString *)namespaceURI :(NSString *)localName
+- (DOMElement *)_ownerElement
 {
-    ASSERT(namespaceURI);
-    ASSERT(localName);
-
-    return [DOMNodeList _nodeListWith:[self _element]->getElementsByTagNameNS(namespaceURI, localName).get()];
+    return [DOMElement _elementWith:[self _document]->ownerElement()];
 }
 
-- (BOOL)hasAttribute:(NSString *)name
-{
-    ASSERT(name);
+@end
 
-    return [self _element]->hasAttribute(name);
-}
 
-- (BOOL)hasAttributeNS:(NSString *)namespaceURI :(NSString *)localName
-{
-    ASSERT(namespaceURI);
-    ASSERT(localName);
+//------------------------------------------------------------------------------------------
+// DOMAttr
 
-    return [self _element]->hasAttributeNS(namespaceURI, localName);
-}
+@implementation DOMAttr (WebCoreInternal)
 
-- (void)focus
++ (DOMAttr *)_attrWith:(Attr *)impl
 {
-    [self _element]->focus();
+    return static_cast<DOMAttr *>([DOMNode _nodeWith:impl]);
 }
 
-- (void)blur
+- (Attr *)_attr
 {
-    [self _element]->blur();
+    return static_cast<Attr *>(DOM_cast<Node *>(_internal));
 }
 
 @end
 
-@implementation DOMElement (DOMElementCSSInlineStyle)
+//------------------------------------------------------------------------------------------
+// DOMDocumentType
+
+@implementation DOMDocumentType (WebCoreInternal)
+
++ (DOMDocumentType *)_documentTypeWith:(WebCore::DocumentType *)impl;
+{
+    return static_cast<DOMDocumentType *>([DOMNode _nodeWith:impl]);
+}
 
-- (DOMCSSStyleDeclaration *)style
+- (WebCore::DocumentType *)_documentType;
 {
-    return [DOMCSSStyleDeclaration _styleDeclarationWith:[self _element]->style()];
+    return static_cast<WebCore::DocumentType *>(DOM_cast<WebCore::Node *>(_internal));
 }
 
 @end
 
-@implementation DOMElement (DOMElementExtensions)
+//------------------------------------------------------------------------------------------
+// DOMElement
+
+// FIXME: this should be auto-genenerate in DOMElement.mm
+@implementation DOMElement (DOMElementAppKitExtensions)
 
 - (NSImage*)image
 {
@@ -1486,16 +593,6 @@ static Class elementClass(const AtomicString& tagName)
     return nil;
 }
 
-- (void)scrollIntoView:(BOOL)alignTop
-{
-    [self _element]->scrollIntoView(alignTop);
-}
-
-- (void)scrollIntoViewIfNeeded:(BOOL)centerIfNeeded
-{
-    [self _element]->scrollIntoViewIfNeeded(centerIfNeeded);
-}
-
 @end
 
 @implementation DOMElement (WebCoreInternal)
@@ -1561,173 +658,72 @@ static Class elementClass(const AtomicString& tagName)
 
 @end
 
+
 //------------------------------------------------------------------------------------------
 // DOMText
 
-@implementation DOMText
-
-- (Text *)_text
-{
-    return static_cast<Text *>(DOM_cast<Node *>(_internal));
-}
+@implementation DOMText (WebCoreInternal)
 
-- (DOMText *)splitText:(unsigned)offset
++ (DOMText *)_textWith:(WebCore::Text *)impl
 {
-    ExceptionCode ec = 0;
-    DOMNode *result = [DOMNode _nodeWith:[self _text]->splitText(offset, ec)];
-    raiseOnDOMError(ec);
-    return static_cast<DOMText *>(result);
+    return static_cast<DOMText *>([DOMNode _nodeWith:impl]);
 }
 
 @end
 
-//------------------------------------------------------------------------------------------
-// DOMComment
-
-@implementation DOMComment
-
-@end
-
-//------------------------------------------------------------------------------------------
-// DOMCDATASection
-
-@implementation DOMCDATASection
-
-@end
 
 //------------------------------------------------------------------------------------------
-// DOMDocumentType
-
-@implementation DOMDocumentType
-
-- (NSString *)name
-{
-    return [self _documentType]->publicId();
-}
-
-- (DOMNamedNodeMap *)entities
-{
-    return [DOMNamedNodeMap _namedNodeMapWith:[self _documentType]->entities()];
-}
-
-- (DOMNamedNodeMap *)notations
-{
-    return [DOMNamedNodeMap _namedNodeMapWith:[self _documentType]->notations()];
-}
-
-- (NSString *)publicId
-{
-    return [self _documentType]->publicId();
-}
+// DOMComment
 
-- (NSString *)systemId
-{
-    return [self _documentType]->systemId();
-}
+@implementation DOMComment (WebCoreInternal)
 
-- (NSString *)internalSubset
++ (DOMComment *)_commentWith:(WebCore::Comment *)impl
 {
-    return [self _documentType]->internalSubset();
+    return static_cast<DOMComment *>([DOMNode _nodeWith:impl]);
 }
 
 @end
 
-@implementation DOMDocumentType (WebCoreInternal)
-
-- (DocumentType *)_documentType
-{
-    return static_cast<DocumentType *>(DOM_cast<Node *>(_internal));
-}
-
-@end
 
 //------------------------------------------------------------------------------------------
-// DOMNotation
-
-@implementation DOMNotation
-
-- (Notation *)_notation
-{
-    return static_cast<Notation *>(DOM_cast<Node *>(_internal));
-}
+// DOMCDATASection
 
-- (NSString *)publicId
-{
-    return [self _notation]->publicId();
-}
+@implementation DOMCDATASection (WebCoreInternal)
 
-- (NSString *)systemId
++ (DOMCDATASection *)_CDATASectionWith:(WebCore::CDATASection *)impl;
 {
-    return [self _notation]->systemId();
+    return static_cast<DOMCDATASection *>([DOMNode _nodeWith:impl]);
 }
 
 @end
 
-//------------------------------------------------------------------------------------------
-// DOMEntity
-
-@implementation DOMEntity
-
-- (Entity *)_entity
-{
-    return static_cast<Entity *>(DOM_cast<Node *>(_internal));
-}
 
-- (NSString *)publicId
-{
-    return [self _entity]->publicId();
-}
+//------------------------------------------------------------------------------------------
+// DOMProcessingInstruction
 
-- (NSString *)systemId
-{
-    return [self _entity]->systemId();
-}
+@implementation DOMProcessingInstruction (WebCoreInternal)
 
-- (NSString *)notationName
++ (DOMProcessingInstruction *)_processingInstructionWith:(WebCore::ProcessingInstruction *)impl;
 {
-    return [self _entity]->notationName();
+    return static_cast<DOMProcessingInstruction *>([DOMNode _nodeWith:impl]);
 }
 
 @end
 
-//------------------------------------------------------------------------------------------
-// DOMEntityReference
-
-@implementation DOMEntityReference
-
-@end
 
 //------------------------------------------------------------------------------------------
 // DOMProcessingInstruction
 
-@implementation DOMProcessingInstruction
-
-- (ProcessingInstruction *)_processingInstruction
-{
-    return static_cast<ProcessingInstruction *>(DOM_cast<Node *>(_internal));
-}
-
-- (NSString *)target
-{
-    return [self _processingInstruction]->target();
-}
-
-- (NSString *)data
-{
-    return [self _processingInstruction]->data();
-}
+@implementation DOMEntityReference (WebCoreInternal)
 
-- (void)setData:(NSString *)data
++ (DOMEntityReference *)_entityReferenceWith:(WebCore::EntityReference *)impl;
 {
-    ASSERT(data);
-
-    ExceptionCode ec = 0;
-    [self _processingInstruction]->setData(data, ec);
-    raiseOnDOMError(ec);
+    return static_cast<DOMEntityReference *>([DOMNode _nodeWith:impl]);
 }
 
 @end
 
+
 //------------------------------------------------------------------------------------------
 // DOMRange
 
@@ -1986,9 +982,9 @@ static Class elementClass(const AtomicString& tagName)
 
 @end
 
-//------------------------------------------------------------------------------------------
 
 //------------------------------------------------------------------------------------------
+// DOMNodeFilter
 
 @implementation DOMNodeFilter
 
@@ -2043,6 +1039,9 @@ static Class elementClass(const AtomicString& tagName)
 @end
 
 
+//------------------------------------------------------------------------------------------
+// DOMNodeIterator
+
 @implementation DOMNodeIterator
 
 - (id)_initWithNodeIterator:(NodeIterator *)impl filter:(id <DOMNodeFilter>)filter
@@ -2146,6 +1145,10 @@ static Class elementClass(const AtomicString& tagName)
 
 @end
 
+
+//------------------------------------------------------------------------------------------
+// DOMTreeWalker
+
 @implementation DOMTreeWalker
 
 - (id)_initWithTreeWalker:(TreeWalker *)impl filter:(id <DOMNodeFilter>)filter
@@ -2274,7 +1277,11 @@ static Class elementClass(const AtomicString& tagName)
 
 @end
 
-class ObjCNodeFilterCondition : public NodeFilterCondition 
+
+//------------------------------------------------------------------------------------------
+// ObjCNodeFilterCondition
+
+class ObjCNodeFilterCondition : public NodeFilterCondition
 {
 public:
     ObjCNodeFilterCondition(id <DOMNodeFilter>);
@@ -2307,6 +1314,11 @@ short ObjCNodeFilterCondition::acceptNode(Node* node) const
     return [m_filter acceptNode:[DOMNode _nodeWith:node]];
 }
 
+
+//------------------------------------------------------------------------------------------
+// DOMDocument (DOMDocumentTraversal)
+
+// FIXME: this should be auto-genenerate in DOMDocument.mm
 @implementation DOMDocument (DOMDocumentTraversal)
 
 - (DOMNodeIterator *)createNodeIterator:(DOMNode *)root :(unsigned)whatToShow :(id <DOMNodeFilter>)filter :(BOOL)expandEntityReferences
@@ -2333,6 +1345,10 @@ short ObjCNodeFilterCondition::acceptNode(Node* node) const
 
 @end
 
+
+//------------------------------------------------------------------------------------------
+// ObjCEventListener
+
 ObjCEventListener* ObjCEventListener::find(id <DOMEventListener> listener)
 {
     if (ListenerMap* map = listenerMap)
index 25a84cf8c698ccdc417c8e28fc62b86464813550..ced4eb9ae0778afe586f4cf17cca138066e2db85 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#import <WebCore/DOMCore.h>
+#import <WebCore/DOMDOMImplementation.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMElement.h>
+#import <WebCore/DOMObject.h>
 #import <WebCore/DOMStylesheets.h>
 
 @class DOMCounter;
 @class DOMRect;
 @class DOMRGBColor;
 
+@interface DOMDocument (DOMViewCSS)
+- (DOMCSSStyleDeclaration *)getComputedStyle:(DOMElement *)elt :(NSString *)pseudoElt;
+@end
+
 @interface DOMCSSRuleList : DOMObject
 - (unsigned)length;
 - (DOMCSSRule *)item:(unsigned)index;
@@ -185,10 +194,6 @@ enum {
 - (NSString *)separator;
 @end
 
-@interface DOMElement (DOMElementCSSInlineStyle)
-- (DOMCSSStyleDeclaration *)style;
-@end
-
 @interface DOMCSSStyleDeclaration (DOMCSS2Properties)
 - (NSString *)azimuth;
 - (void)setAzimuth:(NSString *)azimuth;
@@ -442,15 +447,3 @@ enum {
 - (unsigned)insertRule:(NSString *)rule :(unsigned)index;
 - (void)deleteRule:(unsigned)index;
 @end
-
-@interface DOMDocument (DOMViewCSS)
-- (DOMCSSStyleDeclaration *)getComputedStyle:(DOMElement *)elt :(NSString *)pseudoElt;
-@end
-
-@interface DOMDocument (DOMDocumentCSS)
-- (DOMCSSStyleDeclaration *)getOverrideStyle:(DOMElement *)elt :(NSString *)pseudoElt;
-@end
-
-@interface DOMImplementation (DOMImplementationCSS)
-- (DOMCSSStyleSheet *)createCSSStyleSheet:(NSString *)title :(NSString *)media;
-@end
index d35697b3adaaafee811db26fdb8a1e4b246f11ab..deec324baf8b477e5b00ad0463552a2946bd0d34 100644 (file)
@@ -2483,26 +2483,6 @@ void removeWrapperForRGB(RGBA32 value)
 
 //------------------------------------------------------------------------------------------
 
-@implementation DOMObject (DOMLinkStyle)
-
-- (DOMStyleSheet *)sheet
-{
-    StyleSheet *sheet;
-
-    if ([self isKindOfClass:[DOMProcessingInstruction class]])
-        sheet = static_cast<ProcessingInstruction*>([(DOMProcessingInstruction *)self _node])->sheet();
-    else if ([self isKindOfClass:[DOMHTMLLinkElement class]])
-        sheet = static_cast<HTMLLinkElement*>([(DOMHTMLLinkElement *)self _node])->sheet();
-    else if ([self isKindOfClass:[DOMHTMLStyleElement class]])
-        sheet = static_cast<HTMLStyleElement*>([(DOMHTMLStyleElement *)self _node])->sheet();
-    else
-        return nil;
-
-    return [DOMStyleSheet _DOMStyleSheetWith:sheet];
-}
-
-@end
-
 @implementation DOMDocument (DOMViewCSS)
 
 - (DOMCSSStyleDeclaration *)getComputedStyle:(DOMElement *)elt :(NSString *)pseudoElt
index fa2a925ec0411139007fe856bba241845e66ea68..47556d5aa84234e7d365ca2986fb775fd66a87d9 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#import <WebCore/WebScriptObject.h>
-
-@class DOMDocument; 
-@class DOMDocumentType;
-@class DOMElement;
-@class DOMNamedNodeMap;
-@class DOMNodeList;
-
-typedef struct DOMObjectInternal DOMObjectInternal;
-
-@interface DOMObject : WebScriptObject <NSCopying>
-{
-    DOMObjectInternal *_internal;
-}
-@end
-
-typedef unsigned long long DOMTimeStamp;
-
-extern NSString * const DOMException;
-
-enum {
-    //
-    // DOM exception codes
-    //
-    DOM_INDEX_SIZE_ERR                = 1,
-    DOM_DOMSTRING_SIZE_ERR            = 2,
-    DOM_HIERARCHY_REQUEST_ERR         = 3,
-    DOM_WRONG_DOCUMENT_ERR            = 4,
-    DOM_INVALID_CHARACTER_ERR         = 5,
-    DOM_NO_DATA_ALLOWED_ERR           = 6,
-    DOM_NO_MODIFICATION_ALLOWED_ERR   = 7,
-    DOM_NOT_FOUND_ERR                 = 8,
-    DOM_NOT_SUPPORTED_ERR             = 9,
-    DOM_INUSE_ATTRIBUTE_ERR           = 10,
-    DOM_INVALID_STATE_ERR             = 11,
-    DOM_SYNTAX_ERR                    = 12,
-    DOM_INVALID_MODIFICATION_ERR      = 13,
-    DOM_NAMESPACE_ERR                 = 14,
-    DOM_INVALID_ACCESS_ERR            = 15
-};
-
-@interface DOMImplementation : DOMObject
-- (BOOL)hasFeature:(NSString *)feature :(NSString *)version;
-- (DOMDocumentType *)createDocumentType:(NSString *)qualifiedName :(NSString *)publicId :(NSString *)systemId;
-- (DOMDocument *)createDocument:(NSString *)namespaceURI :(NSString *)qualifiedName :(DOMDocumentType *)doctype;
-@end
-
-enum {
-    //
-    // DOM node types
-    //
-    DOM_ELEMENT_NODE                  = 1,
-    DOM_ATTRIBUTE_NODE                = 2,
-    DOM_TEXT_NODE                     = 3,
-    DOM_CDATA_SECTION_NODE            = 4,
-    DOM_ENTITY_REFERENCE_NODE         = 5,
-    DOM_ENTITY_NODE                   = 6,
-    DOM_PROCESSING_INSTRUCTION_NODE   = 7,
-    DOM_COMMENT_NODE                  = 8,
-    DOM_DOCUMENT_NODE                 = 9,
-    DOM_DOCUMENT_TYPE_NODE            = 10,
-    DOM_DOCUMENT_FRAGMENT_NODE        = 11,
-    DOM_NOTATION_NODE                 = 12
-};
-
-@interface DOMNode : DOMObject
-- (NSString *)nodeName;
-- (NSString *)nodeValue;
-- (void)setNodeValue:(NSString *)string;
-- (unsigned short)nodeType;
-- (DOMNode *)parentNode;
-- (DOMNodeList *)childNodes;
-- (DOMNode *)firstChild;
-- (DOMNode *)lastChild;
-- (DOMNode *)previousSibling;
-- (DOMNode *)nextSibling;
-- (DOMNamedNodeMap *)attributes;
-- (DOMDocument *)ownerDocument;
-- (DOMNode *)insertBefore:(DOMNode *)newChild :(DOMNode *)refChild;
-- (DOMNode *)replaceChild:(DOMNode *)newChild :(DOMNode *)oldChild;
-- (DOMNode *)removeChild:(DOMNode *)oldChild;
-- (DOMNode *)appendChild:(DOMNode *)newChild;
-- (BOOL)hasChildNodes;
-- (DOMNode *)cloneNode:(BOOL)deep;
-- (void)normalize;
-- (BOOL)isSupported:(NSString *)feature :(NSString *)version;
-- (NSString *)namespaceURI;
-- (NSString *)prefix;
-- (void)setPrefix:(NSString *)prefix;
-- (NSString *)localName;
-- (BOOL)hasAttributes;
-- (BOOL)isSameNode:(DOMNode *)other;
-- (BOOL)isEqualNode:(DOMNode *)other;
-- (NSString *)textContent;
-- (void)setTextContent:(NSString *)text;
-@end
-
-@interface DOMNodeList : DOMObject
-- (DOMNode *)item:(unsigned)index;
-- (unsigned)length;
-@end
-
-@interface DOMNamedNodeMap : DOMObject
-- (DOMNode *)getNamedItem:(NSString *)name;
-- (DOMNode *)setNamedItem:(DOMNode *)arg;
-- (DOMNode *)removeNamedItem:(NSString *)name;
-- (DOMNode *)item:(unsigned)index;
-- (unsigned)length;
-- (DOMNode *)getNamedItemNS:(NSString *)namespaceURI :(NSString *)localName;
-- (DOMNode *)setNamedItemNS:(DOMNode *)arg;
-- (DOMNode *)removeNamedItemNS:(NSString *)namespaceURI :(NSString *)localName;
-@end
-
-@interface DOMCharacterData : DOMNode
-- (NSString *)data;
-- (void)setData:(NSString *)data;
-- (unsigned)length;
-- (NSString *)substringData:(unsigned)offset :(unsigned)count;
-- (void)appendData:(NSString *)arg;
-- (void)insertData:(unsigned)offset :(NSString *)arg;
-- (void)deleteData:(unsigned)offset :(unsigned) count;
-- (void)replaceData:(unsigned)offset :(unsigned)count :(NSString *)arg;
-@end
-
-@interface DOMAttr : DOMNode
-- (NSString *)name;
-- (BOOL)specified;
-- (NSString *)value;
-- (void)setValue:(NSString *)value;
-- (DOMElement *)ownerElement;
-@end
-
-@interface DOMElement : DOMNode
-- (NSString *)tagName;
-- (NSString *)getAttribute:(NSString *)name;
-- (void)setAttribute:(NSString *)name :(NSString *)value;
-- (void)removeAttribute:(NSString *)name;
-- (DOMAttr *)getAttributeNode:(NSString *)name;
-- (DOMAttr *)setAttributeNode:(DOMAttr *)newAttr;
-- (DOMAttr *)removeAttributeNode:(DOMAttr *)oldAttr;
-- (DOMNodeList *)getElementsByTagName:(NSString *)name;
-- (NSString *)getAttributeNS:(NSString *)namespaceURI :(NSString *)localName;
-- (void)setAttributeNS:(NSString *)namespaceURI :(NSString *)qualifiedName :(NSString *)value;
-- (void)removeAttributeNS:(NSString *)namespaceURI :(NSString *)localName;
-- (DOMAttr *)getAttributeNodeNS:(NSString *)namespaceURI :(NSString *)localName;
-- (DOMAttr *)setAttributeNodeNS:(DOMAttr *)newAttr;
-- (DOMNodeList *)getElementsByTagNameNS:(NSString *)namespaceURI :(NSString *)localName;
-- (BOOL)hasAttribute:(NSString *)name;
-- (BOOL)hasAttributeNS:(NSString *)namespaceURI :(NSString *)localName;
-- (void)focus;
-- (void)blur;
-@end
-
-@interface DOMText : DOMCharacterData
-- (DOMText *)splitText:(unsigned)offset;
-@end
-
-@interface DOMComment : DOMCharacterData
-@end
-
-@interface DOMCDATASection : DOMText
-@end
-
-@interface DOMDocumentType : DOMNode
-- (NSString *)name;
-- (DOMNamedNodeMap *)entities;
-- (DOMNamedNodeMap *)notations;
-- (NSString *)publicId;
-- (NSString *)systemId;
-- (NSString *)internalSubset;
-@end
-
-@interface DOMNotation : DOMNode
-- (NSString *)publicId;
-- (NSString *)systemId;
-@end
-
-@interface DOMEntity : DOMNode
-- (NSString *)publicId;
-- (NSString *)systemId;
-- (NSString *)notationName;
-@end
-
-@interface DOMEntityReference : DOMNode
-@end
-
-@interface DOMProcessingInstruction : DOMNode
-- (NSString *)target;
-- (NSString *)data;
-- (void)setData:(NSString *)data;
-@end
-
-@interface DOMDocumentFragment : DOMNode
-@end
-
-@interface DOMDocument : DOMNode
-- (DOMDocumentType *)doctype;
-- (DOMImplementation *)implementation;
-- (DOMElement *)documentElement;
-- (DOMElement *)createElement:(NSString *)tagName;
-- (DOMDocumentFragment *)createDocumentFragment;
-- (DOMText *)createTextNode:(NSString *)data;
-- (DOMComment *)createComment:(NSString *)data;
-- (DOMCDATASection *)createCDATASection:(NSString *)data;
-- (DOMProcessingInstruction *)createProcessingInstruction:(NSString *)target :(NSString *)data;
-- (DOMAttr *)createAttribute:(NSString *)name;
-- (DOMEntityReference *)createEntityReference:(NSString *)name;
-- (DOMNodeList *)getElementsByTagName:(NSString *)tagname;
-- (DOMNode *)importNode:(DOMNode *)importedNode :(BOOL)deep;
-- (DOMElement *)createElementNS:(NSString *)namespaceURI :(NSString *)qualifiedName;
-- (DOMAttr *)createAttributeNS:(NSString *)namespaceURI :(NSString *)qualifiedName;
-- (DOMNodeList *)getElementsByTagNameNS:(NSString *)namespaceURI :(NSString *)localName;
-- (DOMElement *)getElementById:(NSString *)elementId;
-- (DOMNode *)adoptNode:(DOMNode *)source;
-@end
+#import <WebCore/DOMAttr.h>
+#import <WebCore/DOMCDATASection.h>
+#import <WebCore/DOMCharacterData.h>
+#import <WebCore/DOMComment.h>
+#import <WebCore/DOMDOMImplementation.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMDocumentFragment.h>
+#import <WebCore/DOMDocumentType.h>
+#import <WebCore/DOMElement.h>
+#import <WebCore/DOMEntity.h>
+#import <WebCore/DOMEntityReference.h>
+#import <WebCore/DOMNamedNodeMap.h>
+#import <WebCore/DOMNode.h>
+#import <WebCore/DOMNodeList.h>
+#import <WebCore/DOMNotation.h>
+#import <WebCore/DOMObject.h>
+#import <WebCore/DOMProcessingInstruction.h>
+#import <WebCore/DOMText.h>
index 374fe12a122c4ee3c9043bec31d7cfa8ab0ec677..2aa0f4f2c8134dc13046e8bd8e97e10fc9c99a9c 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -23,6 +24,9 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMNode.h>
+#import <WebCore/DOMObject.h>
 #import <WebCore/DOMViews.h>
 
 @class DOMEvent;
@@ -65,10 +69,6 @@ enum {
 - (void)initEvent:(NSString *)eventTypeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg;
 @end
 
-@interface DOMDocument (DOMDocumentEvent)
-- (DOMEvent *)createEvent:(NSString *)eventType;
-@end
-
 @interface DOMUIEvent : DOMEvent
 - (DOMAbstractView *)view;
 - (int)detail;
index 1eb937c6d00c339eed80d577174cb381f19b72db..0c701fcfa51e85814e520c29e712a4d79c6a1e67 100644 (file)
@@ -378,15 +378,3 @@ ALLOW_DOM_CAST(Event)
 }
 
 @end
-
-@implementation DOMDocument (DOMDocumentEvent)
-
-- (DOMEvent *)createEvent:(NSString *)eventType
-{
-    ExceptionCode ec = 0;
-    RefPtr<Event> event = [self _document]->createEvent(eventType, ec);
-    raiseOnDOMError(ec);
-    return [DOMEvent _eventWith:event.get()];
-}
-
-@end
index 02e176f26aafd5e38893c1263abce1582cbc818a..3cba2793633b735e4ceef6c2daecf398b29d884a 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#import <WebCore/DOMAttr.h>
 #import <WebCore/DOMCSS.h>
+#import <WebCore/DOMDOMImplementation.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMElement.h>
 #import <WebCore/DOMHTML.h>
+#import <WebCore/DOMNode.h>
 #import <WebCore/DOMRange.h>
 
 @class NSColor;
 @class NSImage;
-
-@interface DOMImplementation (DOMImplementationExtensions)
-- (DOMHTMLDocument *)createHTMLDocument:(NSString *)title;
-@end
+@class DOMHTMLCollection;
 
 @interface DOMDocument (DOMDocumentCSSExtensions)
 - (DOMCSSStyleDeclaration *)createCSSStyleDeclaration;
 - (DOMCSSRuleList *)getMatchedCSSRules:(DOMElement *)elt :(NSString *)pseudoElt;
 @end
 
+@interface DOMElement (DOMElementAppKitExtensions)
+- (NSImage *)image;
+@end
+
 @interface DOMHTMLDocument (DOMHTMLDocumentExtensions)
 - (DOMDocumentFragment *)createDocumentFragmentWithMarkupString:(NSString *)markupString baseURL:(NSURL *)baseURL;
 - (DOMDocumentFragment *)createDocumentFragmentWithText:(NSString *)text;
 - (void)setContentEditable:(NSString *)contentEditable;
 - (BOOL)isContentEditable;
 - (NSString *)titleDisplayString;
-
-- (int)offsetLeft;
-- (int)offsetTop;
-- (int)offsetWidth;
-- (int)offsetHeight;
-- (DOMHTMLElement *)offsetParent;
-
-- (int)clientWidth;
-- (int)clientHeight;
-
-- (int)scrollLeft;
-- (void)setScrollLeft:(int)scroll;
-- (int)scrollTop;
-- (void)setScrollTop:(int)scroll;
-- (int)scrollWidth;
-- (int)scrollHeight;
 @end
 
 @interface DOMHTMLEmbedElement : DOMHTMLElement
 - (NSColor *)color;
 @end
 
-@interface DOMAttr (DOMAttrExtensions)
-- (DOMCSSStyleDeclaration *)style;
-@end
-
 @interface DOMCSSStyleDeclaration (DOMCSSStyleDeclarationExtensions)
 - (NSString *)getPropertyShorthand:(NSString *)propertyName;
 - (BOOL)isPropertyImplicit:(NSString *)propertyName;
 @end
 
-@interface DOMNode (DOMNodeExtensions)
-- (NSRect)boundingBox;
-- (NSArray *)lineBoxRects;
-@end
-
 @interface DOMRange (DOMRangeExtensions)
 - (NSString *)text;
 @end
 
-@interface DOMElement (DOMElementExtensions)
-- (NSImage *)image;
-- (void)scrollIntoView:(BOOL)alignTop;
-- (void)scrollIntoViewIfNeeded:(BOOL)centerIfNeeded;
-@end
-
 @interface DOMHTMLInputElement (DOMHTMLInputElementExtensions)
 - (NSString *)altDisplayString;
 - (NSURL *)absoluteImageURL;
index 57bd2c2c301e1d37b359af2d7ce53f6c4b55eee0..44dc4610d1a9bf0b1485e400ac610d03b34f72c8 100644 (file)
@@ -416,71 +416,6 @@ using namespace HTMLNames;
     return [self _HTMLElement]->isContentEditable();
 }
 
-- (int)offsetLeft
-{
-    return [self _HTMLElement]->offsetLeft();
-}
-
-- (int)offsetTop
-{
-    return [self _HTMLElement]->offsetTop();
-}
-
-- (int)offsetWidth
-{
-    return [self _HTMLElement]->offsetWidth();
-}
-
-- (int)offsetHeight
-{
-    return [self _HTMLElement]->offsetHeight();
-}
-
-- (DOMHTMLElement *)offsetParent
-{
-    return [DOMHTMLElement _elementWith:static_cast<HTMLElement*>([self _HTMLElement]->offsetParent())];
-}
-
-- (int)clientWidth
-{
-    return [self _HTMLElement]->clientWidth();
-}
-
-- (int)clientHeight
-{
-    return [self _HTMLElement]->clientHeight();
-}
-
-- (int)scrollLeft;
-{
-    return [self _HTMLElement]->scrollLeft();
-}
-
-- (void)setScrollLeft:(int)scroll
-{
-    [self _HTMLElement]->setScrollLeft(scroll);
-}
-
-- (int)scrollTop
-{
-    return [self _HTMLElement]->scrollTop();
-}
-
-- (void)setScrollTop:(int)scroll
-{
-    [self _HTMLElement]->setScrollTop(scroll);
-}
-
-- (int)scrollWidth
-{
-    return [self _HTMLElement]->scrollWidth();
-}
-
-- (int)scrollHeight
-{
-    return [self _HTMLElement]->scrollHeight();
-}
-
 @end
 
 @implementation DOMHTMLDocument
@@ -627,6 +562,15 @@ using namespace HTMLNames;
 
 @end
 
+@implementation DOMHTMLDocument (WebCoreInternal)
+
++ (DOMHTMLDocument *)_HTMLDocumentWith:(WebCore::HTMLDocument *)impl;
+{
+    return static_cast<DOMHTMLDocument *>([DOMNode _nodeWith:impl]);
+}
+
+@end
+
 @implementation DOMHTMLHtmlElement
 
 - (HTMLHtmlElement *)_HTMLHtmlElement
index 734d62255e4c83f6ae25c32b01c2fda1602c40fa..6851061e9c705e69aa6ca9d1c0f8ee09d6c3413f 100644 (file)
 #import "DOMHTML.h"
 
 namespace WebCore {
+    class HTMLDocument;
     class HTMLOptionsCollection;
 }
 
 @interface DOMHTMLOptionsCollection (WebCoreInternal)
 + (DOMHTMLOptionsCollection *)_optionsCollectionWith:(WebCore::HTMLOptionsCollection *)impl;
 @end
+
+@interface DOMHTMLDocument (WebCoreInternal)
++ (DOMHTMLDocument *)_HTMLDocumentWith:(WebCore::HTMLDocument *)impl;
+@end
index 3a8bdc987c5d6b61f9e47457f150a81676dd2ba7..9a95138c06a2261feec999c3d2efc5c5e89acc2a 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -53,6 +54,6 @@ public:
 
 DOMImplementationFront* implementationFront(Document*);
 
-} //namespace
+} // namespace WebCore
 
-#endif
+#endif // DOMImplementationFront_h
index 9c15a10bd788bb73eeae7520b038247c5e40348e..8bcd3bb214a1b0eef601b08cd27dc492b4675a66 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004-2006 Apple Computer, Inc.  All rights reserved.
  * Copyright (C) 2006 James G. Speth (speth@end.com)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #import "DOM.h"
 
+#import "DOMAttr.h"
+#import "DOMCDATASection.h"
+#import "DOMComment.h"
+#import "DOMDOMImplementation.h"
+#import "DOMDocument.h"
+#import "DOMDocumentFragment.h"
+#import "DOMDocumentType.h"
+#import "DOMElement.h"
+#import "DOMEntityReference.h"
+#import "DOMNamedNodeMap.h"
+#import "DOMNode.h"
+#import "DOMNodeList.h"
+#import "DOMObject.h"
+#import "DOMProcessingInstruction.h"
+#import "DOMText.h"
+
 namespace WebCore {
+    class Attr;
+    class CDATASection;
     class CSSStyleDeclaration;
     class CSSStyleSheet;
-    class DocumentFragment;
+    class Comment;
+    class DOMImplementationFront;
     class Document;
+    class DocumentFragment;
     class DocumentType;
     class Element;
-    class NodeFilter;
+    class EntityReference;
+    class NamedNodeMap;
     class Node;
+    class NodeFilter;
     class NodeIterator;
-    class NamedNodeMap;
     class NodeList;
+    class ProcessingInstruction;
     class Range;
     class StyleSheetList;
+    class Text;
     class TreeWalker;
 
     typedef int ExceptionCode;
 }
 
+@interface DOMObject (WebCoreInternal)
+- (id)_init;
+@end
+
 @interface DOMNode (WebCoreInternal)
 + (DOMNode *)_nodeWith:(WebCore::Node *)impl;
 - (WebCore::Node *)_node;
@@ -58,11 +86,46 @@ namespace WebCore {
 + (DOMNodeList *)_nodeListWith:(WebCore::NodeList *)impl;
 @end
 
+@interface DOMText (WebCoreInternal)
++ (DOMText *)_textWith:(WebCore::Text *)impl;
+@end
+
+@interface DOMComment (WebCoreInternal)
++ (DOMComment *)_commentWith:(WebCore::Comment *)impl;
+@end
+
+@interface DOMCDATASection (WebCoreInternal)
++ (DOMCDATASection *)_CDATASectionWith:(WebCore::CDATASection *)impl;
+@end
+
+@interface DOMProcessingInstruction (WebCoreInternal)
++ (DOMProcessingInstruction *)_processingInstructionWith:(WebCore::ProcessingInstruction *)impl;
+@end
+
+@interface DOMEntityReference (WebCoreInternal)
++ (DOMEntityReference *)_entityReferenceWith:(WebCore::EntityReference *)impl;
+@end
+
 @interface DOMElement (WebCoreInternal)
 + (DOMElement *)_elementWith:(WebCore::Element *)impl;
 - (WebCore::Element *)_element;
 @end
 
+@interface DOMAttr (WebCoreInternal)
++ (DOMAttr *)_attrWith:(WebCore::Attr *)impl;
+- (WebCore::Attr *)_attr;
+@end
+
+@interface DOMDocumentType (WebCoreInternal)
++ (DOMDocumentType *)_documentTypeWith:(WebCore::DocumentType *)impl;
+- (WebCore::DocumentType *)_documentType;
+@end
+
+@interface DOMImplementation (WebCoreInternal)
++ (DOMImplementation *)_DOMImplementationWith:(WebCore::DOMImplementationFront *)impl;
+- (WebCore::DOMImplementationFront *)_DOMImplementation;
+@end
+
 @interface DOMDocument (WebCoreInternal)
 + (DOMDocument *)_documentWith:(WebCore::Document *)impl;
 - (WebCore::Document *)_document;
@@ -87,10 +150,6 @@ namespace WebCore {
 + (DOMTreeWalker *)_treeWalkerWith:(WebCore::TreeWalker *)impl filter:(id <DOMNodeFilter>)filter;
 @end
 
-@interface DOMObject (WebCoreInternal)
-- (id)_init;
-@end
-
 @interface DOMCSSStyleDeclaration (WebCoreInternal)
 + (DOMCSSStyleDeclaration *)_styleDeclarationWith:(WebCore::CSSStyleDeclaration *)impl;
 - (WebCore::CSSStyleDeclaration *)_styleDeclaration;
diff --git a/WebCore/bindings/objc/DOMNode.h b/WebCore/bindings/objc/DOMNode.h
new file mode 100644 (file)
index 0000000..69e4e57
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import <WebCore/DOMObject.h>
+
+@class DOMDocument; 
+@class DOMNamedNodeMap;
+@class DOMNodeList;
+
+// DOM node types
+enum {
+    DOM_ELEMENT_NODE                  = 1,
+    DOM_ATTRIBUTE_NODE                = 2,
+    DOM_TEXT_NODE                     = 3,
+    DOM_CDATA_SECTION_NODE            = 4,
+    DOM_ENTITY_REFERENCE_NODE         = 5,
+    DOM_ENTITY_NODE                   = 6,
+    DOM_PROCESSING_INSTRUCTION_NODE   = 7,
+    DOM_COMMENT_NODE                  = 8,
+    DOM_DOCUMENT_NODE                 = 9,
+    DOM_DOCUMENT_TYPE_NODE            = 10,
+    DOM_DOCUMENT_FRAGMENT_NODE        = 11,
+    DOM_NOTATION_NODE                 = 12
+};
+
+@interface DOMNode : DOMObject
+- (NSString *)nodeName;
+- (NSString *)nodeValue;
+- (void)setNodeValue:(NSString *)string;
+- (unsigned short)nodeType;
+- (DOMNode *)parentNode;
+- (DOMNodeList *)childNodes;
+- (DOMNode *)firstChild;
+- (DOMNode *)lastChild;
+- (DOMNode *)previousSibling;
+- (DOMNode *)nextSibling;
+- (DOMNamedNodeMap *)attributes;
+- (DOMDocument *)ownerDocument;
+- (DOMNode *)insertBefore:(DOMNode *)newChild :(DOMNode *)refChild;
+- (DOMNode *)replaceChild:(DOMNode *)newChild :(DOMNode *)oldChild;
+- (DOMNode *)removeChild:(DOMNode *)oldChild;
+- (DOMNode *)appendChild:(DOMNode *)newChild;
+- (BOOL)hasChildNodes;
+- (DOMNode *)cloneNode:(BOOL)deep;
+- (void)normalize;
+- (BOOL)isSupported:(NSString *)feature :(NSString *)version;
+- (NSString *)namespaceURI;
+- (NSString *)prefix;
+- (void)setPrefix:(NSString *)prefix;
+- (NSString *)localName;
+- (BOOL)hasAttributes;
+- (BOOL)isSameNode:(DOMNode *)other;
+- (BOOL)isEqualNode:(DOMNode *)other;
+- (NSString *)textContent;
+- (void)setTextContent:(NSString *)text;
+@end
+
+@interface DOMNode (DOMNodeExtensions)
+- (NSRect)boundingBox;
+- (NSArray *)lineBoxRects;
+@end
diff --git a/WebCore/bindings/objc/DOMNode.mm b/WebCore/bindings/objc/DOMNode.mm
new file mode 100644 (file)
index 0000000..6385325
--- /dev/null
@@ -0,0 +1,292 @@
+/*
+ * Copyright (C) 2004-2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 James G. Speth <speth@end.com>
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import "config.h"
+#import "DOMNode.h"
+
+#import "DOMInternal.h" // needed for DOM_cast<>
+#import "Node.h" // implementation class
+
+#import "AtomicString.h"
+#import "DOMDocument.h"
+#import "DOMNamedNodeMap.h"
+#import "DOMNodeList.h"
+#import "DeprecatedValueList.h"
+#import "IntRect.h"
+#import "NamedAttrMap.h"
+#import "NamedNodeMap.h"
+#import "NodeList.h"
+#import "PlatformString.h"
+#import "RenderObject.h"
+#import <wtf/Assertions.h>
+
+@implementation DOMNode
+
+- (void)dealloc
+{
+    if (_internal)
+        DOM_cast<WebCore::Node *>(_internal)->deref();
+    [super dealloc];
+}
+
+- (void)finalize
+{
+    if (_internal)
+        DOM_cast<WebCore::Node *>(_internal)->deref();
+    [super finalize];
+}
+
+- (NSString *)nodeName
+{
+    return [self _node]->nodeName();
+}
+
+- (NSString *)nodeValue
+{
+    // Documentation says we can raise a DOMSTRING_SIZE_ERR.
+    // However, the lower layer does not report that error up to us.
+    return [self _node]->nodeValue();
+}
+
+- (void)setNodeValue:(NSString *)string
+{
+    ASSERT(string);
+    
+    WebCore::ExceptionCode ec = 0;
+    [self _node]->setNodeValue(string, ec);
+    raiseOnDOMError(ec);
+}
+
+- (unsigned short)nodeType
+{
+    return [self _node]->nodeType();
+}
+
+- (DOMNode *)parentNode
+{
+    return [DOMNode _nodeWith:[self _node]->parentNode()];
+}
+
+- (DOMNodeList *)childNodes
+{
+    return [DOMNodeList _nodeListWith:[self _node]->childNodes().get()];
+}
+
+- (DOMNode *)firstChild
+{
+    return [DOMNode _nodeWith:[self _node]->firstChild()];
+}
+
+- (DOMNode *)lastChild
+{
+    return [DOMNode _nodeWith:[self _node]->lastChild()];
+}
+
+- (DOMNode *)previousSibling
+{
+    return [DOMNode _nodeWith:[self _node]->previousSibling()];
+}
+
+- (DOMNode *)nextSibling
+{
+    return [DOMNode _nodeWith:[self _node]->nextSibling()];
+}
+
+- (DOMNamedNodeMap *)attributes
+{
+    return [DOMNamedNodeMap _namedNodeMapWith:[self _node]->attributes()];
+}
+
+- (DOMDocument *)ownerDocument
+{
+    return [DOMDocument _documentWith:[self _node]->document()];
+}
+
+- (DOMNode *)insertBefore:(DOMNode *)newChild :(DOMNode *)refChild
+{
+    ASSERT(newChild);
+    ASSERT(refChild);
+
+    WebCore::ExceptionCode ec = 0;
+    if ([self _node]->insertBefore([newChild _node], [refChild _node], ec))
+        return newChild;
+    raiseOnDOMError(ec);
+    return nil;
+}
+
+- (DOMNode *)replaceChild:(DOMNode *)newChild :(DOMNode *)oldChild
+{
+    ASSERT(newChild);
+    ASSERT(oldChild);
+
+    WebCore::ExceptionCode ec = 0;
+    if ([self _node]->replaceChild([newChild _node], [oldChild _node], ec))
+        return oldChild;
+    raiseOnDOMError(ec);
+    return nil;
+}
+
+- (DOMNode *)removeChild:(DOMNode *)oldChild
+{
+    ASSERT(oldChild);
+
+    WebCore::ExceptionCode ec = 0;
+    if ([self _node]->removeChild([oldChild _node], ec))
+        return oldChild;
+    raiseOnDOMError(ec);
+    return nil;
+}
+
+- (DOMNode *)appendChild:(DOMNode *)newChild
+{
+    ASSERT(newChild);
+
+    WebCore::ExceptionCode ec = 0;
+    if ([self _node]->appendChild([newChild _node], ec))
+        return newChild;
+    raiseOnDOMError(ec);
+    return nil;
+}
+
+- (BOOL)hasChildNodes
+{
+    return [self _node]->hasChildNodes();
+}
+
+- (DOMNode *)cloneNode:(BOOL)deep
+{
+    return [DOMNode _nodeWith:[self _node]->cloneNode(deep).get()];
+}
+
+- (void)normalize
+{
+    [self _node]->normalize();
+}
+
+- (BOOL)isSupported:(NSString *)feature :(NSString *)version
+{
+    ASSERT(feature);
+    ASSERT(version);
+
+    return [self _node]->isSupported(feature, version);
+}
+
+- (NSString *)namespaceURI
+{
+    return [self _node]->namespaceURI();
+}
+
+- (NSString *)prefix
+{
+    return [self _node]->prefix();
+}
+
+- (void)setPrefix:(NSString *)prefix
+{
+    ASSERT(prefix);
+
+    WebCore::ExceptionCode ec = 0;
+    WebCore::String prefixStr(prefix);
+    [self _node]->setPrefix(prefixStr.impl(), ec);
+    raiseOnDOMError(ec);
+}
+
+- (NSString *)localName
+{
+    return [self _node]->localName();
+}
+
+- (BOOL)hasAttributes
+{
+    return [self _node]->hasAttributes();
+}
+
+- (BOOL)isSameNode:(DOMNode *)other
+{
+    return [self _node]->isSameNode([other _node]);
+}
+
+- (BOOL)isEqualNode:(DOMNode *)other
+{
+    return [self _node]->isEqualNode([other _node]);
+}
+
+- (BOOL)isDefaultNamespace:(NSString *)namespaceURI
+{
+    return [self _node]->isDefaultNamespace(namespaceURI);
+}
+
+- (NSString *)lookupPrefix:(NSString *)namespaceURI
+{
+    return [self _node]->lookupPrefix(namespaceURI);
+}
+
+- (NSString *)lookupNamespaceURI:(NSString *)prefix
+{
+    return [self _node]->lookupNamespaceURI(prefix);
+}
+
+- (NSString *)textContent
+{
+    return [self _node]->textContent();
+}
+
+- (void)setTextContent:(NSString *)text
+{
+    WebCore::ExceptionCode ec = 0;
+    [self _node]->setTextContent(text, ec);
+    raiseOnDOMError(ec);
+}
+
+@end
+
+@implementation DOMNode (DOMNodeExtensions)
+
+- (NSRect)boundingBox
+{
+    WebCore::RenderObject *renderer = [self _node]->renderer();
+    if (renderer)
+        return renderer->absoluteBoundingBoxRect();
+    return NSZeroRect;
+}
+
+- (NSArray *)lineBoxRects
+{
+    WebCore::RenderObject *renderer = [self _node]->renderer();
+    if (renderer) {
+        NSMutableArray *results = [[NSMutableArray alloc] init];
+        WebCore::DeprecatedValueList<WebCore::IntRect> rects = renderer->lineBoxRects();
+        if (!rects.isEmpty()) {
+            for (WebCore::DeprecatedValueList<WebCore::IntRect>::ConstIterator it = rects.begin(); it != rects.end(); ++it)
+                [results addObject:[NSValue valueWithRect:*it]];
+        }
+        return [results autorelease];
+    }
+    return nil;
+}
+
+@end
diff --git a/WebCore/bindings/objc/DOMObject.h b/WebCore/bindings/objc/DOMObject.h
new file mode 100644 (file)
index 0000000..28ed701
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import <WebCore/WebScriptObject.h>
+
+@class DOMStyleSheet;
+
+typedef unsigned long long DOMTimeStamp;
+
+extern NSString * const DOMException;
+
+// DOM exception codes
+enum {
+    DOM_INDEX_SIZE_ERR                = 1,
+    DOM_DOMSTRING_SIZE_ERR            = 2,
+    DOM_HIERARCHY_REQUEST_ERR         = 3,
+    DOM_WRONG_DOCUMENT_ERR            = 4,
+    DOM_INVALID_CHARACTER_ERR         = 5,
+    DOM_NO_DATA_ALLOWED_ERR           = 6,
+    DOM_NO_MODIFICATION_ALLOWED_ERR   = 7,
+    DOM_NOT_FOUND_ERR                 = 8,
+    DOM_NOT_SUPPORTED_ERR             = 9,
+    DOM_INUSE_ATTRIBUTE_ERR           = 10,
+    DOM_INVALID_STATE_ERR             = 11,
+    DOM_SYNTAX_ERR                    = 12,
+    DOM_INVALID_MODIFICATION_ERR      = 13,
+    DOM_NAMESPACE_ERR                 = 14,
+    DOM_INVALID_ACCESS_ERR            = 15
+};
+
+
+typedef struct DOMObjectInternal DOMObjectInternal;
+
+@interface DOMObject : WebScriptObject <NSCopying>
+{
+    DOMObjectInternal *_internal;
+}
+@end
+
+@interface DOMObject (DOMLinkStyle)
+- (DOMStyleSheet *)sheet;
+@end
diff --git a/WebCore/bindings/objc/DOMObject.mm b/WebCore/bindings/objc/DOMObject.mm
new file mode 100644 (file)
index 0000000..abdad51
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2004-2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 James G. Speth <speth@end.com>
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import "config.h"
+#import "DOMObject.h"
+
+#import "DOMInternal.h"
+
+#import "DOMCSS.h" // for DOMStyleSheet
+#import "DOMCSSInternal.h"
+#import "DOMHTML.h" // for DOMHTMLLinkElement and DOMHTMLStyleElement
+#import "DOMProcessingInstruction.h"
+#import "HTMLLinkElement.h"
+#import "HTMLStyleElement.h"
+#import "ProcessingInstruction.h"
+#import "StyleSheet.h"
+
+@implementation DOMObject
+
+// Prevent creation of DOM objects by clients who just "[[xxx alloc] init]".
+- (id)init
+{
+    [NSException raise:NSGenericException format:@"+[%@ init]: should never be used", NSStringFromClass([self class])];
+    [self release];
+    return nil;
+}
+
+- (void)dealloc
+{
+    if (_internal)
+        removeDOMWrapper(_internal);
+    [super dealloc];
+}
+
+- (void)finalize
+{
+    if (_internal)
+        removeDOMWrapper(_internal);
+    [super finalize];
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    return [self retain];
+}
+
+@end
+
+@implementation DOMObject (DOMLinkStyle)
+
+- (DOMStyleSheet *)sheet
+{
+    WebCore::StyleSheet *sheet;
+
+    if ([self isKindOfClass:[DOMProcessingInstruction class]])
+        sheet = static_cast<WebCore::ProcessingInstruction*>([(DOMProcessingInstruction *)self _node])->sheet();
+    else if ([self isKindOfClass:[DOMHTMLLinkElement class]])
+        sheet = static_cast<WebCore::HTMLLinkElement*>([(DOMHTMLLinkElement *)self _node])->sheet();
+    else if ([self isKindOfClass:[DOMHTMLStyleElement class]])
+        sheet = static_cast<WebCore::HTMLStyleElement*>([(DOMHTMLStyleElement *)self _node])->sheet();
+    else
+        return nil;
+
+    return [DOMStyleSheet _DOMStyleSheetWith:sheet];
+}
+
+@end
index 1f5d36f93436a8b82ae414b7687f6c8ed46f7217..db83c5398cfc91d0cce53d1f147ea97b236d4088 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  */
 
 #import <WebCore/DOMCSS.h>
+#import <WebCore/DOMElement.h>
+#import <WebCore/DOMEvents.h>
 #import <WebCore/DOMHTML.h>
+#import <WebCore/DOMNode.h>
 #import <WebCore/DOMRange.h>
-#import <WebCore/DOMEvents.h>
 
 @interface DOMRange (WebPrivate)
 // uses same algorithm as innerText
@@ -87,4 +90,3 @@
 @interface DOMWheelEvent(PublicPending)
 - (void)initWheelEvent:(BOOL)horizontal :(int)wheelDelta :(DOMAbstractView *)viewArg :(int)screenXArg :(int)screenYArg :(int)clientX :(int)clientY :(BOOL)ctrlKeyArg :(BOOL)altKeyArg :(BOOL)shiftKeyArg :(BOOL)metaKeyArg;
 @end
-
index 9c3a410d0a236997e0462540a913a856c6ee093d..39623cbac48f95521ca6159246d45f84576eb1c9 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -24,6 +25,8 @@
  */
 
 #import <WebCore/DOMCore.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMObject.h>
 
 extern NSString * const DOMRangeException;
 
@@ -71,7 +74,3 @@ enum {
 - (NSString *)toString;
 - (void)detach;
 @end
-
-@interface DOMDocument (DOMDocumentRange)
-- (DOMRange *)createRange;
-@end
index 7f74c65302f5f8682302c7ef9bea9650f3eb6ab2..ac9c744d44f608feed7b17b98ca65c84f2f8252c 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -24,6 +25,8 @@
  */
 
 #import <WebCore/DOMCore.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMObject.h>
 
 @class DOMMediaList;
 @class DOMStyleSheet;
@@ -54,11 +57,3 @@ extern NSString * const DOMEventException;
 - (void)deleteMedium:(NSString *)oldMedium;
 - (void)appendMedium:(NSString *)newMedium;
 @end
-
-@interface DOMObject (DOMLinkStyle)
-- (DOMStyleSheet *)sheet;
-@end
-
-@interface DOMDocument (DOMDocumentStyle)
-- (DOMStyleSheetList *)styleSheets;
-@end
index 2ca8e05f42ab47dea72dd0a86f6e02c87b784646..f2ef221fafb085de7150e761a580642a80798929 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -24,6 +25,8 @@
  */
 
 #import <WebCore/DOMCore.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMObject.h>
 
 @class DOMNodeFilter;
 
index b41a81f5d1d3fe8b1aafc2853721c9f9488dd281..bcbc23dc06112b0d38f11987aef7cdd1e447220d 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  */
 
 #import <WebCore/DOMCore.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMObject.h>
 
 @interface DOMAbstractView : DOMObject
 - (DOMDocument *)document;
 @end
-
-@interface DOMDocument (DOMDocumentView)
-- (DOMAbstractView *)defaultView;
-@end
index d64f44e0db7a15f80b26c6e89854a65637e760fe..f719d9554148293c01bcfaf029dd98d6b83e86be 100644 (file)
@@ -79,12 +79,3 @@ ALLOW_DOM_CAST(DOMWindow)
 }
 
 @end
-
-@implementation DOMDocument (DOMDocumentView)
-
-- (DOMAbstractView *)defaultView
-{
-    return [DOMAbstractView _abstractViewWith:[self _document]->defaultView()];
-}
-
-@end
index e6c01728726a98fac2ed0c02c18b98feacb7b9bb..eb5051bf806452897552d6a4f7d903a48159659c 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -24,6 +25,8 @@
  */
 
 #import <WebCore/DOMCore.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMObject.h>
 
 extern NSString * const DOMXPathException;
 
@@ -65,9 +68,3 @@ enum {
 @interface DOMXPathExpression : DOMObject
 - (DOMXPathResult *)evaluate:(DOMNode *)contextNode :(unsigned short)type :(DOMXPathResult *)result;
 @end
-
-@interface DOMDocument (DOMDocumentXPath)
-- (DOMXPathExpression *)createExpression:(NSString *)expression :(id <DOMXPathNSResolver>)resolver;
-- (id <DOMXPathNSResolver>)createNSResolver:(DOMNode *)nodeResolver;
-- (DOMXPathResult *)evaluate:(NSString *)expression :(DOMNode *)contextNode :(id <DOMXPathNSResolver>)resolver :(unsigned short)type :(DOMXPathResult *)result;
-@end
index 1c2c65776beb44effa741300294d5e916c881aea..f552fe8be59c7ef0b105f52574567f069218cc9b 100644 (file)
@@ -272,37 +272,4 @@ using WebCore::XPathResult;
 
 @end
 
-@implementation DOMDocument (DOMDocumentXPath)
-
-- (DOMXPathExpression *)createExpression:(NSString *)expression :(id <DOMXPathNSResolver>)resolver
-{
-    if (resolver && ![resolver isMemberOfClass:[DOMNativeXPathNSResolver class]])
-        [NSException raise:NSGenericException format:@"createExpression currently does not work with custom NS resolvers"];
-    
-    DOMNativeXPathNSResolver *nativeResolver = (DOMNativeXPathNSResolver *)resolver;
-    ExceptionCode ec = 0;
-    DOMXPathExpression *result = [DOMXPathExpression _xpathExpressionWith:[self _document]->createExpression(expression, [nativeResolver _xpathNSResolver], ec).get()];
-    raiseOnDOMError(ec);
-    return result;
-}
-
-- (id <DOMXPathNSResolver>)createNSResolver:(DOMNode *)nodeResolver
-{
-    return [DOMNativeXPathNSResolver _xpathNSResolverWith:[self _document]->createNSResolver([nodeResolver _node]).get()];
-}
-
-- (DOMXPathResult *)evaluate:(NSString *)expression :(DOMNode *)contextNode :(id <DOMXPathNSResolver>)resolver :(unsigned short)type :(DOMXPathResult *)result
-{
-    if (resolver && ![resolver isMemberOfClass:[DOMNativeXPathNSResolver class]])
-        [NSException raise:NSGenericException format:@"createExpression currently does not work with custom NS resolvers"];
-    
-    DOMNativeXPathNSResolver *nativeResolver = (DOMNativeXPathNSResolver *)resolver;
-    ExceptionCode ec = 0;
-    DOMXPathResult *_result = [DOMXPathResult _xpathResultWith:[self _document]->evaluate(expression, [contextNode _node], [nativeResolver _xpathNSResolver], type, [result _xpathResult], ec).get()];
-    raiseOnDOMError(ec);
-    return _result;
-}
-
-@end
-
 #endif // XPATH_SUPPORT
index bfbaa34c83f5a2a878d8a5a145e25f9906505119..c02548284313228438cb8f45f0ec4581d7192c55 100644 (file)
@@ -71,7 +71,6 @@ sub ProcessDocument
   $useDocument = shift;
   
   my $ifaceName = $useGenerator;
-  $ifaceName =~ s/\b(\w)/\U$1/g; # Make first letter of each word uppercase
   $ifaceName = "CodeGenerator$ifaceName";
 
   # Dynamically load external code generation perl module...
index 8b57847bf2d0aee3f312242c75bd33e542483223..b1a6c82751e783a3b6cfe066557690bddf145c0b 100644 (file)
@@ -2,7 +2,8 @@
 # KDOM IDL parser
 #
 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org>
-# Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 
+# Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
+# Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
 # Copyright (C) 2006 Apple Computer, Inc.
 #
 # This file is part of the KDE project
@@ -57,22 +58,22 @@ EOF
 # Default constructor
 sub new
 {
-       my $object = shift;
-       my $reference = { };
-       
-       $codeGenerator = shift;
-       $outputDir = shift;
-       
-       bless($reference, $object);
-       return $reference;
+    my $object = shift;
+    my $reference = { };
+
+    $codeGenerator = shift;
+    $outputDir = shift;
+
+    bless($reference, $object);
+    return $reference;
 }
 
 sub finish
 {
-       my $object = shift;
-       
-       # Commit changes!
-       $object->WriteData();
+    my $object = shift;
+
+    # Commit changes!
+    $object->WriteData();
 }
 
 sub leftShift($$) {
@@ -83,11 +84,11 @@ sub leftShift($$) {
 # Params: 'domClass' struct
 sub GenerateInterface
 {
-       my $object = shift;
-       my $dataNode = shift;
-       
-       # FIXME: Check dates to see if we need to re-generate anything
-       
+    my $object = shift;
+    my $dataNode = shift;
+
+    $object->RemoveExcludedAttributesAndFunctions($dataNode);
+
     # Start actual generation..
     $object->GenerateHeader($dataNode);
     $object->GenerateImplementation($dataNode);
@@ -111,6 +112,32 @@ sub GenerateModule
     $module = $dataNode->module;    
 }
 
+sub RemoveExcludedAttributesAndFunctions
+{
+    my $object = shift;
+    my $dataNode = shift;
+
+    my $i = 0;
+    while ($i < scalar(@{$dataNode->attributes})) {
+        my $lang = ${$dataNode->attributes}[$i]->signature->extendedAttributes->{"Exclude"};
+        if ($lang and $lang eq "JS") {
+            splice(@{$dataNode->attributes}, $i, 1);
+        } else {
+            $i++;
+        }
+    }
+
+    $i = 0;
+    while ($i < scalar(@{$dataNode->functions})) {
+        my $lang = ${$dataNode->functions}[$i]->signature->extendedAttributes->{"Exclude"};
+        if ($lang and $lang eq "JS") {
+            splice(@{$dataNode->functions}, $i, 1);
+        } else {
+            $i++;
+        }
+    }
+}
+
 sub GetParentClassName
 {
     my $dataNode = shift;
@@ -211,11 +238,11 @@ sub GenerateHeader
             push(@headerContent, "#include \"kjs_binding.h\"\n");
         }
     }
-  
+
+    my $numConstants = @{$dataNode->constants};
     my $numAttributes = @{$dataNode->attributes};
     my $numFunctions = @{$dataNode->functions};
-    my $numConstants = @{$dataNode->constants};
-    
+
     push(@headerContent, "\nnamespace WebCore {\n\n");
     
     # Implementation class forward declaration
@@ -696,7 +723,7 @@ sub GenerateImplementation
         push(@implContent, "        return true;\n");
         push(@implContent, "    }\n");
     }    
-       
+    
     if ($dataNode->extendedAttributes->{"HasNameGetter"}) {
         &$hasNameGetterGeneration();
     }
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
new file mode 100644 (file)
index 0000000..9a5e85f
--- /dev/null
@@ -0,0 +1,947 @@
+# 
+# KDOM IDL parser
+#
+# Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org>
+# Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 
+# Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+# Copyright (C) 2006 Apple Computer, Inc.
+#
+# This file is part of the KDE project
+# 
+# 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
+# aint 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.
+#
+
+package CodeGeneratorObjC;
+
+use File::stat;
+
+my $module = "";
+my $outputDir = "";
+my %implIncludes = ();
+my %headerForwardDeclarations = ();
+my %headerForwardDeclarationsForProtocols = ();
+
+my $exceptionInit = "WebCore::ExceptionCode ec = 0;";
+my $exceptionRaiseOnError = "raiseOnDOMError(ec);";
+
+
+# Default Licence Templates
+my $headerLicenceTemplate = << "EOF";
+/*
+ * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig\@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+EOF
+
+my $implementationLicenceTemplate = << "EOF";
+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.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;
+    $outputDir = shift;
+
+    bless($reference, $object);
+    return $reference;
+}
+
+sub finish
+{
+    my $object = shift;
+
+    # Commit changes!
+    $object->WriteData();
+}
+
+# Params: 'domClass' struct
+sub GenerateInterface
+{
+    my $object = shift;
+    my $dataNode = shift;
+
+    $object->RemoveExcludedAttributesAndFunctions($dataNode);
+
+    # Start actual generation..
+    $object->GenerateHeader($dataNode);
+    $object->GenerateImplementation($dataNode);
+
+    my $name = $dataNode->name;
+
+    # Open files for writing...
+    my $headerFileName = "$outputDir/DOM$name.h";
+    my $implFileName = "$outputDir/DOM$name.mm";
+
+    open($IMPL, ">$implFileName") or die "Couldn't open file $implFileName";
+    open($HEADER, ">$headerFileName") or die "Couldn't open file $headerFileName";
+}
+
+# Params: 'idlDocument' struct
+sub GenerateModule
+{
+    my $object = shift;
+    my $dataNode = shift;  
+    
+    $module = $dataNode->module;    
+}
+
+sub RemoveExcludedAttributesAndFunctions
+{
+    my $object = shift;
+    my $dataNode = shift;
+
+    my $i = 0;
+
+    while ($i < @{$dataNode->attributes}) {
+        my $lang = ${$dataNode->attributes}[$i]->signature->extendedAttributes->{"Exclude"};
+        if ($lang and $lang eq "ObjC") {
+            splice(@{$dataNode->attributes}, $i, 1);
+        } else {
+            $i++;
+        }
+    }
+
+    $i = 0;
+    while ($i < @{$dataNode->functions}) {
+        my $lang = ${$dataNode->functions}[$i]->signature->extendedAttributes->{"Exclude"};
+        if ($lang and $lang eq "ObjC") {
+            splice(@{$dataNode->functions}, $i, 1);
+        } else {
+            $i++;
+        }
+    }
+}
+
+sub GetClassName
+{
+    my $name = $codeGenerator->StripModule(shift);
+    
+    # special cases
+    if ($name eq "boolean") {
+        return "BOOL";
+    } elsif ($name eq "unsigned long") {
+        return "unsigned";
+    } elsif ($name eq "long") {
+        return "int";
+    } elsif ($name eq "DOMString") {
+        return "NSString";
+    } elsif ($name eq "DOMWindow") {
+        return "DOMAbstractView";
+    } elsif ($name eq "XPathNSResolver") {
+        return "id <DOMXPathNSResolver>";
+    } elsif ($name eq "unsigned short" 
+             or $name eq "float"
+             or $name eq "void"
+             or $name eq "DOMImplementation") {
+        return $name;
+    }
+
+    # Default, assume objective-c type has the same type name as
+    # idl type prefixed with "DOM".
+    return "DOM" . $name;
+}
+
+sub GetImplClassName
+{
+    my $name = $codeGenerator->StripModule(shift);
+    
+    # special cases
+    if ($name eq "DOMImplementation") {
+        return "WebCore::DOMImplementationFront";
+    }
+
+    return "WebCore::" . $name;
+}
+
+sub GetParentImplClassName
+{
+    my $dataNode = shift;
+
+    if (@{$dataNode->parents} eq 0) {
+        return "Object";
+    }
+
+    my $parent = $codeGenerator->StripModule($dataNode->parents(0));
+    
+    # special cases
+    if ($parent eq "EventTargetNode") {
+        $parent = "Node";
+    }
+
+    return $parent;
+}
+
+sub GetObjCType
+{
+    my $name = GetClassName(shift);
+
+    if ($codeGenerator->IsPrimitiveType($name)
+            or $name eq "BOOL"
+            or $name eq "unsigned"
+            or $name eq "int"
+            or $name eq "id <DOMXPathNSResolver>") {
+        return $name;
+    }
+
+    # Default, return type as a pointer.
+    return "$name *";
+}
+
+sub GetObjCTypeMaker
+{
+    my $type = $codeGenerator->StripModule(shift);
+
+    if ($codeGenerator->IsPrimitiveType($type) or $type eq "DOMString") {
+        return "";
+    }
+
+    if ($type eq "DOMRGBColor") {
+        return "_RGBColorWithRGB";
+    }
+
+    my $typeMaker = "";
+
+    if ($type eq "HTMLCollection") {
+        $typeMaker = "collection";
+    } elsif ($type eq "HTMLFormElement") {
+        $typeMaker = "formElement";
+    } elsif ($type eq "HTMLDocument") {
+        $typeMaker = "HTMLDocument";
+    } elsif ($type eq "CSSStyleDeclaration") {
+        $typeMaker = "styleDeclaration";
+    } elsif ($type eq "CSSStyleSheet") {
+        $typeMaker = "CSSStyleSheet";
+    } elsif ($type eq "DOMImplementation") {
+        $typeMaker = "DOMImplementation";
+    } elsif ($type eq "CDATASection") {
+        $typeMaker = "CDATASection";
+    } elsif ($type eq "DOMWindow") {
+        $typeMaker = "abstractView";
+    } elsif ($type eq "XPathResult") {
+        $typeMaker = "xpathResult";
+    } elsif ($type eq "XPathNSResolver") {
+        $typeMaker = "xpathNSResolver";
+    } elsif ($type eq "XPathExpression") {
+        $typeMaker = "xpathExpression";
+    } else {
+        $typeMaker = lcfirst($type);
+    }
+
+    # put into the form "_fooBarWith" for type FooBar.
+    $typeMaker = "_" . $typeMaker . "With";
+    return $typeMaker;
+}
+
+sub AddForwardDeclarationsForType
+{
+    my $type = $codeGenerator->StripModule(shift);
+    
+    if ($codeGenerator->IsPrimitiveType($type) or $type eq "DOMString") {
+        return;
+    }
+    
+    if ($type eq "DOMImplementation") {
+        $headerForwardDeclarations{"$type"} = 1;
+        return;
+    }
+
+    if ($type eq "DOMWindow") {
+        $headerForwardDeclarations{"DOMAbstractView"} = 1;
+        return;
+    }
+
+    if ($type eq "XPathNSResolver") {
+        # Only one protocol so far.
+        $headerForwardDeclarationsForProtocols{"DOMXPathNSResolver"} = 1;
+        return;
+    }
+
+    $headerForwardDeclarations{"DOM$type"} = 1;
+}
+
+sub AddIncludesForType
+{
+    my $type = $codeGenerator->StripModule(shift);
+    
+    if ($codeGenerator->IsPrimitiveType($type)) {
+        return;
+    }
+
+    if ($type eq "DOMString") {
+        $implIncludes{"PlatformString.h"} = 1;
+        return;
+    }
+
+    # Temp DOMCSS.h
+    if ($type eq "Counter"
+            or $type eq "MediaList"
+            or $type eq "CSSStyleSheet") {
+        $implIncludes{"DOMCSS.h"} = 1;
+        $implIncludes{"$type.h"} = 1;
+        return;
+    }
+    if ($type eq "CSSStyleDeclaration") {
+        $implIncludes{"DOMCSS.h"} = 1;
+        $implIncludes{"$type.h"} = 1;
+        $implIncludes{"CSSMutableStyleDeclaration.h"} = 1;
+        return;
+    }
+    if ($type eq "RGBColor" or $type eq "Rect") {
+        $implIncludes{"DOMCSS.h"} = 1;
+        return;
+    }
+
+    # Temp DOMHTML.h
+    if ($type eq "HTMLDocument") {
+        $implIncludes{"DOMHTML.h"} = 1;
+        $implIncludes{"DOMHTMLInternal.h"} = 1;
+        $implIncludes{"$type.h"} = 1;
+        return;
+    }
+
+    # Temp DOMEvents.h
+    if ($type eq "Event") {
+        $implIncludes{"DOMEvents.h"} = 1;
+        $implIncludes{"DOMEventsInternal.h"} = 1;
+        $implIncludes{"$type.h"} = 1;
+        return;
+    }
+
+    # Temp DOMStyleSheets.h
+    if ($type eq "StyleSheetList") {
+        $implIncludes{"DOMStyleSheets.h"} = 1;
+        $implIncludes{"$type.h"} = 1;
+        return;
+    }
+    
+    # Temp DOMViews.h
+    if ($type eq "DOMWindow") {
+        $implIncludes{"DOMViews.h"} = 1;
+        $implIncludes{"DOMViewsInternal.h"} = 1;
+        $implIncludes{"$type.h"} = 1;
+        return;
+    }
+    
+    # Temp DOMXPath.h
+    if ($type eq "XPathExpression"
+            or $type eq "XPathNSResolver"
+            or $type eq "XPathResult") {
+        $implIncludes{"DOMXPath.h"} = 1;
+        $implIncludes{"DOMXPathInternal.h"} = 1;
+        $implIncludes{"$type.h"} = 1;
+        return;
+    }
+
+    # Temp DOMImplementationFront.h
+    if ($type eq "DOMImplementation") {
+        $implIncludes{"DOMImplementationFront.h"} = 1;
+    }
+
+    # Default, include the same named file (the implementation) and the same name prefixed with "DOM". 
+    $implIncludes{"$type.h"} = 1;
+    $implIncludes{"DOM$type.h"} = 1;
+}
+
+sub GenerateHeader
+{
+    my $object = shift;
+    my $dataNode = shift;
+
+    # Make sure that we don't have more than one parent.
+    if (@{$dataNode->parents} > 1) {
+        die "A class can't have more than one parent.";
+    }
+
+    my $interfaceName = $dataNode->name;
+    my $className = GetClassName($interfaceName);
+    my $parentClassName = "DOM" . GetParentImplClassName($dataNode);
+
+    my $numConstants = @{$dataNode->constants};
+    my $numAttributes = @{$dataNode->attributes};
+    my $numFunctions = @{$dataNode->functions};
+
+    # - Add default header template
+    @headerContentHeader = split("\r", $headerLicenceTemplate);
+
+    # - INCLUDES -
+    push(@headerContentHeader, "\n#import \"$parentClassName.h\" // parent class\n\n");
+
+    # - Add constants.
+    if ($numConstants > 0) {
+        my @headerConstants = ();
+        foreach my $constant (@{$dataNode->constants}) {
+
+            my $constantName = $constant->name;
+            my $constantValue = $constant->value;
+            my $output = "    DOM_" . $constantName . " = " . $constantValue;
+            
+            push(@headerConstants, $output);
+        }
+        my $combinedConstants = join(",\n", @headerConstants);
+
+        # FIXME: the formatting of the enums should line up the equal signs.
+        push(@headerContent, "\n// Constants\n");
+        push(@headerContent, "enum {\n");
+        push(@headerContent, $combinedConstants);
+        push(@headerContent, "\n};\n");        
+    }
+    
+    my %hashOfCatagories = ();
+    
+    # - Begin @interface 
+    push(@headerContent, "\n\@interface $className : $parentClassName\n");
+
+    # - Add attribute getters/setters.
+    if ($numAttributes > 0) {
+        my @headerAttributes = ();
+
+        foreach (@{$dataNode->attributes}) {
+            my $attribute = $_;
+            
+            AddForwardDeclarationsForType($attribute->signature->type);
+
+            my $attributeName = $attribute->signature->name;
+            my $attributeType = GetObjCType($attribute->signature->type);
+            my $attributeIsReadonly = ($attribute->type =~ /^readonly/);
+            my $catagory = $attribute->signature->extendedAttributes->{"ObjCCatagory"};
+
+            # - GETTER
+            my $getter = "- (" . $attributeType . ")" . $attributeName . ";\n";
+            
+            if ($catagory) {
+                push(@{ $hashOfCatagories{$catagory} }, $getter);
+            } else {
+                push(@headerAttributes, $getter);
+            }
+
+            
+            # - SETTER
+            if (!$attributeIsReadonly) {
+                my $setter = "- (void)set" . ucfirst($attributeName) . ":(" . $attributeType . ")" . $attributeName . ";\n";
+                
+                if ($catagory) {
+                    push(@{ $hashOfCatagories{$catagory} }, $setter);
+                } else {
+                    push(@headerAttributes, $setter);
+                }
+            }
+        }
+
+        if (@headerAttributes > 0) {
+            push(@headerContent, "\n// Attributes\n");
+            push(@headerContent, @headerAttributes);
+        }
+    }
+
+    # - Add functions.
+    if ($numFunctions > 0) {
+        my @headerFunctions = ();
+
+        foreach (@{$dataNode->functions}) {
+            my $function = $_;
+
+            AddForwardDeclarationsForType($function->signature->type);
+
+            my $functionName = $function->signature->name;
+            my $returnType = GetObjCType($function->signature->type);
+            my $numberOfParameters = @{$function->parameters};
+            my $catagory = $function->signature->extendedAttributes->{"ObjCCatagory"};
+
+            my $output = "- ($returnType)$functionName";
+            foreach my $param (@{$function->parameters}) {
+                my $paramName = $param->name;
+                my $paramType = GetObjCType($param->type);
+                AddForwardDeclarationsForType($param->type);
+
+                $output .= ":($paramType)$paramName ";
+            }
+            # remove any trailing spaces.
+            $output =~ s/\s+$//;
+            $output .= ";\n";
+    
+            if ($catagory) {
+                push(@{ $hashOfCatagories{$catagory} }, $output);
+            } else {
+                push(@headerFunctions, $output);
+            }
+        }
+
+        if (@headerFunctions > 0) {
+            push(@headerContent, "\n// Methods\n");
+            push(@headerContent, @headerFunctions);
+        }
+    }
+
+    # - End @interface 
+    push(@headerContent, "\n\@end\n");
+    
+    # Add additional Catagories (if any)
+    if (scalar(keys(%hashOfCatagories))) {
+        
+        foreach(sort(keys(%hashOfCatagories))) {
+            my $catagory = $_;
+
+            # - Begin @interface 
+            push(@headerContent, "\n\@interface $className ($catagory)\n");
+            
+            foreach (@{ $hashOfCatagories{$catagory} }) {
+                my $declaration = $_;
+                push(@headerContent, $declaration);
+            }
+            
+            # - End @interface
+            push(@headerContent, "\@end\n");
+        }
+    }
+}
+
+sub GenerateImplementation
+{
+    my $object = shift;
+    my $dataNode = shift;
+
+    my $interfaceName = $dataNode->name;
+    my $className = GetClassName($interfaceName);
+    my $implClassName = GetImplClassName($interfaceName);
+    my $parentImplClassName = GetParentImplClassName($dataNode);
+
+
+    my $numAttributes = @{$dataNode->attributes};
+    my $numFunctions = @{$dataNode->functions};
+    my $hasFunctionsOrAttributes = $numAttributes + $numFunctions;
+
+    # - Add default header template.
+    @implContentHeader = split("\r", $implementationLicenceTemplate);
+
+    # - INCLUDES -
+    push(@implContentHeader, "\n#import \"config.h\"\n");
+    push(@implContentHeader, "#import \"$className.h\"\n\n");
+
+    if ($hasFunctionsOrAttributes) {
+        # NEEDED for DOM_CAST
+        push(@implContentHeader, "#import \"DOMInternal.h\" // needed for DOM_cast<>\n");
+        
+        # include module dependant internal interfaces.
+        if ($module eq "html") {
+            # HTML module internal interfaces
+            push(@implContentHeader, "#import \"DOMHTMLInternal.h\"\n");
+        } elsif ($module eq "css") {
+            # CSS module internal interfaces
+            push(@implContentHeader, "#import \"DOMCSSInternal.h\"\n");
+        } elsif ($module eq "events") {
+            # CSS module internal interfaces
+            push(@implContentHeader, "#import \"DOMEventsInternal.h\"\n");
+        } elsif ($module eq "xpath") {
+            # CSS module internal interfaces
+            push(@implContentHeader, "#import \"DOMXPathInternal.h\"\n");
+        }
+
+        # include Implementation class
+        push(@implContentHeader, "#import \"$interfaceName.h\" // implementation class\n");
+        if ($interfaceName eq "DOMImplementation") {
+            # FIXME: needed until we can remove DOMImplementationFront
+            push(@implContentHeader, "#import \"DOMImplementationFront.h\"\n");
+        }
+    }
+
+    @implContent = ();
+
+    # START implementation
+    push(@implContent, "\n\@implementation $className\n\n");
+    
+    # ADD INTERNAL CASTING METHOD
+    my $internalCastingName = "_" . lcfirst($interfaceName);
+    my $implementation = "[self $internalCastingName]";
+    
+    if ($hasFunctionsOrAttributes) {
+        if ($parentImplClassName eq "Object") {
+            # Only generate 'dealloc' and 'finalize' methods for direct subclasses of DOMObject.
+
+            push(@implContent, "- (void)dealloc\n");
+            push(@implContent, "{\n");
+            push(@implContent, "    if (_internal)\n");
+            push(@implContent, "        DOM_cast<$implClassName *>(_internal)->deref();\n");
+            push(@implContent, "    [super dealloc];\n");
+            push(@implContent, "}\n\n");
+
+            push(@implContent, "- (void)finalize\n");
+            push(@implContent, "{\n");
+            push(@implContent, "    if (_internal)\n");
+            push(@implContent, "        DOM_cast<$implClassName *>(_internal)->deref();\n");
+            push(@implContent, "    [super finalize];\n");
+            push(@implContent, "}\n\n");
+            
+            push(@implContent, "- ($implClassName *)$internalCastingName\n");
+            push(@implContent, "{\n");
+            push(@implContent, "    return DOM_cast<$implClassName *>(_internal);\n");
+            push(@implContent, "}\n\n");
+
+        } else {
+    
+            my $internalBaseType;
+            if ($interfaceName eq "CSSPrimitiveValue") {
+                # FIXME: this should be a regex matching CSS...Value.
+                $internalBaseType = "WebCore::CSSValue"
+            } elsif ($interfaceName eq "CSSImportRule" or $interfaceName eq "CSSFontFaceRule") {
+                # FIXME: this should be a regex matching CSS...Rule.
+                $internalBaseType = "WebCore::CSSRule"
+            } else {
+                $internalBaseType = "WebCore::Node"
+            }
+            push(@implContent, "- ($implClassName *)$internalCastingName\n");
+            push(@implContent, "{\n");
+            push(@implContent, "    return static_cast<$implClassName *>(DOM_cast<$internalBaseType *>(_internal));\n");
+            push(@implContent, "}\n\n");
+        }
+    }
+
+    # - Attributes
+    if ($numAttributes > 0) {
+        foreach (@{$dataNode->attributes}) {
+            my $attribute = $_;
+
+            AddIncludesForType($attribute->signature->type);
+
+            my $attributeName = $attribute->signature->name;
+            my $attributeType = GetObjCType($attribute->signature->type);
+            my $attributeIsReadonly = ($attribute->type =~ /^readonly/);
+
+            # - GETTER
+            my $getterSig = "- ($attributeType)$attributeName\n";
+            
+            # Exception handling
+            my $hasGetterException = @{$attribute->getterExceptions};
+            if ($hasGetterException) {
+                die "We should not have any getter exceptions yet!";
+            }
+            
+            my $getterContentHead = "$implementation->$attributeName(";
+            my $getterContentTail = ")";
+
+            my $attributeTypeSansPtr = $attributeType;
+            $attributeTypeSansPtr =~ s/ \*$//; # Remove trailing " *" from pointer types.
+            my $typeMaker = GetObjCTypeMaker($attribute->signature->type);
+            if ($attributeTypeSansPtr eq "DOMImplementation") {
+                # FIXME: We have to special case DOMImplementation until DOMImplementationFront is removed
+                $getterContentHead = "[$attributeTypeSansPtr $typeMaker:implementationFront($implementation";
+                $getterContentTail .= "]";
+            } elsif ($typeMaker ne "") {
+                # Surround getter with TypeMaker
+                $getterContentHead = "[$attributeTypeSansPtr $typeMaker:" . $getterContentHead;
+                $getterContentTail .= "]";
+            }
+            
+            if ($attribute->signature->extendedAttributes->{"UsesPassRefPtr"}) {
+                $getterContentTail = ").get(" . $functionContentTail;
+            }
+            
+            my $getterContent;
+            if ($hasGetterException) {
+                $getterContent = $getterContentHead . "ec" . $getterContentTail;
+            } else {
+                $getterContent = $getterContentHead . $getterContentTail;
+            }
+            
+            push(@implContent, $getterSig);
+            push(@implContent, "{\n");
+            push(@implContent, "    $exceptionInit\n") if $hasGetterException;
+            push(@implContent, "    return $getterContent;\n");
+            push(@implContent, "    $exceptionRaiseOnError\n") if $hasGetterException;
+            push(@implContent, "}\n\n");
+
+            # - SETTER
+            if (!$attributeIsReadonly) {
+            
+                # Exception handling
+                my $hasSetterException = @{$attribute->setterExceptions};
+                
+                my $setterName = "set" . ucfirst($attributeName);
+                my $setterSig = "- (void)$setterName:($attributeType)$attributeName\n";
+                
+                push(@implContent, $setterSig);
+                push(@implContent, "{\n");
+                
+                if ($hasSetterException) {
+                    # FIXME: asserts exsist in the exsisting bindings, but I am unsure why they are 
+                    # there in the first place;
+                    push(@implContent, "    ASSERT($attributeName);\n\n");
+                
+                    push(@implContent, "    $exceptionInit\n");
+                    push(@implContent, "    $implementation->$setterName($attributeName, ec);\n");
+                    push(@implContent, "    $exceptionRaiseOnError\n");
+                } else {
+                    push(@implContent, "    $implementation->$setterName($attributeName);\n");
+                }
+                
+                push(@implContent, "}\n\n");
+            }
+        }
+    }
+
+    # - Functions
+    if ($numFunctions > 0) {
+        foreach (@{$dataNode->functions}) {
+            my $function = $_;
+
+            AddIncludesForType($function->signature->type);
+
+            my $functionName = $function->signature->name;
+            my $returnType = GetObjCType($function->signature->type);
+            my $hasParameters = @{$function->parameters};
+            my $raisesExceptions = @{$function->raisesExceptions};
+
+            my @parameterNames = ();
+            my @needsAssert = ();
+            my %custom = ();
+
+            my $functionSig = "- ($returnType)$functionName";
+            foreach (@{$function->parameters}) {
+                my $param = $_;
+
+                my $paramType = GetObjCType($param->type);
+                AddIncludesForType($param->type);
+
+                my $paramName = $param->name;
+
+                # FIXME: should move this out into it's own fuction to take care of possible special cases.
+                my $idlType = $codeGenerator->StripModule($param->type);
+                if ($codeGenerator->IsPrimitiveType($idlType) or $idlType eq "DOMString") {
+                    push(@parameterNames, $paramName);
+                } elsif ($idlType eq "XPathNSResolver") {
+                    my $implGetter = "[nativeResolver _xpathNSResolver]";
+                    push(@parameterNames, $implGetter);
+                    $needsCustom{"XPathNSResolver"} = $paramName;
+                } elsif ($idlType eq "XPathResult") {
+                    my $implGetter = "[" . $paramName . " _xpathResult]";
+                    push(@parameterNames, $implGetter);
+                } else {
+                    my $implGetter = "[" . $paramName . " _" . lcfirst($idlType) . "]";
+                    push(@parameterNames, $implGetter);
+                }
+
+                if (!$param->extendedAttributes->{"IsIndex"}) {
+                    push(@needsAssert, "    ASSERT($paramName);\n");
+                }
+
+                $functionSig .= ":($paramType)$paramName ";
+            }
+            # remove any trailing spaces.
+            $functionSig =~ s/\s+$//;
+
+            my @functionContent = ();
+
+            if ($returnType eq "void") {
+                # Special case 'void' return type.
+
+                my $functionContentHead = "$implementation->$functionName(";
+                my $functionContentTail = ");";
+                my $content = "";
+
+                if ($hasParameters) {
+                    my $params = join(", ", @parameterNames);
+                    if ($raisesExceptions) {
+                        $content = $functionContentHead . $params . ", ec" . $functionContentTail;
+                    } else {
+                        $content = $functionContentHead . $params . $functionContentTail;
+                    }
+                } else {
+                    if ($raisesExceptions) {
+                        $content = $functionContentHead . "ec" . $functionContentTail;
+                    } else {
+                        $content = $functionContentHead . $functionContentTail;
+                    }
+                }
+                
+                if ($raisesExceptions) {
+                    push(@functionContent, "    $exceptionInit\n");
+                    push(@functionContent, "    $content\n");
+                    push(@functionContent, "    $exceptionRaiseOnError\n");
+                } else {
+                    push(@functionContent, "    $content\n");
+                }
+
+            } else {
+                
+                my $functionContentHead = $implementation . "->" . $functionName . "(";
+                my $functionContentTail = ")";
+
+                my $typeMaker = GetObjCTypeMaker($function->signature->type);
+                unless ($typeMaker eq "") {
+                    my $returnTypeClass = "";
+                    if ($function->signature->type eq "XPathNSResolver") {
+                        # Special case XPathNSResolver
+                        $returnTypeClass = "DOMNativeXPathNSResolver";
+                    } else {
+                        # Remove trailing " *" from pointer types.
+                        $returnTypeClass = $returnType;
+                        $returnTypeClass =~ s/ \*$//;
+                    }
+
+                    # Surround getter with TypeMaker
+                    $functionContentHead = "[$returnTypeClass $typeMaker:" . $functionContentHead;
+                    $functionContentTail .= "]";
+                }
+
+                if ($function->signature->extendedAttributes->{"UsesPassRefPtr"}) {
+                    $functionContentTail = ").get(" . $functionContentTail;
+                }
+
+                my $content = "";
+
+                if ($hasParameters) {
+                    my $params = join(", " , @parameterNames);
+                    if ($raisesExceptions) {
+                        # A temparary variable is needed.
+                        $content = $functionContentHead . $params . ", ec" . $functionContentTail;
+                    } else {
+                        $content = $functionContentHead . $params . $functionContentTail;
+                    }
+                } else {
+                    if ($raisesExceptions) {
+                        # A temparary variable is needed.
+                        $content = $functionContentHead . "ec" . $functionContentTail;
+                    } else {
+                        $content = $functionContentHead . $functionContentTail;
+                    }
+                }
+                
+                
+                if ($raisesExceptions) {
+                    # Differentiated between when the return type is a pointer and
+                    # not for white space issue (ie. Foo *result vs. int result).
+                    if ($returnType =~ /\*$/) {
+                        $content = $returnType . "result = " . $content;
+                    } else {
+                        $content = $returnType . " result = " . $content;
+                    }
+                    
+                    push(@functionContent, "    $exceptionInit\n");
+                    push(@functionContent, "    $content;\n");
+                    push(@functionContent, "    $exceptionRaiseOnError\n");
+                    push(@functionContent, "    return result;\n");
+                } else {
+                    push(@functionContent, "    return $content;\n");
+                }
+            }
+
+            push(@implContent, "$functionSig\n");
+            push(@implContent, "{\n");
+            
+            # special case the XPathNSResolver
+            if (defined $needsCustom{"XPathNSResolver"}) {
+                my $paramName = $needsCustom{"XPathNSResolver"};
+                push(@implContent, "    if ($paramName && ![$paramName isMemberOfClass:[DOMNativeXPathNSResolver class]])\n");
+                push(@implContent, "        [NSException raise:NSGenericException format:\@\"createExpression currently does not work with custom NS resolvers\"];\n");
+                push(@implContent, "    DOMNativeXPathNSResolver *nativeResolver = (DOMNativeXPathNSResolver *)$paramName;\n\n");
+            }
+            push(@implContent, @functionContent);
+            push(@implContent, "}\n\n");
+            
+            # Clear the hash
+            %needsCustom = ();
+        }
+    }
+
+    # END implementation
+    push(@implContent, "\@end\n");
+}
+
+# Internal helper
+sub WriteData
+{
+    if (defined($IMPL)) {
+        # Write content to file.
+        print $IMPL @implContentHeader;
+        
+        foreach my $implInclude (sort keys(%implIncludes)) {
+            print $IMPL "#import \"$implInclude\"\n";
+        }
+        
+        print $IMPL @implContent;
+        close($IMPL);
+        undef($IMPL);
+        
+        @implHeaderContent = "";
+        @implContent = "";    
+        %implIncludes = ();
+    }
+        
+    if (defined($HEADER)) {
+        # Write content to file.
+        print $HEADER @headerContentHeader;
+        
+        foreach my $forwardClassDeclaration (sort keys(%headerForwardDeclarations)) {
+            print $HEADER "\@class $forwardClassDeclaration;\n";
+        }
+        
+        foreach my $forwardProtocolDeclaration (sort keys(%headerForwardDeclarationsForProtocols)) {
+            print $HEADER "\@protocol $forwardProtocolDeclaration;\n";
+        }
+
+        print $HEADER @headerContent;
+        close($HEADER);
+        undef($HEADER);
+        
+        @headerContentHeader = "";
+        @headerContent = "";
+        %headerForwardDeclarations = ();
+    }
+}
+
+1;
index cfece6c0875a2b78f76646fe78cdba8a6c3d50fd..736fb3e9bdd3c4023053e57f6ad48ca605c087fb 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -34,7 +35,7 @@ module core {
         
         // extensions
 
-        readonly attribute CSSStyleDeclaration style;
+        readonly attribute [ObjCCatagory=DOMAttrExtensions] CSSStyleDeclaration style;
     };
 
 }
diff --git a/WebCore/dom/CDATASection.idl b/WebCore/dom/CDATASection.idl
new file mode 100644 (file)
index 0000000..b44c5bb
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * 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.
+ */
+
+module core {
+
+    interface CDATASection : Text {
+    };
+
+}
diff --git a/WebCore/dom/Comment.idl b/WebCore/dom/Comment.idl
new file mode 100644 (file)
index 0000000..40f1339
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * 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.
+ */
+
+module core {
+
+    interface Comment : CharacterData {
+    };
+
+}
index a58cfa12a2ecf0b07bf4264bb8558705b59216ff..1dbcad05072e1b210ddee6fe6003b1efd5b1036c 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -28,24 +29,24 @@ module core {
 
         // DOM Level 2
 
-        DocumentType createDocumentType(in DOMString qualifiedName,
-                                        in DOMString publicId,
-                                        in DOMString systemId)
+        [UsesPassRefPtr] DocumentType createDocumentType(in DOMString qualifiedName,
+                                                         in DOMString publicId,
+                                                         in DOMString systemId)
             raises(DOMException);
-        Document createDocument(in [ConvertNullToNullString] DOMString namespaceURI, 
-                                in [ConvertNullToNullString] DOMString qualifiedName, 
-                                in [ConvertNullToNullString] DocumentType doctype)
+        [UsesPassRefPtr] Document createDocument(in [ConvertNullToNullString] DOMString namespaceURI, 
+                                                 in [ConvertNullToNullString] DOMString qualifiedName, 
+                                                 in [ConvertNullToNullString] DocumentType doctype)
             raises(DOMException);
 
         // DOMImplementationCSS interface from DOM Level 2 CSS
 
-        CSSStyleSheet createCSSStyleSheet(in DOMString title,
-                                          in DOMString media)
+        [ObjCCatagory=DOMImplementationCSS, UsesPassRefPtr] CSSStyleSheet createCSSStyleSheet(in DOMString title,
+                                                                                              in DOMString media)
             raises(DOMException);
 
         // HTMLDOMImplementation interface from DOM Level 2 HTML
 
-        HTMLDocument createHTMLDocument(in DOMString title);
+        [ObjCCatagory=DOMImplementationExtensions, UsesPassRefPtr] HTMLDocument createHTMLDocument(in DOMString title);
     };
 
 }
index e13791f8a50f37e81cd9e9133506f6c95fb591c5..67ca43c36ccb01109750da4309258db24af8f9dc 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,144 +30,145 @@ module core {
         
         readonly attribute Element documentElement;
         
-        Element createElement(in DOMString tagName)
+        [UsesPassRefPtr] Element createElement(in DOMString tagName)
             raises (DOMException);
         
-        DocumentFragment createDocumentFragment();
+        [UsesPassRefPtr] DocumentFragment createDocumentFragment();
         
-        Text createTextNode(in DOMString data);
+        [UsesPassRefPtr] Text createTextNode(in DOMString data);
         
-        Comment createComment(in DOMString data);
+        [UsesPassRefPtr] Comment createComment(in DOMString data);
         
-        CDATASection createCDATASection(in DOMString data)
+        [UsesPassRefPtr] CDATASection createCDATASection(in DOMString data)
             raises(DOMException);
         
-        ProcessingInstruction createProcessingInstruction(in DOMString target, 
-                                                          in DOMString data)
+        [UsesPassRefPtr] ProcessingInstruction createProcessingInstruction(in DOMString target, 
+                                                                           in DOMString data)
             raises (DOMException);
         
-        Attr createAttribute(in DOMString name)
+        [UsesPassRefPtr] Attr createAttribute(in DOMString name)
             raises (DOMException);
         
-        EntityReference createEntityReference(in DOMString name)
+        [UsesPassRefPtr] EntityReference createEntityReference(in DOMString name)
             raises(DOMException);
         
-        NodeList getElementsByTagName(in DOMString tagname);
+        [UsesPassRefPtr] NodeList getElementsByTagName(in DOMString tagname);
         
         // DOM Level 2 Core
         
-        Node importNode(in Node importedNode,
-                        in boolean deep)
+        [UsesPassRefPtr] Node importNode(in Node importedNode,
+                                         in boolean deep)
             raises (DOMException);
         
-        Element createElementNS(in DOMString namespaceURI,
-                                in DOMString qualifiedName)
+        [UsesPassRefPtr] Element createElementNS(in DOMString namespaceURI,
+                                                 in DOMString qualifiedName)
             raises (DOMException);
         
-        Attr createAttributeNS(in DOMString namespaceURI,
-                               in DOMString qualifiedName)
+        [UsesPassRefPtr] Attr createAttributeNS(in DOMString namespaceURI,
+                                                in DOMString qualifiedName)
             raises (DOMException);
         
-        NodeList getElementsByTagNameNS(in DOMString namespaceURI,
-                                        in DOMString localName);
+        [UsesPassRefPtr] NodeList getElementsByTagNameNS(in DOMString namespaceURI,
+                                                         in DOMString localName);
         
         Element getElementById(in DOMString elementId);
 
         // DOM Level 2 Events (DocumentEvents interface)
 
-        Event createEvent(in DOMString eventType)
+        [ObjCCatagory=DOMDocumentEvent, UsesPassRefPtr] Event createEvent(in DOMString eventType)
             raises(DOMException);
 
         // DOM Level 2 Tranversal and Range (DocumentRange interface)
 
-        Range createRange();
+        [ObjCCatagory=DOMDocumentRange, UsesPassRefPtr] Range createRange();
 
         // DOM Level 2 Tranversal and Range (DocumentTraversal interface)
 
-        NodeIterator createNodeIterator(in Node root, 
-                                        in unsigned long whatToShow,
-                                        in NodeFilter filter,
-                                        in boolean entityReferenceExpansion)
+        [Exclude=ObjC] NodeIterator createNodeIterator(in Node root, 
+                                                       in unsigned long whatToShow,
+                                                       in NodeFilter filter,
+                                                       in boolean entityReferenceExpansion)
             raises(DOMException);
 
-        TreeWalker createTreeWalker(in Node root, 
-                                    in unsigned long whatToShow, 
-                                    in NodeFilter filter, 
-                                    in boolean entityReferenceExpansion)
+        [Exclude=ObjC] TreeWalker createTreeWalker(in Node root, 
+                                                   in unsigned long whatToShow, 
+                                                   in NodeFilter filter, 
+                                                   in boolean entityReferenceExpansion)
             raises(DOMException);
 
         // DOM Level 2 Abstract Views (DocumentView interface)
 
-        readonly attribute DOMWindow defaultView;
+        readonly attribute [ObjCCatagory=DOMDocumentView] DOMWindow defaultView;
 
         // DOM Level 2 Style (DocumentStyle interface)
 
-        readonly attribute StyleSheetList styleSheets;
+        readonly attribute [ObjCCatagory=DOMDocumentStyle] StyleSheetList styleSheets;
 
         // DOM Level 2 Style (DocumentCSS interface)
 
-        CSSStyleDeclaration getOverrideStyle(in Element elt, 
-                                             in DOMString pseudoElt);
+        [ObjCCatagory=DOMDocumentCSS] CSSStyleDeclaration getOverrideStyle(in Element elt, 
+                                                                           in DOMString pseudoElt);
 
         // DOM Level 3 Core
 
-        readonly attribute [ConvertNullStringTo=Null] DOMString inputEncoding;
-        Node adoptNode(in Node source)
+        readonly attribute [ConvertNullStringTo=Null, Exclude=ObjC] DOMString inputEncoding;
+        
+        [UsesPassRefPtr] Node adoptNode(in Node source)
             raises (DOMException);
 
 #ifdef XPATH_SUPPORT
         // DOM Level 3 XPath (XPathEvaluator interface)
-        XPathExpression createExpression(in DOMString expression,
-                                         in XPathNSResolver resolver)
+        [ObjCCatagory=DOMDocumentXPath, UsesPassRefPtr] XPathExpression createExpression(in DOMString expression,
+                                                                                         in XPathNSResolver resolver)
             raises(DOMException);
 
-        XPathNSResolver createNSResolver(in Node nodeResolver);
+        [ObjCCatagory=DOMDocumentXPath, UsesPassRefPtr] XPathNSResolver createNSResolver(in Node nodeResolver);
         
-        XPathResult evaluate(in DOMString expression,
-                             in Node contextNode, 
-                             in XPathNSResolver resolver,
-                             in unsigned short type,
-                             in XPathResult inResult)
+        [ObjCCatagory=DOMDocumentXPath, UsesPassRefPtr] XPathResult evaluate(in DOMString expression,
+                                                                             in Node contextNode, 
+                                                                             in XPathNSResolver resolver,
+                                                                             in unsigned short type,
+                                                                             in XPathResult inResult)
             raises(DOMException);
 #endif
 
         // Common extensions
 
-        boolean execCommand(in DOMString command, 
-                            in boolean userInterface, 
-                            in DOMString value);
+        [Exclude=ObjC] boolean execCommand(in DOMString command, 
+                                           in boolean userInterface, 
+                                           in DOMString value);
 
-        boolean queryCommandEnabled(in DOMString command);
+        [Exclude=ObjC] boolean queryCommandEnabled(in DOMString command);
 
-        boolean queryCommandIndeterm(in DOMString command);
+        [Exclude=ObjC] boolean queryCommandIndeterm(in DOMString command);
 
-        boolean queryCommandState(in DOMString command);
+        [Exclude=ObjC] boolean queryCommandState(in DOMString command);
 
-        boolean queryCommandSupported(in DOMString command);
+        [Exclude=ObjC] boolean queryCommandSupported(in DOMString command);
 
-        [ConvertNullStringTo=False] DOMString queryCommandValue(in DOMString command);
+        [ConvertNullStringTo=False, Exclude=ObjC] DOMString queryCommandValue(in DOMString command);
 
         // IE extensions
 
-        readonly attribute DOMString URL;
+        readonly attribute [Exclude=ObjC] DOMString URL;
 
-        attribute [ConvertNullStringTo=Undefined] DOMString charset;
+        attribute [ConvertNullStringTo=Undefined, Exclude=ObjC] DOMString charset;
 
-        readonly attribute [ConvertNullStringTo=Undefined] DOMString defaultCharset;
+        readonly attribute [ConvertNullStringTo=Undefined, Exclude=ObjC] DOMString defaultCharset;
 
-        readonly attribute [ConvertNullStringTo=Undefined] DOMString readyState;
+        readonly attribute [ConvertNullStringTo=Undefined, Exclude=ObjC] DOMString readyState;
 
-        Element elementFromPoint(in long x, in long y);
+        [Exclude=ObjC] Element elementFromPoint(in long x, in long y);
 
         // Mozilla extensions
 
-        readonly attribute [ConvertNullStringTo=Null] DOMString characterSet;
+        readonly attribute [ConvertNullStringTo=Null, Exclude=ObjC] DOMString characterSet;
 
         // WebKit extensions
 
-        readonly attribute [ConvertNullStringTo=Null] DOMString preferredStylesheetSet;
+        readonly attribute [ConvertNullStringTo=Null, Exclude=ObjC] DOMString preferredStylesheetSet;
 
-        attribute [ConvertNullStringTo=Null] DOMString selectedStylesheetSet;
+        attribute [ConvertNullStringTo=Null, Exclude=ObjC] DOMString selectedStylesheetSet;
 
     };
 
index 789ccf7b7587e1f99fef3c992a49dff05a6e662f..586ac7b085a2686064b6bd5d15b9043d83f23ba7 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -34,15 +35,15 @@ module core {
         void removeAttribute(in DOMString name)
             raises(DOMException);
 
-        Attr getAttributeNode(in DOMString name);
+        [UsesPassRefPtr] Attr getAttributeNode(in DOMString name);
 
-        Attr setAttributeNode(in Attr newAttr)
+        [UsesPassRefPtr] Attr setAttributeNode(in Attr newAttr)
             raises(DOMException);
 
-        Attr removeAttributeNode(in Attr oldAttr)
+        [UsesPassRefPtr] Attr removeAttributeNode(in Attr oldAttr)
             raises(DOMException);
 
-        NodeList getElementsByTagName(in DOMString name);
+        [UsesPassRefPtr] NodeList getElementsByTagName(in DOMString name);
 
         // DOM Level 2 Core
 
@@ -58,13 +59,13 @@ module core {
                                in DOMString localName)
             raises(DOMException);
 
-        NodeList getElementsByTagNameNS(in [ConvertNullToNullString] DOMString namespaceURI,
-                                        in DOMString localName);
+        [UsesPassRefPtr] NodeList getElementsByTagNameNS(in [ConvertNullToNullString] DOMString namespaceURI,
+                                                         in DOMString localName);
 
-        Attr getAttributeNodeNS(in [ConvertNullToNullString] DOMString namespaceURI,
-                                in DOMString localName);
+        [UsesPassRefPtr] Attr getAttributeNodeNS(in [ConvertNullToNullString] DOMString namespaceURI,
+                                                 in DOMString localName);
 
-        Attr setAttributeNodeNS(in Attr newAttr)
+        [UsesPassRefPtr] Attr setAttributeNodeNS(in Attr newAttr)
             raises(DOMException);
 
         boolean hasAttribute(in DOMString name);
@@ -72,53 +73,53 @@ module core {
         boolean hasAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                in DOMString localName);
 
-        readonly attribute CSSStyleDeclaration style;
+        readonly attribute [ObjCCatagory=DOMElementCSSInlineStyle] CSSStyleDeclaration style;
 
         // Common extensions
 
-        readonly attribute long offsetLeft;
+        readonly attribute [ObjCCatagory=DOMElementExtensions] long offsetLeft;
 
-        readonly attribute long offsetTop;
+        readonly attribute [ObjCCatagory=DOMElementExtensions] long offsetTop;
 
-        readonly attribute long offsetWidth;
+        readonly attribute [ObjCCatagory=DOMElementExtensions] long offsetWidth;
 
-        readonly attribute long offsetHeight;
+        readonly attribute [ObjCCatagory=DOMElementExtensions] long offsetHeight;
 
-        readonly attribute Element offsetParent;
-        
-        readonly attribute long clientWidth;
+        readonly attribute [ObjCCatagory=DOMElementExtensions] Element offsetParent;
 
-        readonly attribute long clientHeight;
+        readonly attribute [ObjCCatagory=DOMElementExtensions] long clientWidth;
 
-        attribute long scrollLeft;
+        readonly attribute [ObjCCatagory=DOMElementExtensions] long clientHeight;
 
-        attribute long scrollTop;
+        attribute [ObjCCatagory=DOMElementExtensions] long scrollLeft;
 
-        readonly attribute long scrollWidth;
+        attribute [ObjCCatagory=DOMElementExtensions] long scrollTop;
 
-        readonly attribute long scrollHeight;
+        readonly attribute [ObjCCatagory=DOMElementExtensions] long scrollWidth;
+
+        readonly attribute [ObjCCatagory=DOMElementExtensions] long scrollHeight;
 
         void focus();
 
         void blur();
 
-        void scrollIntoView(in [Optional] boolean alignWithTop);
+        [ObjCCatagory=DOMElementExtensions] void scrollIntoView(in [Optional] boolean alignWithTop);
 
         // IE extensions
 
-        Node insertAdjacentElement(in DOMString position, 
-                                   in Node newElement)
+        [Exclude=ObjC] Node insertAdjacentElement(in DOMString position, 
+                                                  in Node newElement)
             raises(DOMException);
-        
-        boolean contains(in Element element);
+
+        [Exclude=ObjC] boolean contains(in Element element);
 
         // WebKit extensions
 
-        void scrollIntoViewIfNeeded(in [Optional] boolean centerIfNeeded);
+        [ObjCCatagory=DOMElementExtensions] void scrollIntoViewIfNeeded(in [Optional] boolean centerIfNeeded);
 
-        void scrollByLines(in long lines);
+        [Exclude=ObjC] void scrollByLines(in long lines);
 
-        void scrollByPages(in long pages);
+        [Exclude=ObjC] void scrollByPages(in long pages);
 
     };
 
diff --git a/WebCore/dom/EntityReference.idl b/WebCore/dom/EntityReference.idl
new file mode 100644 (file)
index 0000000..b259f72
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * 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.
+ */
+
+module core {
+
+    interface EntityReference : Node {
+    };
+
+}
diff --git a/WebCore/dom/NamedNodeMap.idl b/WebCore/dom/NamedNodeMap.idl
new file mode 100644 (file)
index 0000000..bf99ac3
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * 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.
+ */
+
+module core {
+
+    interface NamedNodeMap {
+
+        [UsesPassRefPtr] Node getNamedItem(in DOMString name);
+
+        [UsesPassRefPtr] Node setNamedItem(in Node arg)
+            raises(DOMException);
+
+        [UsesPassRefPtr] Node removeNamedItem(in DOMString name)
+            raises(DOMException);
+
+        [UsesPassRefPtr] Node item(in unsigned long index);
+        
+        readonly attribute unsigned long length;
+
+
+        // Introduced in DOM Level 2:
+
+        [UsesPassRefPtr] Node getNamedItemNS(in DOMString namespaceURI, 
+                                             in DOMString localName)
+            // FIXME: the implementation does take an exceptioncode parameter.
+            /*raises(DOMException)*/;
+
+        [UsesPassRefPtr] Node setNamedItemNS(in Node arg)
+            raises(DOMException);
+
+        [UsesPassRefPtr] Node removeNamedItemNS(in DOMString namespaceURI, 
+                                                in DOMString localName)
+            raises(DOMException);
+
+    };
+
+}
diff --git a/WebCore/dom/NodeList.idl b/WebCore/dom/NodeList.idl
new file mode 100644 (file)
index 0000000..b8dd9e7
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * 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.
+ */
+
+module core {
+
+    interface NodeList {
+
+        Node item(in [IsIndex] unsigned long index);
+
+        readonly attribute unsigned long length;
+
+    };
+
+}
index c97b0e2d84cfe1887a9af3e7664cc95522bfdb19..d66b5b0a571c9dac80fd0e98058aa689ff439b18 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,7 +30,7 @@ module core {
 
         // interface LinkStyle from DOM Level 2 Style Sheets
 
-        readonly attribute StyleSheet sheet;
+        readonly attribute [Exclude=ObjC] StyleSheet sheet;
 
     };
 
index 5ec0c56a8f44add68eaed538a5b48537670c5284..33a7bbdd6b40bad7ca95bfcd6b636f8a442b1555 100644 (file)
@@ -1,3 +1,15 @@
+2006-08-27  Sam Weinig  <sam.weinig@gmail.com>
+
+        Reviewed by Tim H.
+
+        - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=4624
+          WebCore needs autogenerated Obj-C DOM bindings
+
+          First round of auto-generated Objective C DOM bindings, starting
+          with the DOM Core.
+
+        * WebKit.xcodeproj/project.pbxproj:
+
 2006-08-25  Brady Eidson  <beidson@apple.com>
 
         Reviewed by Tim Hatcher
index 313bdc8d22772535a48596437d96c0c5a00a263c..967ee45ccd4d124cc7b4dfa71da5d512c4dbfb11 100644 (file)
                9C7CABBB0190A37C0ECA16EA /* WebView */ = {
                        isa = PBXGroup;
                        children = (
-                               658A40950A14853B005E6987 /* WebDataSourceInternal.h */,
-                               650F74E209E488F70020118A /* WebUnarchivingState.h */,
-                               650F74E309E488F70020118A /* WebUnarchivingState.m */,
-                               6550B7C5099EFAE90090D781 /* WebArchiver.h */,
-                               6550B7C6099EFAE90090D781 /* WebArchiver.m */,
                                F52CA6BD02DF9D0F018635CA /* HTML */,
                                51E94C0706C02CA300A9B09E /* PDF */,
                                8373435A0624EE0D00F3B289 /* WebArchive.h */,
                                8373435B0624EE0D00F3B289 /* WebArchive.m */,
+                               6550B7C5099EFAE90090D781 /* WebArchiver.h */,
+                               6550B7C6099EFAE90090D781 /* WebArchiver.m */,
                                933D659903413FF2008635CE /* WebClipView.h */,
                                933D659A03413FF2008635CE /* WebClipView.m */,
                                39446070020F50ED0ECA1767 /* WebDataSource.h */,
                                39446071020F50ED0ECA1767 /* WebDataSource.m */,
+                               658A40950A14853B005E6987 /* WebDataSourceInternal.h */,
                                39446072020F50ED0ECA1767 /* WebDataSourcePrivate.h */,
                                35081DAE02B6D4F50ACA2ACA /* WebDocument.h */,
                                ED21B9810528F7AA003299AC /* WebDocumentInternal.h */,
                                7E6FEF0708985A7200C44C3F /* WebScriptDebugDelegatePrivate.h */,
                                515E27CC0458C86500CA2D3A /* WebUIDelegate.h */,
                                65A7D44A0568AB2600E70EF6 /* WebUIDelegatePrivate.h */,
+                               650F74E209E488F70020118A /* WebUnarchivingState.h */,
+                               650F74E309E488F70020118A /* WebUnarchivingState.m */,
                                51A8B579042834F700CA2D3A /* WebView.h */,
                                51A8B57A042834F700CA2D3A /* WebView.m */,
                                930D02BB06275F640076701E /* WebViewInternal.h */,
                        buildPhases = (
                                93AF528708254B33005D0156 /* DOM.h */,
                                93AF52A708254D8B005D0156 /* DOMCore.h */,
+                               8526D74D0A8FEF02009234B1 /* DOMAttr.h */,
+                               85311F690A8F9091005125C9 /* DOMCDATASection.h */,
+                               8526D6BF0A8FE60B009234B1 /* DOMCharacterData.h */,
+                               85311F720A8F90F6005125C9 /* DOMComment.h */,
+                               856C89DE0A90E383005C687B /* DOMDocument.h */,
+                               85C9066F0A8FD11C00C37D91 /* DOMDocumentFragment.h */,
+                               85C905F30A8FCCB200C37D91 /* DOMDocumentType.h */,
+                               8539B5650A903EB900366C2D /* DOMDOMImplementation.h */,
+                               85A5C5E10A9032B300F91F2C /* DOMElement.h */,
+                               85311F750A8F9168005125C9 /* DOMEntity.h */,
+                               85311F880A8F91FE005125C9 /* DOMEntityReference.h */,
+                               8526D7EA0A8FF64C009234B1 /* DOMNamedNodeMap.h */,
+                               856C8A930A90F54F005C687B /* DOMNode.h */,
+                               85A85B590A902C3200A5CF3A /* DOMNodeList.h */,
+                               85311FE90A8F98B9005125C9 /* DOMNotation.h */,
+                               856C8B7B0A9129B8005C687B /* DOMObject.h */,
+                               853120130A8F9A52005125C9 /* DOMProcessingInstruction.h */,
+                               8526D6410A8FDB84009234B1 /* DOMText.h */,
                                93AF52A908254D8F005D0156 /* DOMCSS.h */,
                                93AF52A508254D87005D0156 /* DOMEvents.h */,
                                93AF52A308254D81005D0156 /* DOMExtensions.h */,
                        shellPath = /bin/sh;
                        shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMXPath.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMXPath.h\"";
                };
+               8526D6410A8FDB84009234B1 /* DOMText.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMText.h",
+                       );
+                       name = DOMText.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMText.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMText.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMText.h\"";
+               };
+               8526D6BF0A8FE60B009234B1 /* DOMCharacterData.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMCharacterData.h",
+                       );
+                       name = DOMCharacterData.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMCharacterData.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMCharacterData.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMCharacterData.h\"";
+               };
+               8526D74D0A8FEF02009234B1 /* DOMAttr.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMAttr.h",
+                       );
+                       name = DOMAttr.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMAttr.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMAttr.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMAttr.h\"";
+               };
+               8526D7EA0A8FF64C009234B1 /* DOMNamedNodeMap.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMNamedNodeMap.h",
+                       );
+                       name = DOMNamedNodeMap.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMNamedNodeMap.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMNamedNodeMap.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMNamedNodeMap.h\"";
+               };
+               85311F690A8F9091005125C9 /* DOMCDATASection.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMCDATASection.h",
+                       );
+                       name = DOMCDATASection.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMCDATASection.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMCDATASection.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMCDATASection.h\"";
+               };
+               85311F720A8F90F6005125C9 /* DOMComment.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMComment.h",
+                       );
+                       name = DOMComment.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMComment.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMComment.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMComment.h\"";
+               };
+               85311F750A8F9168005125C9 /* DOMEntity.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMEntity.h",
+                       );
+                       name = DOMEntity.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMEntity.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMEntity.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMEntity.h\"";
+               };
+               85311F880A8F91FE005125C9 /* DOMEntityReference.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMEntityReference.h",
+                       );
+                       name = DOMEntityReference.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMEntityReference.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMEntityReference.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMEntityReference.h\"";
+               };
+               85311FE90A8F98B9005125C9 /* DOMNotation.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMNotation.h",
+                       );
+                       name = DOMNotation.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMNotation.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMNotation.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMNotation.h\"";
+               };
+               853120130A8F9A52005125C9 /* DOMProcessingInstruction.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMProcessingInstruction.h",
+                       );
+                       name = DOMProcessingInstruction.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMProcessingInstruction.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMProcessingInstruction.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMProcessingInstruction.h\"";
+               };
+               8539B5650A903EB900366C2D /* DOMDOMImplementation.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMDOMImplementation.h",
+                       );
+                       name = DOMDOMImplementation.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMDOMImplementation.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMDOMImplementation.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMDOMImplementation.h\"";
+               };
+               856C89DE0A90E383005C687B /* DOMDocument.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMDocument.h",
+                       );
+                       name = DOMDocument.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMDocument.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMDocument.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMDocument.h\"";
+               };
+               856C8A930A90F54F005C687B /* DOMNode.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMNode.h",
+                       );
+                       name = DOMNode.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMNode.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMNode.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMNode.h\"";
+               };
+               856C8B7B0A9129B8005C687B /* DOMObject.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMObject.h",
+                       );
+                       name = DOMObject.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMObject.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMObject.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMObject.h\"";
+               };
+               85A5C5E10A9032B300F91F2C /* DOMElement.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMElement.h",
+                       );
+                       name = DOMElement.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMElement.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMElement.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMElement.h\"";
+               };
+               85A85B590A902C3200A5CF3A /* DOMNodeList.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMNodeList.h",
+                       );
+                       name = DOMNodeList.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMNodeList.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMNodeList.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMNodeList.h\"";
+               };
+               85C905F30A8FCCB200C37D91 /* DOMDocumentType.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMDocumentType.h",
+                       );
+                       name = DOMDocumentType.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMDocumentType.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMDocumentType.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMDocumentType.h\"";
+               };
+               85C9066F0A8FD11C00C37D91 /* DOMDocumentFragment.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(WEBCORE_PRIVATE_HEADERS_DIR)/DOMDocumentFragment.h",
+                       );
+                       name = DOMDocumentFragment.h;
+                       outputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/DOMDocumentFragment.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -e s/WebCore/WebKit/ \"$WEBCORE_PRIVATE_HEADERS_DIR/DOMDocumentFragment.h\" > \"$TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/DOMDocumentFragment.h\"";
+               };
                9339323E0825A64200AADA6B /* npruntime.h */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;