Commit a8192c04 authored by weinig's avatar weinig

WebCore:

        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: http://svn.webkit.org/repository/webkit/trunk@16068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9c4ccf83
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.
......
# 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 = \
......
This diff is collapsed.
This diff is collapsed.
......@@ -23,6 +23,11 @@
* 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;
......@@ -33,6 +38,10 @@
@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
......@@ -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
......
/*
* 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,218 +24,21 @@
* 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>
/*
* 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;
......
......@@ -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
/*
* 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,22 +24,28 @@
* 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;
......@@ -58,22 +65,6 @@
- (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
......@@ -96,30 +87,15 @@
- (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;