Commit ac93628e authored by weinig's avatar weinig
Browse files

Reviewed by Tim H.

        Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=11082
        Simplify Internal methods for the auto-generated Objective-C DOM code

        - Auto-generate the internal methods for more Objective-C classes.

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOM.mm:
        * bindings/objc/DOMCSS.mm:
        (-[DOMStyleSheet WebCore::]):
        (+[DOMStyleSheet _styleSheetWith:WebCore::]):
        (-[DOMCSSRule WebCore::]):
        (-[DOMCSSRule _initWithCSSRule:WebCore::]):
        (+[DOMCSSRule _CSSRuleWith:WebCore::]):
        (-[DOMCSSValue WebCore::]):
        (-[DOMCSSValue _initWithCSSValue:WebCore::]):
        (+[DOMCSSValue _CSSValueWith:WebCore::]):
        * bindings/objc/DOMHTMLAppletElement.mm:
        (-[DOMHTMLAppletElement WebCore::]):
        (+[DOMHTMLAppletElement _HTMLOptionElementWith:WebCore::]):
        * bindings/objc/DOMHTMLEmbedElement.mm:
        (-[DOMHTMLEmbedElement WebCore::]):
        (+[DOMHTMLEmbedElement _HTMLEmbedElementWith:WebCore::]):
        * bindings/objc/DOMInternal.h:
        * bindings/objc/DOMInternal.mm:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * css/CSSCharsetRule.idl:
        * css/CSSFontFaceRule.idl:
        * css/CSSImportRule.idl:
        * css/CSSMediaRule.idl:
        * css/CSSPageRule.idl:
        * css/CSSPrimitiveValue.idl:
        * css/CSSStyleRule.idl:
        * css/CSSStyleSheet.idl:
        * css/CSSUnknownRule.idl:
        * css/CSSValueList.idl:
        * dom/KeyboardEvent.idl:
        * dom/MouseEvent.idl:
        * dom/MutationEvent.idl:
        * dom/NodeIterator.idl:
        * dom/OverflowEvent.idl:
        * dom/UIEvent.idl:
        * dom/WheelEvent.idl:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 43f6c9d0
2006-09-29 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Tim H.
Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=11082
Simplify Internal methods for the auto-generated Objective-C DOM code
- Auto-generate the internal methods for more Objective-C classes.
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOM.mm:
* bindings/objc/DOMCSS.mm:
(-[DOMStyleSheet WebCore::]):
(+[DOMStyleSheet _styleSheetWith:WebCore::]):
(-[DOMCSSRule WebCore::]):
(-[DOMCSSRule _initWithCSSRule:WebCore::]):
(+[DOMCSSRule _CSSRuleWith:WebCore::]):
(-[DOMCSSValue WebCore::]):
(-[DOMCSSValue _initWithCSSValue:WebCore::]):
(+[DOMCSSValue _CSSValueWith:WebCore::]):
* bindings/objc/DOMHTMLAppletElement.mm:
(-[DOMHTMLAppletElement WebCore::]):
(+[DOMHTMLAppletElement _HTMLOptionElementWith:WebCore::]):
* bindings/objc/DOMHTMLEmbedElement.mm:
(-[DOMHTMLEmbedElement WebCore::]):
(+[DOMHTMLEmbedElement _HTMLEmbedElementWith:WebCore::]):
* bindings/objc/DOMInternal.h:
* bindings/objc/DOMInternal.mm:
* bindings/scripts/CodeGeneratorObjC.pm:
* css/CSSCharsetRule.idl:
* css/CSSFontFaceRule.idl:
* css/CSSImportRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPageRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSStyleRule.idl:
* css/CSSStyleSheet.idl:
* css/CSSUnknownRule.idl:
* css/CSSValueList.idl:
* dom/KeyboardEvent.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/NodeIterator.idl:
* dom/OverflowEvent.idl:
* dom/UIEvent.idl:
* dom/WheelEvent.idl:
2006-09-29 David Harrison <harrison@apple.com>
 
Reviewed by John Sullivan.
......@@ -590,8 +590,24 @@
858C39BB0AA905EF00B187A4 /* DOMCounter.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 858C38A10AA8F20400B187A4 /* DOMCounter.h */; };
858C39BC0AA905EF00B187A4 /* DOMRect.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 858C38A30AA8F20400B187A4 /* DOMRect.h */; };
858C39BD0AA905EF00B187A4 /* DOMCSSStyleSheet.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 858C39260AA8FF9D00B187A4 /* DOMCSSStyleSheet.h */; };
85909CDC0ACC7A7E00DF01F1 /* DOMCSSCharsetRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909CD30ACC7A7E00DF01F1 /* DOMCSSCharsetRuleInternal.h */; };
85909CDD0ACC7A7E00DF01F1 /* DOMCSSFontFaceRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909CD40ACC7A7E00DF01F1 /* DOMCSSFontFaceRuleInternal.h */; };
85909CDE0ACC7A7E00DF01F1 /* DOMCSSImportRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909CD50ACC7A7E00DF01F1 /* DOMCSSImportRuleInternal.h */; };
85909CDF0ACC7A7E00DF01F1 /* DOMCSSMediaRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909CD60ACC7A7E00DF01F1 /* DOMCSSMediaRuleInternal.h */; };
85909CE00ACC7A7E00DF01F1 /* DOMCSSPageRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909CD70ACC7A7E00DF01F1 /* DOMCSSPageRuleInternal.h */; };
85909CE20ACC7A7E00DF01F1 /* DOMCSSStyleRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909CD90ACC7A7E00DF01F1 /* DOMCSSStyleRuleInternal.h */; };
85909CE30ACC7A7E00DF01F1 /* DOMCSSStyleSheetInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909CDA0ACC7A7E00DF01F1 /* DOMCSSStyleSheetInternal.h */; };
85909CE40ACC7A7E00DF01F1 /* DOMCSSUnknownRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909CDB0ACC7A7E00DF01F1 /* DOMCSSUnknownRuleInternal.h */; };
85909D290ACC7D5500DF01F1 /* DOMCSSPrimitiveValueInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909D260ACC7D5500DF01F1 /* DOMCSSPrimitiveValueInternal.h */; };
85909D2B0ACC7D5500DF01F1 /* DOMCSSValueListInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85909D280ACC7D5500DF01F1 /* DOMCSSValueListInternal.h */; };
859128F30AB2431A00202265 /* DOMHTMLEmbedElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 859128F10AB2431A00202265 /* DOMHTMLEmbedElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
859128F40AB2431A00202265 /* DOMHTMLEmbedElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 859128F20AB2431A00202265 /* DOMHTMLEmbedElement.mm */; };
85989DCC0ACC8BBD00A0BC51 /* DOMKeyboardEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85989DC50ACC8BBD00A0BC51 /* DOMKeyboardEventInternal.h */; };
85989DCD0ACC8BBD00A0BC51 /* DOMMouseEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85989DC60ACC8BBD00A0BC51 /* DOMMouseEventInternal.h */; };
85989DCE0ACC8BBD00A0BC51 /* DOMMutationEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85989DC70ACC8BBD00A0BC51 /* DOMMutationEventInternal.h */; };
85989DCF0ACC8BBD00A0BC51 /* DOMOverflowEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85989DC80ACC8BBD00A0BC51 /* DOMOverflowEventInternal.h */; };
85989DD00ACC8BBD00A0BC51 /* DOMUIEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85989DC90ACC8BBD00A0BC51 /* DOMUIEventInternal.h */; };
85989DD10ACC8BBD00A0BC51 /* DOMWheelEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85989DCA0ACC8BBD00A0BC51 /* DOMWheelEventInternal.h */; };
85992EBA0AA5069500AC0785 /* DOMHTMLHeadElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85992EB20AA5069500AC0785 /* DOMHTMLHeadElement.h */; settings = {ATTRIBUTES = (); }; };
85992EBB0AA5069500AC0785 /* DOMHTMLHeadElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85992EB30AA5069500AC0785 /* DOMHTMLHeadElement.mm */; };
85992EBC0AA5069500AC0785 /* DOMHTMLHtmlElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85992EB40AA5069500AC0785 /* DOMHTMLHtmlElement.h */; settings = {ATTRIBUTES = (); }; };
......@@ -3108,9 +3124,25 @@
858C39270AA8FF9D00B187A4 /* DOMCSSStyleSheet.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMCSSStyleSheet.mm; sourceTree = "<group>"; };
858C395D0AA902A900B187A4 /* DOMRGBColor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMRGBColor.h; sourceTree = "<group>"; };
858C395E0AA902A900B187A4 /* DOMRGBColor.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMRGBColor.mm; sourceTree = "<group>"; };
85909CD30ACC7A7E00DF01F1 /* DOMCSSCharsetRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSCharsetRuleInternal.h; sourceTree = "<group>"; };
85909CD40ACC7A7E00DF01F1 /* DOMCSSFontFaceRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSFontFaceRuleInternal.h; sourceTree = "<group>"; };
85909CD50ACC7A7E00DF01F1 /* DOMCSSImportRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSImportRuleInternal.h; sourceTree = "<group>"; };
85909CD60ACC7A7E00DF01F1 /* DOMCSSMediaRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSMediaRuleInternal.h; sourceTree = "<group>"; };
85909CD70ACC7A7E00DF01F1 /* DOMCSSPageRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSPageRuleInternal.h; sourceTree = "<group>"; };
85909CD90ACC7A7E00DF01F1 /* DOMCSSStyleRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSStyleRuleInternal.h; sourceTree = "<group>"; };
85909CDA0ACC7A7E00DF01F1 /* DOMCSSStyleSheetInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSStyleSheetInternal.h; sourceTree = "<group>"; };
85909CDB0ACC7A7E00DF01F1 /* DOMCSSUnknownRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSUnknownRuleInternal.h; sourceTree = "<group>"; };
85909D260ACC7D5500DF01F1 /* DOMCSSPrimitiveValueInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSPrimitiveValueInternal.h; sourceTree = "<group>"; };
85909D280ACC7D5500DF01F1 /* DOMCSSValueListInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSValueListInternal.h; sourceTree = "<group>"; };
859128790AB222EC00202265 /* HTMLEmbedElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLEmbedElement.idl; sourceTree = "<group>"; };
859128F10AB2431A00202265 /* DOMHTMLEmbedElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLEmbedElement.h; sourceTree = "<group>"; };
859128F20AB2431A00202265 /* DOMHTMLEmbedElement.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLEmbedElement.mm; sourceTree = "<group>"; };
85989DC50ACC8BBD00A0BC51 /* DOMKeyboardEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMKeyboardEventInternal.h; sourceTree = "<group>"; };
85989DC60ACC8BBD00A0BC51 /* DOMMouseEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMouseEventInternal.h; sourceTree = "<group>"; };
85989DC70ACC8BBD00A0BC51 /* DOMMutationEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMutationEventInternal.h; sourceTree = "<group>"; };
85989DC80ACC8BBD00A0BC51 /* DOMOverflowEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMOverflowEventInternal.h; sourceTree = "<group>"; };
85989DC90ACC8BBD00A0BC51 /* DOMUIEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMUIEventInternal.h; sourceTree = "<group>"; };
85989DCA0ACC8BBD00A0BC51 /* DOMWheelEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMWheelEventInternal.h; sourceTree = "<group>"; };
85992EB20AA5069500AC0785 /* DOMHTMLHeadElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLHeadElement.h; sourceTree = "<group>"; };
85992EB30AA5069500AC0785 /* DOMHTMLHeadElement.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLHeadElement.mm; sourceTree = "<group>"; };
85992EB40AA5069500AC0785 /* DOMHTMLHtmlElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLHtmlElement.h; sourceTree = "<group>"; };
......@@ -6143,8 +6175,18 @@
85E711400AC5D5340053270F /* DOMCharacterDataInternal.h */,
85E711410AC5D5340053270F /* DOMCommentInternal.h */,
85E711420AC5D5340053270F /* DOMCounterInternal.h */,
85909CD30ACC7A7E00DF01F1 /* DOMCSSCharsetRuleInternal.h */,
85909CD40ACC7A7E00DF01F1 /* DOMCSSFontFaceRuleInternal.h */,
85909CD50ACC7A7E00DF01F1 /* DOMCSSImportRuleInternal.h */,
85909CD60ACC7A7E00DF01F1 /* DOMCSSMediaRuleInternal.h */,
85909CD70ACC7A7E00DF01F1 /* DOMCSSPageRuleInternal.h */,
85909D260ACC7D5500DF01F1 /* DOMCSSPrimitiveValueInternal.h */,
85E711430AC5D5340053270F /* DOMCSSRuleListInternal.h */,
85E711440AC5D5340053270F /* DOMCSSStyleDeclarationInternal.h */,
85909CD90ACC7A7E00DF01F1 /* DOMCSSStyleRuleInternal.h */,
85909CDA0ACC7A7E00DF01F1 /* DOMCSSStyleSheetInternal.h */,
85909CDB0ACC7A7E00DF01F1 /* DOMCSSUnknownRuleInternal.h */,
85909D280ACC7D5500DF01F1 /* DOMCSSValueListInternal.h */,
85E711450AC5D5340053270F /* DOMDocumentFragmentInternal.h */,
85E711460AC5D5340053270F /* DOMDocumentInternal.h */,
85E711470AC5D5340053270F /* DOMDocumentTypeInternal.h */,
......@@ -6206,10 +6248,14 @@
85E7117F0AC5D5350053270F /* DOMHTMLTextAreaElementInternal.h */,
85E711800AC5D5350053270F /* DOMHTMLTitleElementInternal.h */,
85E711810AC5D5350053270F /* DOMHTMLUListElementInternal.h */,
85989DC50ACC8BBD00A0BC51 /* DOMKeyboardEventInternal.h */,
85E711820AC5D5350053270F /* DOMMediaListInternal.h */,
85989DC60ACC8BBD00A0BC51 /* DOMMouseEventInternal.h */,
85989DC70ACC8BBD00A0BC51 /* DOMMutationEventInternal.h */,
85E711830AC5D5350053270F /* DOMNamedNodeMapInternal.h */,
85E711840AC5D5350053270F /* DOMNodeListInternal.h */,
85E711850AC5D5350053270F /* DOMNotationInternal.h */,
85989DC80ACC8BBD00A0BC51 /* DOMOverflowEventInternal.h */,
85E711860AC5D5350053270F /* DOMProcessingInstructionInternal.h */,
85E711870AC5D5350053270F /* DOMRectInternal.h */,
85E711880AC5D5350053270F /* DOMStyleSheetListInternal.h */,
......@@ -6236,6 +6282,8 @@
854163900AC718680001E01B /* DOMSVGTransformInternal.h */,
8541638F0AC718680001E01B /* DOMSVGTransformListInternal.h */,
85E7118A0AC5D5350053270F /* DOMTextInternal.h */,
85989DC90ACC8BBD00A0BC51 /* DOMUIEventInternal.h */,
85989DCA0ACC8BBD00A0BC51 /* DOMWheelEventInternal.h */,
85E7118B0AC5D5350053270F /* DOMXPathExpressionInternal.h */,
85E7118C0AC5D5350053270F /* DOMXPathResultInternal.h */,
);
......@@ -9070,6 +9118,22 @@
85D79AE00ACA188400F02FC5 /* DOMSVGStringListInternal.h in Headers */,
859C9C3F0ACACCCC00791611 /* DOMSVGRectElement.h in Headers */,
859C9C420ACACD6D00791611 /* DOMSVGRectElementInternal.h in Headers */,
85909CDC0ACC7A7E00DF01F1 /* DOMCSSCharsetRuleInternal.h in Headers */,
85909CDD0ACC7A7E00DF01F1 /* DOMCSSFontFaceRuleInternal.h in Headers */,
85909CDE0ACC7A7E00DF01F1 /* DOMCSSImportRuleInternal.h in Headers */,
85909CDF0ACC7A7E00DF01F1 /* DOMCSSMediaRuleInternal.h in Headers */,
85909CE00ACC7A7E00DF01F1 /* DOMCSSPageRuleInternal.h in Headers */,
85909CE20ACC7A7E00DF01F1 /* DOMCSSStyleRuleInternal.h in Headers */,
85909CE30ACC7A7E00DF01F1 /* DOMCSSStyleSheetInternal.h in Headers */,
85909CE40ACC7A7E00DF01F1 /* DOMCSSUnknownRuleInternal.h in Headers */,
85909D290ACC7D5500DF01F1 /* DOMCSSPrimitiveValueInternal.h in Headers */,
85909D2B0ACC7D5500DF01F1 /* DOMCSSValueListInternal.h in Headers */,
85989DCC0ACC8BBD00A0BC51 /* DOMKeyboardEventInternal.h in Headers */,
85989DCD0ACC8BBD00A0BC51 /* DOMMouseEventInternal.h in Headers */,
85989DCE0ACC8BBD00A0BC51 /* DOMMutationEventInternal.h in Headers */,
85989DCF0ACC8BBD00A0BC51 /* DOMOverflowEventInternal.h in Headers */,
85989DD00ACC8BBD00A0BC51 /* DOMUIEventInternal.h in Headers */,
85989DD10ACC8BBD00A0BC51 /* DOMWheelEventInternal.h in Headers */,
4BBDBF7E0ACC9290005F6E97 /* CommandByName.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -9105,7 +9169,6 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
knownRegions = (
English,
......@@ -9120,7 +9183,6 @@
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
shouldCheckCompatibility = 1;
targets = (
93F198A508245E59001E9ABC /* WebCore */,
DD041FBE09D9DDBE0010AF2A /* Derived Sources */,
......@@ -31,7 +31,6 @@
#import "CDATASection.h"
#import "CSSStyleSheet.h"
#import "Comment.h"
#import "DOMHTML.h"
#import "DOMImplementationFront.h"
#import "DOMInternal.h"
#import "DOMPrivate.h"
......@@ -61,91 +60,8 @@
#import "TreeWalker.h"
#import "WebScriptObjectPrivate.h"
#import "csshelper.h"
// From old DOMCore.h
#import "DOMObject.h"
#import "DOMException.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 "DOMNode.h"
#import "DOMNodeList.h"
#import "DOMNotation.h"
#import "DOMProcessingInstruction.h"
#import "DOMText.h"
// From old DOMHTML.h
#import "DOMHTMLAppletElement.h"
#import "DOMHTMLOptionElement.h"
// Generated Objective-C Bindings
#import "DOMHTMLAnchorElement.h"
#import "DOMHTMLAreaElement.h"
#import "DOMHTMLBRElement.h"
#import "DOMHTMLBaseElement.h"
#import "DOMHTMLBaseFontElement.h"
#import "DOMHTMLBodyElement.h"
#import "DOMHTMLButtonElement.h"
#import "DOMHTMLCollection.h"
#import "DOMHTMLDListElement.h"
#import "DOMHTMLDirectoryElement.h"
#import "DOMHTMLDivElement.h"
#import "DOMHTMLDocument.h"
#import "DOMHTMLElement.h"
#import "DOMHTMLFieldSetElement.h"
#import "DOMHTMLFontElement.h"
#import "DOMHTMLFormElement.h"
#import "DOMHTMLFrameElement.h"
#import "DOMHTMLFrameSetElement.h"
#import "DOMHTMLHRElement.h"
#import "DOMHTMLHeadElement.h"
#import "DOMHTMLHeadingElement.h"
#import "DOMHTMLHtmlElement.h"
#import "DOMHTMLIFrameElement.h"
#import "DOMHTMLImageElement.h"
#import "DOMHTMLInputElement.h"
#import "DOMHTMLIsIndexElement.h"
#import "DOMHTMLLIElement.h"
#import "DOMHTMLLabelElement.h"
#import "DOMHTMLLegendElement.h"
#import "DOMHTMLLinkElement.h"
#import "DOMHTMLMapElement.h"
#import "DOMHTMLMenuElement.h"
#import "DOMHTMLMetaElement.h"
#import "DOMHTMLModElement.h"
#import "DOMHTMLOListElement.h"
#import "DOMHTMLObjectElement.h"
#import "DOMHTMLOptGroupElement.h"
#import "DOMHTMLOptionsCollection.h"
#import "DOMHTMLParagraphElement.h"
#import "DOMHTMLParamElement.h"
#import "DOMHTMLPreElement.h"
#import "DOMHTMLQuoteElement.h"
#import "DOMHTMLScriptElement.h"
#import "DOMHTMLSelectElement.h"
#import "DOMHTMLStyleElement.h"
#import "DOMHTMLTableCaptionElement.h"
#import "DOMHTMLTableCellElement.h"
#import "DOMHTMLTableColElement.h"
#import "DOMHTMLTableElement.h"
#import "DOMHTMLTableRowElement.h"
#import "DOMHTMLTableSectionElement.h"
#import "DOMHTMLTextAreaElement.h"
#import "DOMHTMLTitleElement.h"
#import "DOMHTMLUListElement.h"
#import <objc/objc-class.h>
#import <wtf/HashMap.h>
using namespace WebCore::HTMLNames;
......
......@@ -58,6 +58,11 @@ namespace WebCore {
@implementation DOMStyleSheet (WebCoreInternal)
- (WebCore::StyleSheet *)_styleSheet
{
return reinterpret_cast<WebCore::StyleSheet*>(_internal);
}
- (id)_initWithStyleSheet:(WebCore::StyleSheet *)impl
{
[super _init];
......@@ -71,7 +76,7 @@ namespace WebCore {
{
if (!impl)
return nil;
id cachedInstance;
cachedInstance = getDOMWrapper(impl);
if (cachedInstance)
......@@ -87,26 +92,17 @@ namespace WebCore {
@end
//------------------------------------------------------------------------------------------
// DOMCSSStyleSheet
// DOMCSSRule
@implementation DOMCSSStyleSheet (WebCoreInternal)
@implementation DOMCSSRule (WebCoreInternal)
+ (DOMCSSStyleSheet *)_CSSStyleSheetWith:(WebCore::CSSStyleSheet *)impl
- (WebCore::CSSRule *)_CSSRule
{
return static_cast<DOMCSSStyleSheet*>([DOMStyleSheet _styleSheetWith:impl]);
return reinterpret_cast<WebCore::CSSRule*>(_internal);
}
@end
//------------------------------------------------------------------------------------------
// DOMCSSRule
@implementation DOMCSSRule (WebCoreInternal)
- (id)_initWithRule:(WebCore::CSSRule *)impl
- (id)_initWithCSSRule:(WebCore::CSSRule *)impl
{
[super _init];
_internal = reinterpret_cast<DOMObjectInternal*>(impl);
......@@ -119,7 +115,7 @@ namespace WebCore {
{
if (!impl)
return nil;
id cachedInstance;
cachedInstance = getDOMWrapper(impl);
if (cachedInstance)
......@@ -149,7 +145,7 @@ namespace WebCore {
wrapperClass = [DOMCSSPageRule class];
break;
}
return [[[wrapperClass alloc] _initWithRule:impl] autorelease];
return [[[wrapperClass alloc] _initWithCSSRule:impl] autorelease];
}
@end
......@@ -160,7 +156,12 @@ namespace WebCore {
@implementation DOMCSSValue (WebCoreInternal)
- (id)_initWithValue:(WebCore::CSSValue *)impl
- (WebCore::CSSValue *)_CSSValue
{
return reinterpret_cast<WebCore::CSSValue*>(_internal);
}
- (id)_initWithCSSValue:(WebCore::CSSValue *)impl
{
[super _init];
_internal = reinterpret_cast<DOMObjectInternal*>(impl);
......@@ -173,12 +174,12 @@ namespace WebCore {
{
if (!impl)
return nil;
id cachedInstance;
cachedInstance = getDOMWrapper(impl);
if (cachedInstance)
return [[cachedInstance retain] autorelease];
Class wrapperClass = nil;
switch (impl->cssValueType()) {
case DOM_CSS_INHERIT:
......@@ -194,31 +195,14 @@ namespace WebCore {
wrapperClass = [DOMCSSValue class];
break;
}
return [[[wrapperClass alloc] _initWithValue:impl] autorelease];
}
@end
//------------------------------------------------------------------------------------------
// DOMCSSPrimitiveValue
@implementation DOMCSSPrimitiveValue (WebCoreInternal)
- (WebCore::CSSPrimitiveValue *)_CSSPrimitiveValue
{
return static_cast<WebCore::CSSPrimitiveValue*>(reinterpret_cast<WebCore::CSSValue*>(_internal));
}
+ (DOMCSSPrimitiveValue *)_CSSPrimitiveValueWith:(WebCore::CSSValue *)impl
{
return static_cast<DOMCSSPrimitiveValue*>([DOMCSSValue _CSSValueWith:impl]);
return [[[wrapperClass alloc] _initWithCSSValue:impl] autorelease];
}
@end
//------------------------------------------------------------------------------------------
// DOMCSSStyleDeclaration CSS2 Properties
@implementation DOMCSSStyleDeclaration (DOMCSS2Properties)
......
......@@ -148,3 +148,17 @@
}
@end
@implementation DOMHTMLAppletElement (WebCoreInternal)
- (WebCore::HTMLAppletElement *)_HTMLAppletElement
{
return IMPL;
}
+ (DOMHTMLAppletElement *)_HTMLOptionElementWith:(WebCore::HTMLAppletElement *)impl
{
return static_cast<DOMHTMLAppletElement*>([DOMNode _nodeWith:impl]);
}
@end
......@@ -97,4 +97,19 @@
IMPL->setWidth(WebCore::String::number(newWidth));
}
@end
@implementation DOMHTMLEmbedElement (WebCoreInternal)
- (WebCore::HTMLEmbedElement *)_HTMLEmbedElement
{
return IMPL;
}
+ (DOMHTMLEmbedElement *)_HTMLEmbedElementWith:(WebCore::HTMLEmbedElement *)impl
{
return static_cast<DOMHTMLEmbedElement*>([DOMNode _nodeWith:impl]);
}
@end
......@@ -29,9 +29,7 @@
#import "Color.h"
#import "DOMAbstractView.h"
#import "DOMCSSPrimitiveValue.h"
#import "DOMCSSRule.h"
#import "DOMCSSStyleSheet.h"
#import "DOMCSSValue.h"
#import "DOMEvents.h"
#import "DOMHTMLOptionElement.h"
......@@ -47,8 +45,18 @@
// Auto-generated internal interfaces
#import "DOMAttrInternal.h"
#import "DOMCDATASectionInternal.h"
#import "DOMCSSCharsetRuleInternal.h"
#import "DOMCSSFontFaceRuleInternal.h"
#import "DOMCSSImportRuleInternal.h"
#import "DOMCSSMediaRuleInternal.h"
#import "DOMCSSPageRuleInternal.h"
#import "DOMCSSPrimitiveValueInternal.h"
#import "DOMCSSRuleListInternal.h"
#import "DOMCSSStyleDeclarationInternal.h"
#import "DOMCSSStyleRuleInternal.h"
#import "DOMCSSStyleSheetInternal.h"
#import "DOMCSSUnknownRuleInternal.h"
#import "DOMCSSValueListInternal.h"
#import "DOMCharacterDataInternal.h"
#import "DOMCommentInternal.h"
#import "DOMCounterInternal.h"
......@@ -113,14 +121,20 @@
#import "DOMHTMLTextAreaElementInternal.h"
#import "DOMHTMLTitleElementInternal.h"
#import "DOMHTMLUListElementInternal.h"
#import "DOMKeyboardEventInternal.h"
#import "DOMMediaListInternal.h"
#import "DOMMouseEventInternal.h"
#import "DOMMutationEventInternal.h"
#import "DOMNamedNodeMapInternal.h"
#import "DOMNodeListInternal.h"
#import "DOMNotationInternal.h"
#import "DOMOverflowEventInternal.h"
#import "DOMProcessingInstructionInternal.h"
#import "DOMRectInternal.h"
#import "DOMStyleSheetListInternal.h"
#import "DOMTextInternal.h"
#import "DOMUIEventInternal.h"
#import "DOMWheelEventInternal.h"
#ifdef SVG_SUPPORT
#import "DOMSVGAngleInternal.h"
......@@ -153,9 +167,7 @@
#endif // XPATH_SUPPORT
namespace WebCore {
class CSSPrimitiveValue;
class CSSRule;
class CSSStyleSheet;
class CSSValue;
class DOMWindow;
class Event;
......@@ -197,29 +209,23 @@ namespace WebCore {
@interface DOMCSSRule (WebCoreInternal)
+ (DOMCSSRule *)_CSSRuleWith:(WebCore::CSSRule *)impl;
- (WebCore::CSSRule *)_CSSRule;
@end
@interface DOMCSSValue (WebCoreInternal)
+ (DOMCSSValue *)_CSSValueWith:(WebCore::CSSValue *)impl;
@end
@interface DOMCSSPrimitiveValue (WebCoreInternal)
- (WebCore::CSSPrimitiveValue *)_CSSPrimitiveValue;
+ (DOMCSSPrimitiveValue *)_CSSPrimitiveValueWith:(WebCore::CSSValue *)impl;
- (WebCore::CSSValue *)_CSSValue;
@end
@interface DOMRGBColor (WebCoreInternal)
+ (DOMRGBColor *)_RGBColorWithRGB:(WebCore::RGBA32)value;
@end
@interface DOMCSSStyleSheet (WebCoreInternal)
+ (DOMCSSStyleSheet *)_CSSStyleSheetWith:(WebCore::CSSStyleSheet *)impl;
@end
// StyleSheets Internal Interfaces
@interface DOMStyleSheet (WebCoreInternal)
+ (DOMStyleSheet *)_styleSheetWith:(WebCore::StyleSheet *)impl;
- (WebCore::StyleSheet *)_styleSheet;
@end
// Events Internal Interfaces
......
......@@ -42,11 +42,10 @@ using namespace WebCore;
using KJS::ExecState;
using KJS::Interpreter;
using KJS::JSObject;
using KJS::Bindings::RootObject;
//------------------------------------------------------------------------------------------
// Wrapping khtml implementation objects
// Wrapping WebCore implementation objects
static HashMap<DOMObjectInternal*, NSObject*>* wrapperCache;
......
......@@ -312,6 +312,15 @@ sub GetParentAndProtocols
return ($parent, @protocols);
}
sub GetBaseClass
{
$parent = shift;
return $parent if $parent eq "Object" or $parent eq "CSSValue" or $parent eq "CSSRule" or $parent eq "StyleSheet";
return "Event" if $parent eq "Event" or $parent eq "UIEvent";
return "Node";
}
sub IsProtocolType
{
$type = shift;
......@@ -735,6 +744,7 @@ sub GenerateImplementation
my $implClassName = GetImplClassName($interfaceName);
my $parentImplClassName = GetParentImplClassName($dataNode);
my $implClassNameWithNamespace = "WebCore::" . $implClassName;
my $baseClass = GetBaseClass($parentImplClassName);
my $classHeaderName = GetClassHeaderName($className);
my $conditional = $dataNode->extendedAttributes->{"Conditional"};
......@@ -761,20 +771,11 @@ sub GenerateImplementation
@implContent = ();
# add implementation accessor
# FIXME: CSSStyleSheet should not need special casing like this.
if ($parentImplClassName eq "Object" or $interfaceName eq "CSSStyleSheet") {
if ($parentImplClassName eq "Object") {
push(@implContent, "#define IMPL reinterpret_cast<$implClassNameWithNamespace*>(_internal)\n\n");
} else {
my $internalBaseType = "WebCore::";
if ($parentImplClassName eq "CSSValue" or $parentImplClassName eq "CSSRule") {
$internalBaseType .= $parentImplClassName;
} elsif ($parentImplClassName eq "Event" or $parentImplClassName eq "UIEvent") {
$internalBaseType .= "Event";
} else {
$internalBaseType .= "Node";
}
push(@implContent, "#define IMPL static_cast<$implClassNameWithNamespace*>(reinterpret_cast<$internalBaseType*>(_internal))\n\n");
my $baseClassWithNamespace = "WebCore::$baseClass";
push(@implContent, "#define IMPL static_cast<$implClassNameWithNamespace*>(reinterpret_cast<$baseClassWithNamespace*>(_internal))\n\n");
}
# START implementation
......@@ -1168,10 +1169,13 @@ sub GenerateImplementation
push(@implContent, " return [[[self alloc] $initWithImplName:impl] autorelease];\n");
push(@implContent, "}\n\n");
} else {
my $internalBaseType = "DOM$baseClass";
my $internalBaseTypeMaker = GetObjCTypeMaker($baseClass);
# - (DOMFooBar)_FooBarWith:(WebCore::FooBar *)impl for implementation class FooBar
push(@implContent, "$typeMakerSig\n");
push(@implContent, "{\n");
push(@implContent, " return static_cast<$className*>([DOMNode _nodeWith:impl]);\n");
push(@implContent, " return static_cast<$className*>([$internalBaseType $internalBaseTypeMaker:impl]);\n");
push(@implContent, "}\n\n");
}
......