+2006-09-09 Sam Weinig <sam.weinig@gmail.com>
+
+ Reviewed by Eric.
+
+ Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10791
+ Even More Objective-C DOM auto-generation cleanup
+
+ - Auto-generate some remaining extension methods for DOMDocument
+ and DOMCSSStyleDeclaration.
+
+ - Split DOMHTMLEmbedElement into it's own files. It can't be
+ auto-generated yet because the Objective-C interface is significantly
+ different from the implementation interface. Since HTMLEmbedElement
+ is not in the W3C spec, this is somewhat of a gray area.
+
+ - Auto-generate DOMEventListener protocol.
+
+ - Clean up the IDL files by separating the extensions from the
+ specified methods and attributes.
+
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/objc/DOM.mm:
+ * bindings/objc/DOMCSS.mm:
+ * bindings/objc/DOMEventListener.h: Removed.
+ * bindings/objc/DOMExtensions.h:
+ * bindings/objc/DOMHTML.h:
+ * bindings/objc/DOMHTML.mm:
+ * bindings/objc/DOMHTMLEmbedElement.h: Added.
+ * bindings/objc/DOMHTMLEmbedElement.mm: Added.
+ (-[DOMHTMLEmbedElement align]):
+ (-[DOMHTMLEmbedElement setAlign:]):
+ (-[DOMHTMLEmbedElement height]):
+ (-[DOMHTMLEmbedElement setHeight:]):
+ (-[DOMHTMLEmbedElement name]):
+ (-[DOMHTMLEmbedElement setName:]):
+ (-[DOMHTMLEmbedElement src]):
+ (-[DOMHTMLEmbedElement setSrc:]):
+ (-[DOMHTMLEmbedElement type]):
+ (-[DOMHTMLEmbedElement setType:]):
+ (-[DOMHTMLEmbedElement width]):
+ (-[DOMHTMLEmbedElement setWidth:]):
+ * bindings/objc/DOMPrivate.h:
+ * bindings/objc/PublicDOMInterfaces.h:
+ * css/CSSStyleDeclaration.idl:
+ * dom/Document.idl:
+ * dom/KeyboardEvent.h:
+ * dom/KeyboardEvent.idl:
+ * dom/MouseEvent.idl:
+ * dom/MutationEvent.idl:
+ * dom/OverflowEvent.idl:
+ * dom/UIEvent.idl:
+ * dom/WheelEvent.idl:
+ * html/HTMLEmbedElement.idl: Added.
2006-09-09 Eric Seidel <eric@eseidel.com>
DOMEntity.h \
DOMEntityReference.h \
DOMEvent.h \
+ DOMEventListener.h \
DOMHTMLAnchorElement.h \
DOMHTMLAreaElement.h \
DOMHTMLBRElement.h \
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 */; };
+ 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 */; };
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 = (); }; };
85BA4D2E0AA6889F0088052D /* DOMHTMLUListElement.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85BA4D090AA688680088052D /* DOMHTMLUListElement.h */; };
85C7F3E60AAF5D5E004014DD /* DOMEvent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85AFA8200AAF528A00E84305 /* DOMEvent.h */; };
85C7F4080AAF6EA9004014DD /* DOMEventPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85C7F4070AAF6EA9004014DD /* DOMEventPrivate.h */; };
- 85C7F4460AAF76DC004014DD /* DOMEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F4440AAF76DC004014DD /* DOMEventListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
85C7F4470AAF76DC004014DD /* DOMEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F4450AAF76DC004014DD /* DOMEventTarget.h */; settings = {ATTRIBUTES = (Private, ); }; };
85C7F4910AAF79DC004014DD /* DOMUIEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C7F48F0AAF79DC004014DD /* DOMUIEvent.h */; };
85C7F4920AAF79DC004014DD /* DOMUIEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85C7F4900AAF79DC004014DD /* DOMUIEvent.mm */; };
85CA96EB0A9624E900690CCF /* DOMNotation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85CA96E90A9624E900690CCF /* DOMNotation.mm */; };
85CA975C0A962E5400690CCF /* DOMDocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 85CA975A0A962E5400690CCF /* DOMDocumentType.h */; settings = {ATTRIBUTES = (); }; };
85CA975D0A962E5400690CCF /* DOMDocumentType.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85CA975B0A962E5400690CCF /* DOMDocumentType.mm */; };
+ 85D2AD680AB1A40A00C313EA /* DOMEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 85D2AD670AB1A40A00C313EA /* DOMEventListener.h */; };
+ 85D2AD6D0AB1A48200C313EA /* DOMEventListener.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85D2AD670AB1A40A00C313EA /* DOMEventListener.h */; };
85D389B20A991A7F00282145 /* DOMAttr.h in Headers */ = {isa = PBXBuildFile; fileRef = 85D389B00A991A7F00282145 /* DOMAttr.h */; settings = {ATTRIBUTES = (); }; };
85D389B30A991A7F00282145 /* DOMAttr.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85D389B10A991A7F00282145 /* DOMAttr.mm */; };
85DF2C5C0AA341F600AD64C5 /* DOMHTMLFormElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85DF2C100AA341F600AD64C5 /* DOMHTMLFormElement.h */; settings = {ATTRIBUTES = (); }; };
dstPath = Versions/A/PrivateHeaders;
dstSubfolderSpec = 1;
files = (
+ 85D2AD6D0AB1A48200C313EA /* DOMEventListener.h in CopyFiles */,
85526D050AB0B979000302EA /* DOMTreeWalker.h in CopyFiles */,
85526C720AB0AE2F000302EA /* DOMNodeIterator.h in CopyFiles */,
85526C730AB0AE2F000302EA /* DOMNodeIteratorPrivate.h in CopyFiles */,
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>"; };
+ 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>"; };
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>"; };
85C56CAC0AA89F8E00D95755 /* CSSCharsetRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSCharsetRule.idl; sourceTree = "<group>"; };
85C56CAD0AA89FE000D95755 /* CSSUnknownRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSUnknownRule.idl; sourceTree = "<group>"; };
85C7F4070AAF6EA9004014DD /* DOMEventPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEventPrivate.h; sourceTree = "<group>"; };
- 85C7F4440AAF76DC004014DD /* DOMEventListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEventListener.h; sourceTree = "<group>"; };
85C7F4450AAF76DC004014DD /* DOMEventTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEventTarget.h; sourceTree = "<group>"; };
85C7F48F0AAF79DC004014DD /* DOMUIEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMUIEvent.h; sourceTree = "<group>"; };
85C7F4900AAF79DC004014DD /* DOMUIEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMUIEvent.mm; 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>"; };
+ 85D2AD670AB1A40A00C313EA /* DOMEventListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMEventListener.h; 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>"; };
85DF2C100AA341F600AD64C5 /* DOMHTMLFormElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMHTMLFormElement.h; sourceTree = "<group>"; };
children = (
852B9E830AA79C47002ADA6E /* DOMHTMLAppletElement.h */,
852B9E840AA79C47002ADA6E /* DOMHTMLAppletElement.mm */,
+ 859128F10AB2431A00202265 /* DOMHTMLEmbedElement.h */,
+ 859128F20AB2431A00202265 /* DOMHTMLEmbedElement.mm */,
85992FBE0AA5DD4000AC0785 /* DOMHTMLDocument.h */,
85992FBF0AA5DD4000AC0785 /* DOMHTMLDocument.mm */,
852B9E850AA79C47002ADA6E /* DOMHTMLOptionElement.h */,
85AFA7AB0AAF3BB000E84305 /* Events */ = {
isa = PBXGroup;
children = (
+ 85D2AD670AB1A40A00C313EA /* DOMEventListener.h */,
85C7F4070AAF6EA9004014DD /* DOMEventPrivate.h */,
85AFA8200AAF528A00E84305 /* DOMEvent.h */,
85AFA8210AAF528A00E84305 /* DOMEvent.mm */,
857E0B2B0AB043FC0036E447 /* DOMMouseEventPrivate.h */,
857E0B230AB043460036E447 /* DOMMouseEvent.h */,
857E0B240AB043460036E447 /* DOMMouseEvent.mm */,
+ 85C7F5BE0AAFB7CC004014DD /* DOMMutationEventPrivate.h */,
85C7F5BC0AAFB7CC004014DD /* DOMMutationEvent.h */,
85C7F5BD0AAFB7CC004014DD /* DOMMutationEvent.mm */,
- 85C7F5BE0AAFB7CC004014DD /* DOMMutationEventPrivate.h */,
85C7F5CE0AAFB8D9004014DD /* DOMOverflowEvent.h */,
85C7F5CF0AAFB8D9004014DD /* DOMOverflowEvent.mm */,
85C7F4C20AAF8081004014DD /* DOMUIEventPrivate.h */,
85C7F4430AAF7686004014DD /* Events */ = {
isa = PBXGroup;
children = (
- 85C7F4440AAF76DC004014DD /* DOMEventListener.h */,
85C7F4450AAF76DC004014DD /* DOMEventTarget.h */,
);
name = Events;
BCEF3433087B563E00BBF833 /* HTMLElementFactory.h */,
A871D4550A127CBC00B12A68 /* HTMLEmbedElement.cpp */,
A871D4520A127CBC00B12A68 /* HTMLEmbedElement.h */,
+ 859128790AB222EC00202265 /* HTMLEmbedElement.idl */,
A81369B9097374F500D74463 /* HTMLFieldSetElement.cpp */,
A81369B8097374F500D74463 /* HTMLFieldSetElement.h */,
1AE2A9F40A1CDA5700B42B25 /* HTMLFieldSetElement.idl */,
850657020AAB4763002D15C0 /* DOMStyleSheetList.h in Headers */,
934706AB0AACD809002C1D43 /* TextDecoder.h in Headers */,
85AFA8220AAF528A00E84305 /* DOMEvent.h in Headers */,
- 85C7F4460AAF76DC004014DD /* DOMEventListener.h in Headers */,
85C7F4470AAF76DC004014DD /* DOMEventTarget.h in Headers */,
85C7F4910AAF79DC004014DD /* DOMUIEvent.h in Headers */,
85C7F4C30AAF8081004014DD /* DOMUIEventPrivate.h in Headers */,
85526C3E0AB0A76F000302EA /* DOMNodeIteratorPrivate.h in Headers */,
85526CD20AB0B7D9000302EA /* DOMTreeWalker.h in Headers */,
859FA5FB0AB0BF20004FAEE9 /* DOMNodeFilter.h in Headers */,
+ 85D2AD680AB1A40A00C313EA /* DOMEventListener.h in Headers */,
+ 859128F30AB2431A00202265 /* DOMHTMLEmbedElement.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
857E0B260AB043460036E447 /* DOMMouseEvent.mm in Sources */,
85526C380AB0A17E000302EA /* DOMNodeIterator.mm in Sources */,
85526CD30AB0B7DA000302EA /* DOMTreeWalker.mm in Sources */,
+ 859128F40AB2431A00202265 /* DOMHTMLEmbedElement.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
//------------------------------------------------------------------------------------------
// DOMDocument
-// FIXME: this should be auto-genenerate in DOMDocument.mm
-@implementation DOMDocument (DOMDocumentExtensions)
-
-- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration
-{
- return [DOMCSSStyleDeclaration _CSSStyleDeclarationWith:[self _document]->createCSSStyleDeclaration().get()];
-}
-
-@end
-
@implementation DOMDocument (WebCoreInternal)
+ (DOMDocument *)_documentWith:(Document *)impl
//------------------------------------------------------------------------------------------
// DOMCSSStyleDeclaration
-@implementation DOMCSSStyleDeclaration (DOMCSSStyleDeclarationExtensions)
-
-- (NSString *)getPropertyShorthand:(NSString *)propertyName
-{
- return [self _CSSStyleDeclaration]->getPropertyShorthand(propertyName);
-}
-
-- (BOOL)isPropertyImplicit:(NSString *)propertyName
-{
- return [self _CSSStyleDeclaration]->isPropertyImplicit(propertyName);
-}
-
-@end
-
@implementation DOMCSSStyleDeclaration (WebCoreInternal)
- (id)_initWithStyleDeclaration:(CSSStyleDeclaration *)impl
#import <WebCore/DOMHTMLAreaElement.h>
#import <WebCore/DOMHTMLDocument.h>
#import <WebCore/DOMHTMLElement.h>
+#import <WebCore/DOMHTMLEmbedElement.h>
#import <WebCore/DOMHTMLImageElement.h>
#import <WebCore/DOMHTMLInputElement.h>
#import <WebCore/DOMHTMLLinkElement.h>
@class NSImage;
@interface DOMDocument (DOMDocumentCSSExtensions)
-- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration;
- (DOMCSSRuleList *)getMatchedCSSRules:(DOMElement *)elt :(NSString *)pseudoElt;
@end
- (NSURL *)absoluteImageURL;
@end
-@interface DOMHTMLEmbedElement : DOMHTMLElement
-- (NSString *)align;
-- (void)setAlign:(NSString *)align;
-- (int)height;
-- (void)setHeight:(int)height;
-- (NSString *)name;
-- (void)setName:(NSString *)name;
-- (NSString *)src;
-- (void)setSrc:(NSString *)src;
-- (NSString *)type;
-- (void)setType:(NSString *)type;
-- (int)width;
-- (void)setWidth:(int)width;
-@end
-
-@interface DOMCSSStyleDeclaration (DOMCSSStyleDeclarationExtensions)
-- (NSString *)getPropertyShorthand:(NSString *)propertyName;
-- (BOOL)isPropertyImplicit:(NSString *)propertyName;
-@end
-
@interface DOMRange (DOMRangeExtensions)
- (NSString *)text;
@end
#import <WebCore/DOMHTMLTextAreaElement.h>
#import <WebCore/DOMHTMLTitleElement.h>
#import <WebCore/DOMHTMLUListElement.h>
+
+// was an HTML extension
+#import <WebCore/DOMHTMLEmbedElement.h>
#import "FoundationExtras.h"
#import "FrameView.h"
#import "HTMLDocument.h"
-#import "HTMLEmbedElement.h"
#import "HTMLFormElement.h"
#import "HTMLImageElement.h"
#import "HTMLInputElement.h"
#pragma mark DOM EXTENSIONS
-
-//------------------------------------------------------------------------------------------
-// DOMHTMLEmbedElement
-
-@implementation DOMHTMLEmbedElement
-
-- (HTMLEmbedElement *)_HTMLEmbedElement
-{
- return static_cast<HTMLEmbedElement*>(DOM_cast<Node*>(_internal));
-}
-
-- (NSString *)align
-{
- return [self _HTMLEmbedElement]->getAttribute(alignAttr);
-}
-
-- (void)setAlign:(NSString *)align
-{
- [self _HTMLEmbedElement]->setAttribute(alignAttr, align);
-}
-
-- (int)height
-{
- return [self _HTMLEmbedElement]->getAttribute(heightAttr).toInt();
-}
-
-- (void)setHeight:(int)height
-{
- [self _HTMLEmbedElement]->setAttribute(heightAttr, String::number(height));
-}
-
-- (NSString *)name
-{
- return [self _HTMLEmbedElement]->getAttribute(nameAttr);
-}
-
-- (void)setName:(NSString *)name
-{
- [self _HTMLEmbedElement]->setAttribute(nameAttr, name);
-}
-
-- (NSString *)src
-{
- return [self _HTMLEmbedElement]->getAttribute(srcAttr);
-}
-
-- (void)setSrc:(NSString *)src
-{
- [self _HTMLEmbedElement]->setAttribute(srcAttr, src);
-}
-
-- (NSString *)type
-{
- return [self _HTMLEmbedElement]->getAttribute(typeAttr);
-}
-
-- (void)setType:(NSString *)type
-{
- [self _HTMLEmbedElement]->setAttribute(typeAttr, type);
-}
-
-- (int)width
-{
- return [self _HTMLEmbedElement]->getAttribute(widthAttr).toInt();
-}
-
-- (void)setWidth:(int)width
-{
- [self _HTMLEmbedElement]->setAttribute(widthAttr, String::number(width));
-}
-
-@end
-
// These #imports and "usings" are used only by viewForElement and should be deleted
// when that function goes away.
#import "RenderWidget.h"
/*
- * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
+ * 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
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-@class DOMEvent;
+#import <WebCore/DOMHTMLElement.h>
-@protocol DOMEventListener <NSObject>
-- (void)handleEvent:(DOMEvent *)event;
+@interface DOMHTMLEmbedElement : DOMHTMLElement
+- (NSString *)align;
+- (void)setAlign:(NSString *)newAlign;
+- (int)height;
+- (void)setHeight:(int)newHeight;
+- (NSString *)name;
+- (void)setName:(NSString *)newName;
+- (NSString *)src;
+- (void)setSrc:(NSString *)newSrc;
+- (NSString *)type;
+- (void)setType:(NSString *)newType;
+- (int)width;
+- (void)setWidth:(int)newWidth;
@end
--- /dev/null
+/*
+ * This file is part of the WebKit open source project.
+ * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+ *
+ * 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 "DOMHTMLEmbedElement.h"
+
+#import <wtf/GetPtr.h>
+
+#import "DOMInternal.h"
+#import "HTMLEmbedElement.h"
+#import "PlatformString.h"
+
+@implementation DOMHTMLEmbedElement
+
+#define IMPL static_cast<WebCore::HTMLEmbedElement*>(reinterpret_cast<WebCore::Node*>(_internal))
+
+- (NSString *)align
+{
+ return IMPL->align();
+}
+
+- (void)setAlign:(NSString *)newAlign
+{
+ IMPL->setAlign(newAlign);
+}
+
+- (int)height
+{
+ return IMPL->height().toInt();
+}
+
+- (void)setHeight:(int)newHeight
+{
+ IMPL->setHeight(WebCore::String::number(newHeight));
+}
+
+- (NSString *)name
+{
+ return IMPL->name();
+}
+
+- (void)setName:(NSString *)newName
+{
+ IMPL->setName(newName);
+}
+
+- (NSString *)src
+{
+ return IMPL->src();
+}
+
+- (void)setSrc:(NSString *)newSrc
+{
+ IMPL->setSrc(newSrc);
+}
+
+- (NSString *)type
+{
+ return IMPL->type();
+}
+
+- (void)setType:(NSString *)newType
+{
+ IMPL->setType(newType);
+}
+
+- (int)width
+{
+ return IMPL->width().toInt();
+}
+
+- (void)setWidth:(int)newWidth
+{
+ IMPL->setWidth(WebCore::String::number(newWidth));
+}
+
+@end
#import <WebCore/DOMCSSStyleDeclarationPrivate.h>
#import <WebCore/DOMCSSStyleSheetPrivate.h>
#import <WebCore/DOMCharacterDataPrivate.h>
+#import <WebCore/DOMDOMImplementationPrivate.h>
#import <WebCore/DOMDocumentPrivate.h>
#import <WebCore/DOMElementPrivate.h>
+#import <WebCore/DOMEventPrivate.h>
#import <WebCore/DOMHTMLAnchorElementPrivate.h>
#import <WebCore/DOMHTMLAreaElementPrivate.h>
#import <WebCore/DOMHTMLBodyElementPrivate.h>
#import <WebCore/DOMHTMLSelectElementPrivate.h>
#import <WebCore/DOMHTMLStyleElementPrivate.h>
#import <WebCore/DOMHTMLTextAreaElementPrivate.h>
-#import <WebCore/DOMDOMImplementationPrivate.h>
+#import <WebCore/DOMKeyboardEventPrivate.h>
+#import <WebCore/DOMMutationEventPrivate.h>
#import <WebCore/DOMNamedNodeMapPrivate.h>
+#import <WebCore/DOMNodeIteratorPrivate.h>
#import <WebCore/DOMProcessingInstructionPrivate.h>
+#import <WebCore/DOMUIEventPrivate.h>
+#import <WebCore/DOMWheelEventPrivate.h>
@interface DOMRange (WebPrivate)
// uses same algorithm as innerText
@interface DOMHTMLSelectElement(FormsAutoFillTransition)
- (void)_activateItemAtIndex:(int)index;
@end
-
-@interface DOMKeyboardEvent(PublicPending)
-- (void)initKeyboardEvent:(NSString *)typeArg :(BOOL)canBubbleArg :(BOOL)cancelableArg :(DOMAbstractView *)viewArg :(NSString *)keyIdentifierArg :(unsigned)keyLocationArg :(BOOL)ctrlKeyArg :(BOOL)altKeyArg :(BOOL)shiftKeyArg :(BOOL)metaKeyArg;
-@end
-
-@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
- (DOMRange *)createRange;
- (DOMCSSStyleDeclaration *)getOverrideStyle:(DOMElement *)element :(NSString *)pseudoElement;
//- (DOMCSSStyleDeclaration *)getOverrideStyle:(DOMElement *)element pseudoElement:(NSString *)pseudoElement;
+- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration;
- (DOMNode *)adoptNode:(DOMNode *)source;
#ifdef XPATH_SUPPORT
- (DOMXPathExpression *)createExpression:(NSString *)expression :(id <DOMXPathNSResolver>)resolver;
- (void)setProperty:(NSString *)propertyName :(NSString *)value :(NSString *)priority;
//- (void)setProperty:(NSString *)propertyName value:(NSString *)value priority:(NSString *)priority;
- (NSString *)item:(unsigned)index;
+- (NSString *)getPropertyShorthand:(NSString *)propertyName;
+- (BOOL)isPropertyImplicit:(NSString *)propertyName;
@end
@interface DOMCSSStyleRule : DOMCSSRule
- (DOMNode *)previousNode;
- (DOMNode *)nextNode;
@end
+
+// Protocols
+
+@protocol DOMEventListener <NSObject>
+- (void)handleEvent:(DOMEvent *)evt;
+@end
readonly attribute [Exclude=JS] unsigned long length;
[Exclude=JS] DOMString item(in unsigned long index);
readonly attribute [Exclude=JS] CSSRule parentRule;
+
+ // extensions
+ [Exclude=JS] DOMString getPropertyShorthand(in DOMString propertyName);
+ [Exclude=JS] boolean isPropertyImplicit(in DOMString propertyName);
};
attribute [ConvertNullStringTo=Null] DOMString selectedStylesheetSet;
+ [Exclude=JS] CSSStyleDeclaration createCSSStyleDeclaration();
+
};
}
void initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
const String& keyIdentifier, unsigned keyLocation,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey);
+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey = false);
String keyIdentifier() const { return m_keyIdentifier.get(); }
unsigned keyLocation() const { return m_keyLocation; }
module events {
+ // Introduced in DOM Level 3:
interface KeyboardEvent : UIEvent {
+ // KeyLocationCode
+ //const unsigned long KEY_LOCATION_STANDARD = 0x00;
+ //const unsigned long KEY_LOCATION_LEFT = 0x01;
+ //const unsigned long KEY_LOCATION_RIGHT = 0x02;
+ //const unsigned long KEY_LOCATION_NUMPAD = 0x03;
+
readonly attribute DOMString keyIdentifier;
readonly attribute unsigned long keyLocation;
- readonly attribute boolean altKey;
readonly attribute boolean ctrlKey;
- readonly attribute boolean metaKey;
readonly attribute boolean shiftKey;
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
readonly attribute boolean altGraphKey;
+ //boolean [Exclude=JS] getModifierState(in DOMString keyIdentifierArg);
+
+ // FIXME: this does not match the version in the DOM spec.
void initKeyboardEvent(in AtomicString type,
in boolean canBubble,
in boolean cancelable,
// WebKit Extensions
readonly attribute [Exclude=JS] long keyCode;
readonly attribute [Exclude=JS] long charCode;
+
+ [Exclude=JS] void initKeyboardEvent(in AtomicString type,
+ in boolean canBubble,
+ in boolean cancelable,
+ in DOMWindow view,
+ in DOMString keyIdentifier,
+ in unsigned long keyLocation,
+ in boolean ctrlKey,
+ in boolean altKey,
+ in boolean shiftKey,
+ in boolean metaKey);
};
module events {
+ // Introduced in DOM Level 2:
interface MouseEvent : UIEvent {
readonly attribute long screenX;
readonly attribute long screenY;
readonly attribute long clientX;
readonly attribute long clientY;
- readonly attribute long offsetX;
- readonly attribute long offsetY;
- readonly attribute long x;
- readonly attribute long y;
readonly attribute boolean ctrlKey;
readonly attribute boolean shiftKey;
readonly attribute boolean altKey;
readonly attribute boolean metaKey;
readonly attribute unsigned short button;
readonly attribute EventTarget relatedTarget;
- readonly attribute Node fromElement;
- readonly attribute Node toElement;
[OldStyleObjC] void initMouseEvent(in AtomicString type,
in boolean canBubble,
in boolean metaKey,
in unsigned short button,
in EventTarget relatedTarget);
+
+ // extensions
+ readonly attribute long offsetX;
+ readonly attribute long offsetY;
+ readonly attribute long x;
+ readonly attribute long y;
+ readonly attribute Node fromElement;
+ readonly attribute Node toElement;
+
};
}
module events {
+ // Introduced in DOM Level 2:
interface [GenerateConstructor] MutationEvent : Event {
- // DOM Level 2
-
+ // attrChangeType
const unsigned short MODIFICATION = 1;
const unsigned short ADDITION = 2;
const unsigned short REMOVAL = 3;
readonly attribute unsigned short attrChange;
[OldStyleObjC] void initMutationEvent(in AtomicString type,
- in boolean canBubble,
- in boolean cancelable,
- in Node relatedNode,
- in DOMString prevValue,
- in DOMString newValue,
- in DOMString attrName,
- in unsigned short attrChange);
+ in boolean canBubble,
+ in boolean cancelable,
+ in Node relatedNode,
+ in DOMString prevValue,
+ in DOMString newValue,
+ in DOMString attrName,
+ in unsigned short attrChange);
};
* Boston, MA 02111-1307, USA.
*/
module events {
+
interface OverflowEvent : Event {
const unsigned short HORIZONTAL = 0;
const unsigned short VERTICAL = 1;
readonly attribute boolean horizontalOverflow;
readonly attribute boolean verticalOverflow;
};
+
}
interface UIEvent : Event {
readonly attribute DOMWindow view;
readonly attribute long detail;
+
+ [OldStyleObjC] void initUIEvent(in AtomicString type,
+ in boolean canBubble,
+ in boolean cancelable,
+ in DOMWindow view,
+ in long detail);
+ // extentsions
readonly attribute long keyCode;
readonly attribute long charCode;
readonly attribute long layerX;
readonly attribute long pageX;
readonly attribute long pageY;
readonly attribute long which;
-
- [OldStyleObjC] void initUIEvent(in AtomicString type,
- in boolean canBubble,
- in boolean cancelable,
- in DOMWindow view,
- in long detail);
+
};
}
module events {
+ // Based off of proposed IDL interface for WheelEvent:
interface WheelEvent : UIEvent {
- readonly attribute boolean altKey;
+ readonly attribute long screenX;
+ readonly attribute long screenY;
readonly attribute long clientX;
readonly attribute long clientY;
readonly attribute boolean ctrlKey;
- readonly attribute boolean metaKey;
readonly attribute boolean shiftKey;
-
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
readonly attribute long wheelDelta;
+
+ // WebKit Extensions
readonly attribute long offsetX;
readonly attribute long offsetY;
- readonly attribute long screenX;
- readonly attribute long screenY;
readonly attribute long x;
readonly attribute long y;
-
- // WebKit Extensions
readonly attribute [Exclude=JS] boolean isHorizontal;
+
+ [Exclude=JS] void initWheelEvent(in boolean horizontal,
+ in long wheelDelta,
+ in DOMWindow view,
+ in long screenX,
+ in long screenY,
+ in long clientX,
+ in long clientY,
+ in boolean ctrlKey,
+ in boolean altKey,
+ in boolean shiftKey,
+ in boolean metaKey);
};
--- /dev/null
+/*
+ * 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
+ * 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 html {
+
+ interface HTMLEmbedElement : HTMLElement {
+ attribute DOMString align;
+ attribute long height;
+ attribute DOMString name;
+ attribute DOMString src;
+ attribute DOMString type;
+ attribute long width;
+ };
+
+}
+2006-09-09 Sam Weinig <sam.weinig@gmail.com>
+
+ Reviewed by Eric.
+
+ Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10791
+ Even More Objective-C DOM auto-generation cleanup
+
+ * MigrateHeaders.make:
+
2006-09-08 Tim Omernick <timo@apple.com>
Reviewed by Brady Eidson.
# 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
$(PUBLIC_HEADERS_DIR)/DOMHTMLDivElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLDocument.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLElement.h \
+ $(PUBLIC_HEADERS_DIR)/DOMHTMLEmbedElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLFieldSetElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLFontElement.h \
$(PUBLIC_HEADERS_DIR)/DOMHTMLFormElement.h \
+2006-09-09 Sam Weinig <sam.weinig@gmail.com>
+
+ Reviewed by Eric.
+
+ Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10791
+ Even More Objective-C DOM auto-generation cleanup
+
+ - Change to use new, more Objectice-C'ish version of
+ DOMKeyboardEvent's initKeyboardEvent. Fixes an error with
+ regression test for fast/events/dblclick-addEventListener.html.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController fireKeyboardEventsToElement:]):
+
2006-09-04 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Tim H.
/*
* Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Jonas Witt <jonas.witt@gmail.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
// Keyboard Event 1
DOMEvent *domEvent = [document createEvent:@"KeyboardEvent"];
- [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keydown" :YES :YES :[document defaultView] :@"U+000041" :0 :YES :NO :NO :NO];
+ [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keydown"
+ canBubble:YES
+ cancelable:YES
+ view:[document defaultView]
+ keyIdentifier:@"U+000041"
+ keyLocation:0
+ ctrlKey:YES
+ altKey:NO
+ shiftKey:NO
+ metaKey:NO];
[target dispatchEvent:domEvent];
// Keyboard Event 2
domEvent = [document createEvent:@"KeyboardEvent"];
- [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keypress" :YES :YES :[document defaultView] :@"U+000045" :1 :NO :YES :NO :NO];
+ [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keypress"
+ canBubble:YES
+ cancelable:YES
+ view:[document defaultView]
+ keyIdentifier:@"U+000045"
+ keyLocation:1
+ ctrlKey:NO
+ altKey:YES
+ shiftKey:NO
+ metaKey:NO];
[target dispatchEvent:domEvent];
// Keyboard Event 3
domEvent = [document createEvent:@"KeyboardEvent"];
- [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keyup" :YES :YES :[document defaultView] :@"U+000056" :0 :NO :NO :NO :NO];
+ [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keyup"
+ canBubble:YES
+ cancelable:YES
+ view:[document defaultView]
+ keyIdentifier:@"U+000056"
+ keyLocation:0
+ ctrlKey:NO
+ altKey:NO
+ shiftKey:NO
+ metaKey:NO];
[target dispatchEvent:domEvent];
}