[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:30:38 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 7a4b7ce0e18665c23e58a70c871c5ae21b9a21fb
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Mar 24 16:23:00 2004 +0000

            Implemented the remainder of the HTML DOM API.
    
            Reviewed by Chris.
    
            * kwq/DOMHTML.h
            * kwq/HTMLDOM.mm
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6251 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7634aa4..0a81e80 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2004-03-24  Ken Kocienda <kocienda at apple.com>
+
+        Implemented the remainder of the HTML DOM API.
+    
+        Reviewed by Chris.
+    
+        * kwq/DOMHTML.h
+        * kwq/HTMLDOM.mm
+
 2004-03-23  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3487207, implement onscroll DOM event for elements with overflow:auto/scroll/hidden.  This does
diff --git a/WebCore/kwq/DOMHTML.h b/WebCore/kwq/DOMHTML.h
index a0e7462..38c76f7 100644
--- a/WebCore/kwq/DOMHTML.h
+++ b/WebCore/kwq/DOMHTML.h
@@ -39,6 +39,7 @@
 #import "DOMCore.h"
 
 @class DOMHTMLElement;
+ at class DOMHTMLFormElement;
 @class DOMHTMLTableCaptionElement;
 @class DOMHTMLTableSectionElement;
 
@@ -146,7 +147,7 @@
 @end
 
 @interface DOMHTMLIsIndexElement : DOMHTMLElement
-- (NSString *)form;
+- (DOMHTMLFormElement *)form;
 - (NSString *)prompt;
 - (void)setPrompt:(NSString *)prompt;
 @end
@@ -487,10 +488,10 @@
 - (void)setAlt:(NSString *)alt;
 - (NSString *)border;
 - (void)setBorder:(NSString *)border;
-- (NSString *)height;
-- (void)setHeight:(NSString *)height;
-- (NSString *)hspace;
-- (void)setHspace:(NSString *)hspace;
+- (long)height;
+- (void)setHeight:(long)height;
+- (long)hspace;
+- (void)setHspace:(long)hspace;
 - (BOOL)isMap;
 - (void)setIsMap:(BOOL)isMap;
 - (NSString *)longDesc;
@@ -499,10 +500,10 @@
 - (void)setSrc:(NSString *)src;
 - (NSString *)useMap;
 - (void)setUseMap:(NSString *)useMap;
-- (NSString *)vspace;
-- (void)setVspace:(NSString *)vspace;
-- (NSString *)width;
-- (void)setWidth:(NSString *)width;
+- (long)vspace;
+- (void)setVspace:(long)vspace;
+- (long)width;
+- (void)setWidth:(long)width;
 @end
 
 @interface DOMHTMLObjectElement : DOMHTMLElement
@@ -566,8 +567,6 @@
 - (void)setCode:(NSString *)code;
 - (NSString *)codeBase;
 - (void)setCodeBase:(NSString *)codeBase;
-- (NSString *)codeType;
-- (void)setCodeType:(NSString *)codeType;
 - (NSString *)height;
 - (void)setHeight:(NSString *)height;
 - (long)hspace;
diff --git a/WebCore/kwq/HTMLDOM.mm b/WebCore/kwq/HTMLDOM.mm
index e7e44e5..7184e2b 100644
--- a/WebCore/kwq/HTMLDOM.mm
+++ b/WebCore/kwq/HTMLDOM.mm
@@ -25,12 +25,22 @@
 
 #import "DOMHTML.h"
 
+#import <dom/dom_doc.h>
+#import <dom/dom_string.h>
 #import <dom/html_element.h>
+#import <dom/html_misc.h>
 #import <html/html_baseimpl.h>
+#import <html/html_blockimpl.h>
 #import <html/html_documentimpl.h>
 #import <html/html_elementimpl.h>
+#import <html/html_formimpl.h>
 #import <html/html_headimpl.h>
+#import <html/html_imageimpl.h>
+#import <html/html_inlineimpl.h>
+#import <html/html_listimpl.h>
 #import <html/html_miscimpl.h>
+#import <html/html_objectimpl.h>
+#import <html/html_tableimpl.h>
 #import <misc/htmlattrs.h>
 #import <xml/dom_elementimpl.h>
 #import <xml/dom_nodeimpl.h>
@@ -38,18 +48,65 @@
 #import "DOMInternal.h"
 #import "KWQAssertions.h"
 
+using DOM::Document;
+using DOM::DOMString;
 using DOM::ElementImpl;
+using DOM::HTMLAnchorElementImpl;
+using DOM::HTMLAppletElementImpl;
+using DOM::HTMLAreaElementImpl;
 using DOM::HTMLBaseElementImpl;
+using DOM::HTMLBaseFontElementImpl;
 using DOM::HTMLBodyElementImpl;
+using DOM::HTMLBRElementImpl;
+using DOM::HTMLButtonElementImpl;
 using DOM::HTMLCollectionImpl;
+using DOM::HTMLDirectoryElementImpl;
+using DOM::HTMLDivElementImpl;
+using DOM::HTMLDListElementImpl;
 using DOM::HTMLDocumentImpl;
 using DOM::HTMLElementImpl;
+using DOM::HTMLFieldSetElementImpl;
+using DOM::HTMLFontElementImpl;
+using DOM::HTMLFormCollectionImpl;
+using DOM::HTMLFormElementImpl;
+using DOM::HTMLFrameElementImpl;
+using DOM::HTMLFrameSetElementImpl;
+using DOM::HTMLGenericElementImpl;
+using DOM::HTMLGenericFormElementImpl;
 using DOM::HTMLHeadElementImpl;
+using DOM::HTMLHeadingElementImpl;
+using DOM::HTMLHRElementImpl;
 using DOM::HTMLHtmlElementImpl;
+using DOM::HTMLIFrameElementImpl;
+using DOM::HTMLImageElementImpl;
+using DOM::HTMLInputElementImpl;
+using DOM::HTMLIsIndexElementImpl;
+using DOM::HTMLLabelElementImpl;
+using DOM::HTMLLegendElementImpl;
+using DOM::HTMLLIElementImpl;
 using DOM::HTMLLinkElementImpl;
+using DOM::HTMLMapElementImpl;
+using DOM::HTMLMenuElementImpl;
 using DOM::HTMLMetaElementImpl;
+using DOM::HTMLObjectElementImpl;
+using DOM::HTMLOListElementImpl;
+using DOM::HTMLOptGroupElementImpl;
+using DOM::HTMLOptionElementImpl;
+using DOM::HTMLParagraphElementImpl;
+using DOM::HTMLParamElementImpl;
+using DOM::HTMLPreElementImpl;
+using DOM::HTMLScriptElementImpl;
+using DOM::HTMLSelectElementImpl;
 using DOM::HTMLStyleElementImpl;
+using DOM::HTMLTableElementImpl;
+using DOM::HTMLTableCaptionElementImpl;
+using DOM::HTMLTableCellElementImpl;
+using DOM::HTMLTableColElementImpl;
+using DOM::HTMLTableRowElementImpl;
+using DOM::HTMLTableSectionElementImpl;
+using DOM::HTMLTextAreaElementImpl;
 using DOM::HTMLTitleElementImpl;
+using DOM::HTMLUListElementImpl;
 using DOM::NameNodeListImpl;
 using DOM::NodeImpl;
 
@@ -62,6 +119,31 @@ using DOM::NodeImpl;
 - (HTMLElementImpl *)_HTMLElementImpl;
 @end;
 
+ at interface DOMHTMLFormElement (WebCoreInternal)
++ (DOMHTMLFormElement *)_formElementWithImpl:(HTMLFormElementImpl *)impl;
+ at end;
+
+ at interface DOMHTMLTableCaptionElement (WebCoreInternal)
++ (DOMHTMLTableCaptionElement *)_tableCaptionElementWithImpl:(HTMLTableCaptionElementImpl *)impl;
+- (HTMLTableCaptionElementImpl *)_tableCaptionElementImpl;
+ at end;
+
+ at interface DOMHTMLTableSectionElement (WebCoreInternal)
++ (DOMHTMLTableSectionElement *)_tableSectionElementWithImpl:(HTMLTableSectionElementImpl *)impl;
+- (HTMLTableSectionElementImpl *)_tableSectionElementImpl;
+ at end
+
+ at interface DOMHTMLTableElement (WebCoreInternal)
++ (DOMHTMLTableElement *)_tableElementWithImpl:(HTMLTableElementImpl *)impl;
+- (HTMLTableElementImpl *)_tableElementImpl;
+ at end
+
+ at interface DOMHTMLTableCellElement (WebCoreInternal)
++ (DOMHTMLTableCellElement *)_tableCellElementWithImpl:(HTMLTableCellElementImpl *)impl;
+ at end
+
+//------------------------------------------------------------------------------------------
+
 @implementation DOMHTMLCollection
 
 - (id)_initWithCollectionImpl:(HTMLCollectionImpl *)impl
@@ -110,6 +192,59 @@ using DOM::NodeImpl;
 
 @end
 
+#if 0
+//
+// We need to implement a khtml element to back this object 
+//
+ at implementation DOMHTMLOptionsCollection
+
+- (id)_initWithOptionsCollectionImpl:(HTMLOptionsCollectionImpl *)impl
+{
+    ASSERT(impl);
+    
+    [super _init];
+    _internal = reinterpret_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    setDOMWrapperForImpl(self, impl);
+    return self;
+}
+
++ (HTMLOptionsCollection *)_optionsCollectionWithImpl:(HTMLOptionsCollectionImpl *)impl
+{
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapperForImpl(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithOptionsCollectionImpl:impl] autorelease];
+}
+
+- (HTMLOptionsCollectionImpl *)_optionsCollectionImpl
+{
+    return reinterpret_cast<HTMLOptionsCollectionImpl *>(_internal);
+}
+
+- (unsigned long)length
+{
+    return [self _optionsCollectionImpl]->length();
+}
+
+- (DOMNode *)item:(unsigned long)index
+{
+    return [DOMNode _nodeWithImpl:[self _optionsCollectionImpl]->item(index)];
+}
+
+- (DOMNode *)namedItem:(NSString *)name
+{
+    return [DOMNode _nodeWithImpl:[self _optionsCollectionImpl]->namedItem(name)];
+}
+
+ at end
+#endif
+
 @implementation DOMHTMLElement
 
 - (id)_initWithElementImpl:(HTMLElementImpl *)impl
@@ -378,7 +513,12 @@ using DOM::NodeImpl;
 
 - (NSString *)href
 {
-    return [self _linkElementImpl]->getAttribute(ATTR_HREF);
+    DOMString s = [self _linkElementImpl]->getAttribute(ATTR_HREF);
+    if (!s.isNull()) {
+        Document doc([self _linkElementImpl]->getDocument());
+        s = doc.completeURL(s);
+    }
+    return s;
 }
 
 - (void)setHref:(NSString *)href
@@ -525,7 +665,12 @@ using DOM::NodeImpl;
 
 - (NSString *)href
 {
-    return [self _baseElementImpl]->getAttribute(ATTR_HREF);
+    DOMString s = [self _baseElementImpl]->getAttribute(ATTR_HREF);
+    if (!s.isNull()) {
+        Document doc([self _baseElementImpl]->getDocument());
+        s = doc.completeURL(s);
+    }
+    return s;
 }
 
 - (void)setHref:(NSString *)href
@@ -655,662 +800,681 @@ using DOM::NodeImpl;
 
 @implementation DOMHTMLFormElement
 
+- (id)_initWithFormElementImpl:(HTMLElementImpl *)impl
+{
+    ASSERT(impl);
+    
+    [super _init];
+    _internal = reinterpret_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    setDOMWrapperForImpl(self, impl);
+    return self;
+}
+
++ (DOMHTMLFormElement *)_formElementWithImpl:(HTMLFormElementImpl *)impl
+{
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapperForImpl(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithFormElementImpl:impl] autorelease];
+}
+
+- (HTMLFormElementImpl *)_formElementImpl
+{
+    return reinterpret_cast<HTMLFormElementImpl *>(_internal);
+}
+
 - (DOMHTMLCollection *)elements
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLCollectionImpl *collection = new HTMLFormCollectionImpl([self _formElementImpl]);
+    return [DOMHTMLCollection _collectionWithImpl:collection];
 }
 
 - (long)length
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _formElementImpl]->length();
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _formElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _formElementImpl]->setAttribute(ATTR_NAME, name);
 }
 
 - (NSString *)acceptCharset
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _formElementImpl]->getAttribute(ATTR_ACCEPT_CHARSET);
 }
 
 - (void)setAcceptCharset:(NSString *)acceptCharset
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _formElementImpl]->setAttribute(ATTR_ACCEPT_CHARSET, acceptCharset);
 }
 
 - (NSString *)action
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _formElementImpl]->getAttribute(ATTR_ACTION);
 }
 
 - (void)setAction:(NSString *)action
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _formElementImpl]->setAttribute(ATTR_ACTION, action);
 }
 
 - (NSString *)enctype
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _formElementImpl]->getAttribute(ATTR_ENCTYPE);
 }
 
 - (void)setEnctype:(NSString *)enctype
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _formElementImpl]->setAttribute(ATTR_ENCTYPE, enctype);
 }
 
 - (NSString *)method
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _formElementImpl]->getAttribute(ATTR_METHOD);
 }
 
 - (void)setMethod:(NSString *)method
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _formElementImpl]->setAttribute(ATTR_METHOD, method);
 }
 
 - (NSString *)target
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _formElementImpl]->getAttribute(ATTR_TARGET);
 }
 
 - (void)setTarget:(NSString *)target
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _formElementImpl]->setAttribute(ATTR_TARGET, target);
 }
 
 - (void)submit
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _formElementImpl]->submit(false);
 }
 
 - (void)reset
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _formElementImpl]->reset();
 }
 
 @end
 
 @implementation DOMHTMLIsIndexElement
 
-- (NSString *)form
+- (HTMLIsIndexElementImpl *)_isIndexElementImpl
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return reinterpret_cast<HTMLIsIndexElementImpl *>(_internal);
+}
+
+- (DOMHTMLFormElement *)form
+{
+    return [DOMHTMLFormElement _formElementWithImpl:[self _isIndexElementImpl]->form()];
 }
 
 - (NSString *)prompt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _isIndexElementImpl]->getAttribute(ATTR_PROMPT);
 }
 
 - (void)setPrompt:(NSString *)prompt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _isIndexElementImpl]->setAttribute(ATTR_PROMPT, prompt);
 }
 
 @end
 
 @implementation DOMHTMLSelectElement
 
+- (HTMLSelectElementImpl *)_selectElementImpl
+{
+    return reinterpret_cast<HTMLSelectElementImpl *>(_internal);
+}
+
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _selectElementImpl]->type();
 }
 
 - (long)selectedIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _selectElementImpl]->selectedIndex();
 }
 
 - (void)setSelectedIndex:(long)selectedIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->setSelectedIndex(selectedIndex);
 }
 
 - (NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _selectElementImpl]->value();
 }
 
 - (void)setValue:(NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString s(value);
+    [self _selectElementImpl]->setValue(s.implementation());
 }
 
 - (long)length
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _selectElementImpl]->length();
+}
+
+- (void)setLength:(long)length
+{
+    ASSERT_WITH_MESSAGE(0, "not implemented by khtml");
 }
 
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLFormElement _formElementWithImpl:[self _selectElementImpl]->form()];
 }
 
 - (DOMHTMLOptionsCollection *)options
 {
+    // We need to implement a khtml element to back the HTMLOptionsCollection object 
     ASSERT_WITH_MESSAGE(0, "not implemented");
     return nil;
 }
 
 - (BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return ![self _selectElementImpl]->getAttribute(ATTR_DISABLED).isNull();
 }
 
 - (void)setDisabled:(BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->setAttribute(ATTR_DISABLED, disabled ? "" : 0);
 }
 
 - (BOOL)multiple
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return ![self _selectElementImpl]->getAttribute(ATTR_MULTIPLE).isNull();
 }
 
 - (void)setMultiple:(BOOL)multiple
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->setAttribute(ATTR_MULTIPLE, multiple ? "" : 0);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _selectElementImpl]->name();
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->setName(name);
 }
 
 - (long)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _selectElementImpl]->getAttribute(ATTR_SIZE).toInt();
 }
 
 - (void)setSize:(long)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+	DOMString value(QString::number(size));
+    [self _selectElementImpl]->setAttribute(ATTR_SIZE, value);
 }
 
 - (long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _selectElementImpl]->tabIndex();
 }
 
 - (void)setTabIndex:(long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->setTabIndex(tabIndex);
 }
 
 - (void)add:(DOMHTMLElement *)element :(DOMHTMLElement *)before
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->add([element _HTMLElementImpl], [before _HTMLElementImpl]);
 }
 
 - (void)remove:(long)index
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->remove(index);
 }
 
 - (void)blur
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->blur();
 }
 
 - (void)focus
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _selectElementImpl]->focus();
 }
 
 @end
 
 @implementation DOMHTMLOptGroupElement
 
+- (HTMLOptGroupElementImpl *)_optGroupElementImpl
+{
+    return reinterpret_cast<HTMLOptGroupElementImpl *>(_internal);
+}
+
 - (BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return ![self _optGroupElementImpl]->getAttribute(ATTR_DISABLED).isNull();
 }
 
 - (void)setDisabled:(BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _optGroupElementImpl]->setAttribute(ATTR_DISABLED, disabled ? "" : 0);
 }
 
 - (NSString *)label
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _optGroupElementImpl]->getAttribute(ATTR_LABEL);
 }
 
 - (void)setLabel:(NSString *)label
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _optGroupElementImpl]->setAttribute(ATTR_LABEL, label);
 }
 
 @end
 
 @implementation DOMHTMLOptionElement
 
+- (HTMLOptionElementImpl *)_optionElementImpl
+{
+    return reinterpret_cast<HTMLOptionElementImpl *>(_internal);
+}
+
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLFormElement _formElementWithImpl:[self _optionElementImpl]->form()];
 }
 
 - (BOOL)defaultSelected
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return ![self _optionElementImpl]->getAttribute(ATTR_SELECTED).isNull();
 }
 
 - (void)setDefaultSelected:(BOOL)defaultSelected
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _optionElementImpl]->setAttribute(ATTR_SELECTED, defaultSelected ? "" : 0);
 }
 
 - (NSString *)text
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _optionElementImpl]->text();
 }
 
 - (long)index
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _optionElementImpl]->index();
 }
 
 - (BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return ![self _optionElementImpl]->getAttribute(ATTR_DISABLED).isNull();
 }
 
 - (void)setDisabled:(BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _optionElementImpl]->setAttribute(ATTR_DISABLED, disabled ? "" : 0);
 }
 
 - (NSString *)label
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _optionElementImpl]->getAttribute(ATTR_LABEL);
 }
 
 - (void)setLabel:(NSString *)label
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _optionElementImpl]->setAttribute(ATTR_LABEL, label);
 }
 
 - (BOOL)selected
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _optionElementImpl]->selected();
 }
 
 - (void)setSelected:(BOOL)selected
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _optionElementImpl]->setSelected(selected);
 }
 
 - (NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _optionElementImpl]->value();
 }
 
 - (void)setValue:(NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string = value;
+    [self _optionElementImpl]->setValue(string.implementation());
 }
 
 @end
 
 @implementation DOMHTMLInputElement
 
+- (HTMLInputElementImpl *)_inputElementImpl
+{
+    return reinterpret_cast<HTMLInputElementImpl *>(_internal);
+}
+
 - (NSString *)defaultValue
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->getAttribute(ATTR_VALUE);
 }
 
 - (void)setDefaultValue:(NSString *)defaultValue
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_VALUE, defaultValue);
 }
 
 - (BOOL)defaultChecked
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _inputElementImpl]->getAttribute(ATTR_CHECKED).isNull();
 }
 
 - (void)setDefaultChecked:(BOOL)defaultChecked
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_CHECKED, defaultChecked ? "" : 0);
 }
 
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLFormElement _formElementWithImpl:[self _inputElementImpl]->form()];
 }
 
 - (NSString *)accept
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->getAttribute(ATTR_ACCEPT);
 }
 
 - (void)setAccept:(NSString *)accept
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_ACCEPT, accept);
 }
 
 - (NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->getAttribute(ATTR_ACCESSKEY);
 }
 
 - (void)setAccessKey:(NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_ACCESSKEY, accessKey);
 }
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)alt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->getAttribute(ATTR_ALT);
 }
 
 - (void)setAlt:(NSString *)alt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_ALT, alt);
 }
 
 - (BOOL)checked
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _inputElementImpl]->checked();
 }
 
 - (void)setChecked:(BOOL)checked
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    return [self _inputElementImpl]->setChecked(checked);
 }
 
 - (BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _inputElementImpl]->getAttribute(ATTR_DISABLED).isNull();
 }
 
 - (void)setDisabled:(BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_DISABLED, disabled ? "" : 0);
 }
 
 - (long)maxLength
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _inputElementImpl]->getAttribute(ATTR_MAXLENGTH).toInt();
 }
 
 - (void)setMaxLength:(long)maxLength
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString value(QString::number(maxLength));
+    [self _inputElementImpl]->setAttribute(ATTR_MAXLENGTH, value);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->name();
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setName(name);
 }
 
 - (BOOL)readOnly
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _inputElementImpl]->getAttribute(ATTR_READONLY).isNull();
 }
 
 - (void)setReadOnly:(BOOL)readOnly
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_READONLY, readOnly ? "" : 0);
 }
 
 - (NSString *)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->getAttribute(ATTR_SIZE);
 }
 
 - (void)setSize:(NSString *)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_SIZE, size);
 }
 
 - (NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    DOMString s = [self _inputElementImpl]->getAttribute(ATTR_SRC);
+    if (!s.isNull()) {
+        Document doc([self _inputElementImpl]->getDocument());
+        s = doc.completeURL(s);
+    }
+    return s;
 }
 
 - (void)setSrc:(NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_SRC, src);
 }
 
 - (long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _inputElementImpl]->tabIndex();
 }
 
 - (void)setTabIndex:(long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setTabIndex(tabIndex);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->type();
 }
 
 - (void)setType:(NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setType(type);
 }
 
 - (NSString *)useMap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->getAttribute(ATTR_USEMAP);
 }
 
 - (void)setUseMap:(NSString *)useMap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setAttribute(ATTR_USEMAP, useMap);
 }
 
 - (NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _inputElementImpl]->value();
 }
 
 - (void)setValue:(NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->setValue(value);
 }
 
 - (void)blur
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->blur();
 }
 
 - (void)focus
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->focus();
 }
 
 - (void)select
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->select();
 }
 
 - (void)click
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _inputElementImpl]->click();
 }
 
 @end
 
 @implementation DOMHTMLTextAreaElement
 
+- (HTMLTextAreaElementImpl *)_textAreaElementImpl
+{
+    return reinterpret_cast<HTMLTextAreaElementImpl *>(_internal);
+}
+
 - (NSString *)defaultValue
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _textAreaElementImpl]->defaultValue();
 }
 
 - (void)setDefaultValue:(NSString *)defaultValue
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->setDefaultValue(defaultValue);
 }
 
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLFormElement _formElementWithImpl:[self _textAreaElementImpl]->form()];
 }
 
 - (NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _textAreaElementImpl]->getAttribute(ATTR_ACCESSKEY);
 }
 
 - (void)setAccessKey:(NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->setAttribute(ATTR_ACCESSKEY, accessKey);
 }
 
 - (long)cols
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _textAreaElementImpl]->getAttribute(ATTR_ACCESSKEY).toInt();
 }
 
 - (void)setCols:(long)cols
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+	DOMString value(QString::number(cols));
+    [self _textAreaElementImpl]->setAttribute(ATTR_COLS, value);
 }
 
 - (BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _textAreaElementImpl]->getAttribute(ATTR_DISABLED).isNull();
 }
 
 - (void)setDisabled:(BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->setAttribute(ATTR_DISABLED, disabled ? "" : 0);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _textAreaElementImpl]->name();
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->setName(name);
 }
 
 - (BOOL)readOnly
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _textAreaElementImpl]->getAttribute(ATTR_READONLY).isNull();
 }
 
 - (void)setReadOnly:(BOOL)readOnly
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->setAttribute(ATTR_READONLY, readOnly ? "" : 0);
 }
 
 - (long)rows
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _textAreaElementImpl]->getAttribute(ATTR_ROWS).toInt();
 }
 
 - (void)setRows:(long)rows
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+	DOMString value(QString::number(rows));
+    [self _textAreaElementImpl]->setAttribute(ATTR_ROWS, value);
 }
 
 - (long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _textAreaElementImpl]->tabIndex();
 }
 
 - (void)setTabIndex:(long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->setTabIndex(tabIndex);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _textAreaElementImpl]->type();
 }
 
 - (void)setType:(NSString *)type
@@ -1320,2245 +1484,2395 @@ using DOM::NodeImpl;
 
 - (NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _textAreaElementImpl]->value();
 }
 
 - (void)setValue:(NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->setValue(value);
 }
 
 - (void)blur
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->blur();
 }
 
 - (void)focus
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->focus();
 }
 
 - (void)select
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _textAreaElementImpl]->select();
 }
 
 @end
 
 @implementation DOMHTMLButtonElement
 
+- (HTMLButtonElementImpl *)_buttonElementImpl
+{
+    return reinterpret_cast<HTMLButtonElementImpl *>(_internal);
+}
+
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLFormElement _formElementWithImpl:[self _buttonElementImpl]->form()];
 }
 
 - (NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _buttonElementImpl]->getAttribute(ATTR_ACCESSKEY);
 }
 
 - (void)setAccessKey:(NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _buttonElementImpl]->setAttribute(ATTR_ACCESSKEY, accessKey);
 }
 
 - (BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _buttonElementImpl]->getAttribute(ATTR_DISABLED).isNull();
 }
 
 - (void)setDisabled:(BOOL)disabled
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _buttonElementImpl]->setAttribute(ATTR_DISABLED, disabled ? "" : 0);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _buttonElementImpl]->name();
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _buttonElementImpl]->setName(name);
 }
 
 - (long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _buttonElementImpl]->tabIndex();
 }
 
 - (void)setTabIndex:(long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _buttonElementImpl]->setTabIndex(tabIndex);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _buttonElementImpl]->type();
 }
 
 - (NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _buttonElementImpl]->getAttribute(ATTR_VALUE);
 }
 
 - (void)setValue:(NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _buttonElementImpl]->setAttribute(ATTR_VALUE, value);
 }
 
 @end
 
 @implementation DOMHTMLLabelElement
 
+- (HTMLLabelElementImpl *)_labelElementImpl
+{
+    return reinterpret_cast<HTMLLabelElementImpl *>(_internal);
+}
+
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    ElementImpl *formElement = [self _labelElementImpl]->formElement();
+    if (!formElement)
+        return 0;
+    return [DOMHTMLFormElement _formElementWithImpl:static_cast<HTMLGenericFormElementImpl *>(formElement)->form()];
 }
 
 - (NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _labelElementImpl]->getAttribute(ATTR_ACCESSKEY);
 }
 
 - (void)setAccessKey:(NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _labelElementImpl]->setAttribute(ATTR_ACCESSKEY, accessKey);
 }
 
 - (NSString *)htmlFor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _labelElementImpl]->getAttribute(ATTR_FOR);
 }
 
 - (void)setHtmlFor:(NSString *)htmlFor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _labelElementImpl]->setAttribute(ATTR_FOR, htmlFor);
 }
 
 @end
 
 @implementation DOMHTMLFieldSetElement
 
+- (HTMLFieldSetElementImpl *)_fieldSetElementImpl
+{
+    return reinterpret_cast<HTMLFieldSetElementImpl *>(_internal);
+}
+
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLFormElement _formElementWithImpl:[self _fieldSetElementImpl]->form()];
 }
 
 @end
 
 @implementation DOMHTMLLegendElement
 
+- (HTMLLegendElementImpl *)_legendElementImpl
+{
+    return reinterpret_cast<HTMLLegendElementImpl *>(_internal);
+}
+
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLFormElement _formElementWithImpl:[self _legendElementImpl]->form()];
 }
 
 - (NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _legendElementImpl]->getAttribute(ATTR_ACCESSKEY);
 }
 
 - (void)setAccessKey:(NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _legendElementImpl]->setAttribute(ATTR_ACCESSKEY, accessKey);
 }
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _legendElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _legendElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 @end
 
 @implementation DOMHTMLUListElement
 
+- (HTMLUListElementImpl *)_uListElementImpl
+{
+    return reinterpret_cast<HTMLUListElementImpl *>(_internal);
+}
+
 - (BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _uListElementImpl]->getAttribute(ATTR_COMPACT).isNull();
 }
 
 - (void)setCompact:(BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _uListElementImpl]->setAttribute(ATTR_COMPACT, compact ? "" : 0);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _uListElementImpl]->getAttribute(ATTR_TYPE);
 }
 
 - (void)setType:(NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _uListElementImpl]->setAttribute(ATTR_TYPE, type);
 }
 
 @end
 
 @implementation DOMHTMLOListElement
 
+- (HTMLOListElementImpl *)_oListElementImpl
+{
+    return reinterpret_cast<HTMLOListElementImpl *>(_internal);
+}
+
 - (BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _oListElementImpl]->getAttribute(ATTR_COMPACT).isNull();
 }
 
 - (void)setCompact:(BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _oListElementImpl]->setAttribute(ATTR_COMPACT, compact ? "" : 0);
 }
 
 - (long)start
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _oListElementImpl]->getAttribute(ATTR_START).toInt();
 }
 
 - (void)setStart:(long)start
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+	DOMString value(QString::number(start));
+    [self _oListElementImpl]->setAttribute(ATTR_START, value);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _oListElementImpl]->getAttribute(ATTR_TYPE);
 }
 
 - (void)setType:(NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _oListElementImpl]->setAttribute(ATTR_TYPE, type);
 }
 
 @end
 
 @implementation DOMHTMLDListElement
 
+- (HTMLDListElementImpl *)_dListElementImpl
+{
+    return reinterpret_cast<HTMLDListElementImpl *>(_internal);
+}
+
 - (BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _dListElementImpl]->getAttribute(ATTR_COMPACT).isNull();
 }
 
 - (void)setCompact:(BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _dListElementImpl]->setAttribute(ATTR_COMPACT, compact ? "" : 0);
 }
 
 @end
 
 @implementation DOMHTMLDirectoryElement
 
+- (HTMLDirectoryElementImpl *)_directoryListElementImpl
+{
+    return reinterpret_cast<HTMLDirectoryElementImpl *>(_internal);
+}
+
 - (BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _directoryListElementImpl]->getAttribute(ATTR_COMPACT).isNull();
 }
 
 - (void)setCompact:(BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _directoryListElementImpl]->setAttribute(ATTR_COMPACT, compact ? "" : 0);
 }
 
 @end
 
 @implementation DOMHTMLMenuElement
 
+- (HTMLMenuElementImpl *)_menuListElementImpl
+{
+    return reinterpret_cast<HTMLMenuElementImpl *>(_internal);
+}
+
 - (BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _menuListElementImpl]->getAttribute(ATTR_COMPACT).isNull();
 }
 
 - (void)setCompact:(BOOL)compact
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _menuListElementImpl]->setAttribute(ATTR_COMPACT, compact ? "" : 0);
 }
 
 @end
 
 @implementation DOMHTMLLIElement
 
+- (HTMLLIElementImpl *)_liElementImpl
+{
+    return reinterpret_cast<HTMLLIElementImpl *>(_internal);
+}
+
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _liElementImpl]->getAttribute(ATTR_TYPE);
 }
 
 - (void)setType:(NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _liElementImpl]->setAttribute(ATTR_TYPE, type);
 }
 
 - (long)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _liElementImpl]->getAttribute(ATTR_START).toInt();
 }
 
 - (void)setValue:(long)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+	DOMString string(QString::number(value));
+    [self _liElementImpl]->setAttribute(ATTR_VALUE, string);
 }
 
 @end
 
- at implementation DOMHTMLDivElement
+ at implementation DOMHTMLQuoteElement
 
-- (NSString *)align
+- (HTMLGenericElementImpl *)_quoteElementImpl
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return reinterpret_cast<HTMLGenericElementImpl *>(_internal);
 }
 
-- (void)setAlign:(NSString *)align
+- (NSString *)cite
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    return [self _quoteElementImpl]->getAttribute(ATTR_CITE);
+}
+
+- (void)setCite:(NSString *)cite
+{
+    [self _quoteElementImpl]->setAttribute(ATTR_CITE, cite);
 }
 
 @end
 
- at implementation DOMHTMLParagraphElement
+ at implementation DOMHTMLDivElement
+
+- (HTMLDivElementImpl *)_divElementImpl
+{
+    return reinterpret_cast<HTMLDivElementImpl *>(_internal);
+}
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _divElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _divElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 @end
 
- at implementation DOMHTMLHeadingElement
+ at implementation DOMHTMLParagraphElement
+
+- (HTMLParagraphElementImpl *)_paragraphElementImpl
+{
+    return reinterpret_cast<HTMLParagraphElementImpl *>(_internal);
+}
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _paragraphElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _paragraphElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 @end
 
- at implementation DOMHTMLQuoteElement
+ at implementation DOMHTMLHeadingElement
 
-- (NSString *)cite
+- (HTMLHeadingElementImpl *)_headingElementImpl
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return reinterpret_cast<HTMLHeadingElementImpl *>(_internal);
 }
 
-- (void)setCite:(NSString *)cite
+- (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    return [self _headingElementImpl]->getAttribute(ATTR_ALIGN);
+}
+
+- (void)setAlign:(NSString *)align
+{
+    [self _headingElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 @end
 
 @implementation DOMHTMLPreElement
 
+- (HTMLPreElementImpl *)_preElementImpl
+{
+    return reinterpret_cast<HTMLPreElementImpl *>(_internal);
+}
+
 - (long)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _preElementImpl]->getAttribute(ATTR_WIDTH).toInt();
 }
 
 - (void)setWidth:(long)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+	DOMString string(QString::number(width));
+    [self _preElementImpl]->setAttribute(ATTR_WIDTH, string);
 }
 
 @end
 
 @implementation DOMHTMLBRElement
 
+- (HTMLBRElementImpl *)_BRElementImpl
+{
+    return reinterpret_cast<HTMLBRElementImpl *>(_internal);
+}
+
 - (NSString *)clear
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _BRElementImpl]->getAttribute(ATTR_CLEAR);
 }
 
 - (void)setClear:(NSString *)clear
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _BRElementImpl]->setAttribute(ATTR_CLEAR, clear);
 }
 
 @end
 
 @implementation DOMHTMLBaseFontElement
 
+- (HTMLBaseFontElementImpl *)_baseFontElementImpl
+{
+    return reinterpret_cast<HTMLBaseFontElementImpl *>(_internal);
+}
+
 - (NSString *)color
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _baseFontElementImpl]->getAttribute(ATTR_COLOR);
 }
 
 - (void)setColor:(NSString *)color
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _baseFontElementImpl]->setAttribute(ATTR_COLOR, color);
 }
 
 - (NSString *)face
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _baseFontElementImpl]->getAttribute(ATTR_FACE);
 }
 
 - (void)setFace:(NSString *)face
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _baseFontElementImpl]->setAttribute(ATTR_FACE, face);
 }
 
 - (NSString *)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _baseFontElementImpl]->getAttribute(ATTR_SIZE);
 }
 
 - (void)setSize:(NSString *)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _baseFontElementImpl]->setAttribute(ATTR_SIZE, size);
 }
 
 @end
 
 @implementation DOMHTMLFontElement
 
+- (HTMLFontElementImpl *)_fontElementImpl
+{
+    return reinterpret_cast<HTMLFontElementImpl *>(_internal);
+}
+
 - (NSString *)color
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _fontElementImpl]->getAttribute(ATTR_COLOR);
 }
 
 - (void)setColor:(NSString *)color
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _fontElementImpl]->setAttribute(ATTR_COLOR, color);
 }
 
 - (NSString *)face
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _fontElementImpl]->getAttribute(ATTR_FACE);
 }
 
 - (void)setFace:(NSString *)face
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _fontElementImpl]->setAttribute(ATTR_FACE, face);
 }
 
 - (NSString *)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _fontElementImpl]->getAttribute(ATTR_SIZE);
 }
 
 - (void)setSize:(NSString *)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _fontElementImpl]->setAttribute(ATTR_SIZE, size);
 }
 
 @end
 
 @implementation DOMHTMLHRElement
 
+- (HTMLHRElementImpl *)_HRElementImpl
+{
+    return reinterpret_cast<HTMLHRElementImpl *>(_internal);
+}
+
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _HRElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _HRElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (BOOL)noShade
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _HRElementImpl]->getAttribute(ATTR_NOSHADE).isNull();
 }
 
 - (void)setNoShade:(BOOL)noShade
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _HRElementImpl]->setAttribute(ATTR_CHECKED, noShade ? "" : 0);
 }
 
 - (NSString *)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _HRElementImpl]->getAttribute(ATTR_SIZE);
 }
 
 - (void)setSize:(NSString *)size
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _HRElementImpl]->setAttribute(ATTR_SIZE, size);
 }
 
 - (NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _HRElementImpl]->getAttribute(ATTR_WIDTH);
 }
 
 - (void)setWidth:(NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _HRElementImpl]->setAttribute(ATTR_WIDTH, width);
 }
 
 @end
 
 @implementation DOMHTMLModElement
 
+- (HTMLElementImpl *)_modElementImpl
+{
+    return reinterpret_cast<HTMLElementImpl *>(_internal);
+}
+
 - (NSString *)cite
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _modElementImpl]->getAttribute(ATTR_CITE);
 }
 
 - (void)setCite:(NSString *)cite
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _modElementImpl]->setAttribute(ATTR_CITE, cite);
 }
 
 - (NSString *)dateTime
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _modElementImpl]->getAttribute(ATTR_DATETIME);
 }
 
 - (void)setDateTime:(NSString *)dateTime
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _modElementImpl]->setAttribute(ATTR_DATETIME, dateTime);
 }
 
 @end
 
 @implementation DOMHTMLAnchorElement
 
+- (HTMLAnchorElementImpl *)_anchorElementImpl
+{
+    return reinterpret_cast<HTMLAnchorElementImpl *>(_internal);
+}
+
 - (NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_ACCESSKEY);
 }
 
 - (void)setAccessKey:(NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_ACCESSKEY, accessKey);
 }
 
 - (NSString *)charset
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_CHARSET);
 }
 
 - (void)setCharset:(NSString *)charset
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_CHARSET, charset);
 }
 
 - (NSString *)coords
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_COORDS);
 }
 
 - (void)setCoords:(NSString *)coords
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_COORDS, coords);
 }
 
 - (NSString *)href
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    DOMString s = [self _anchorElementImpl]->getAttribute(ATTR_HREF);
+    if (!s.isNull()) {
+        Document doc([self _anchorElementImpl]->getDocument());
+        s = doc.completeURL(s);
+    }
+    return s;
 }
 
 - (void)setHref:(NSString *)href
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_HREF, href);
 }
 
 - (NSString *)hreflang
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_HREFLANG);
 }
 
 - (void)setHreflang:(NSString *)hreflang
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_HREFLANG, hreflang);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_NAME, name);
 }
 
 - (NSString *)rel
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_REL);
 }
 
 - (void)setRel:(NSString *)rel
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_REL, rel);
 }
 
 - (NSString *)rev
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_REV);
 }
 
 - (void)setRev:(NSString *)rev
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_REV, rev);
 }
 
 - (NSString *)shape
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_SHAPE);
 }
 
 - (void)setShape:(NSString *)shape
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_SHAPE, shape);
 }
 
 - (long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _anchorElementImpl]->getAttribute(ATTR_TABINDEX).toInt();
 }
 
 - (void)setTabIndex:(long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+	DOMString string(QString::number(tabIndex));
+    [self _anchorElementImpl]->setAttribute(ATTR_TABINDEX, string);
 }
 
 - (NSString *)target
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_TARGET);
 }
 
 - (void)setTarget:(NSString *)target
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_TARGET, target);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _anchorElementImpl]->getAttribute(ATTR_TYPE);
 }
 
 - (void)setType:(NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _anchorElementImpl]->setAttribute(ATTR_TYPE, type);
 }
 
 - (void)blur
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    HTMLAnchorElementImpl *impl = [self _anchorElementImpl];
+    if (impl->getDocument()->focusNode() == impl)
+        impl->getDocument()->setFocusNode(0);
 }
 
 - (void)focus
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    HTMLAnchorElementImpl *impl = [self _anchorElementImpl];
+    impl->getDocument()->setFocusNode(static_cast<ElementImpl*>(impl));
 }
 
 @end
 
 @implementation DOMHTMLImageElement
 
+- (HTMLImageElementImpl *)_imageElementImpl
+{
+    return reinterpret_cast<HTMLImageElementImpl *>(_internal);
+}
+
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _imageElementImpl]->setAttribute(ATTR_NAME, name);
 }
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _imageElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)alt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_ALT);
 }
 
 - (void)setAlt:(NSString *)alt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _imageElementImpl]->setAttribute(ATTR_ALT, alt);
 }
 
 - (NSString *)border
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_BORDER);
 }
 
 - (void)setBorder:(NSString *)border
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _imageElementImpl]->setAttribute(ATTR_BORDER, border);
 }
 
-- (NSString *)height
+- (long)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_HEIGHT).toInt();
 }
 
-- (void)setHeight:(NSString *)height
+- (void)setHeight:(long)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(height));
+    [self _imageElementImpl]->setAttribute(ATTR_HEIGHT, string);
 }
 
-- (NSString *)hspace
+- (long)hspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_HSPACE).toInt();
 }
 
-- (void)setHspace:(NSString *)hspace
+- (void)setHspace:(long)hspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(hspace));
+    [self _imageElementImpl]->setAttribute(ATTR_HSPACE, string);
 }
 
 - (BOOL)isMap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _imageElementImpl]->getAttribute(ATTR_ISMAP).isNull();
 }
 
 - (void)setIsMap:(BOOL)isMap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _imageElementImpl]->setAttribute(ATTR_ISMAP, isMap ? "" : 0);
 }
 
 - (NSString *)longDesc
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_LONGDESC);
 }
 
 - (void)setLongDesc:(NSString *)longDesc
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _imageElementImpl]->setAttribute(ATTR_LONGDESC, longDesc);
 }
 
 - (NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    DOMString s = [self _imageElementImpl]->getAttribute(ATTR_SRC);
+    if (!s.isNull()) {
+        Document doc([self _imageElementImpl]->getDocument());
+        s = doc.completeURL(s);
+    }
+    return s;
 }
 
 - (void)setSrc:(NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _imageElementImpl]->setAttribute(ATTR_SRC, src);
 }
 
 - (NSString *)useMap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_USEMAP);
 }
 
 - (void)setUseMap:(NSString *)useMap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _imageElementImpl]->setAttribute(ATTR_USEMAP, useMap);
 }
 
-- (NSString *)vspace
+- (long)vspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_VSPACE).toInt();
 }
 
-- (void)setVspace:(NSString *)vspace
+- (void)setVspace:(long)vspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(vspace));
+    [self _imageElementImpl]->setAttribute(ATTR_VSPACE, string);
 }
 
-- (NSString *)width
+- (long)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _imageElementImpl]->getAttribute(ATTR_WIDTH).toInt();
 }
 
-- (void)setWidth:(NSString *)width
+- (void)setWidth:(long)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(width));
+    [self _imageElementImpl]->setAttribute(ATTR_WIDTH, string);
 }
 
 @end
 
 @implementation DOMHTMLObjectElement
 
+- (HTMLObjectElementImpl *)_objectElementImpl
+{
+    return reinterpret_cast<HTMLObjectElementImpl *>(_internal);
+}
+
 - (DOMHTMLFormElement *)form
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLFormElement _formElementWithImpl:[self _objectElementImpl]->form()];
 }
 
 - (NSString *)code
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_CODE);
 }
 
 - (void)setCode:(NSString *)code
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_CODE, code);
 }
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)archive
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_ARCHIVE);
 }
 
 - (void)setArchive:(NSString *)archive
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_ARCHIVE, archive);
 }
 
 - (NSString *)border
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_BORDER);
 }
 
 - (void)setBorder:(NSString *)border
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_BORDER, border);
 }
 
 - (NSString *)codeBase
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_CODEBASE);
 }
 
 - (void)setCodeBase:(NSString *)codeBase
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_CODEBASE, codeBase);
 }
 
 - (NSString *)codeType
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_CODETYPE);
 }
 
 - (void)setCodeType:(NSString *)codeType
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_CODETYPE, codeType);
 }
 
 - (NSString *)data
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_DATA);
 }
 
 - (void)setData:(NSString *)data
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_DATA, data);
 }
 
 - (BOOL)declare
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _objectElementImpl]->getAttribute(ATTR_DECLARE).isNull();
 }
 
 - (void)setDeclare:(BOOL)declare
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_DECLARE, declare ? "" : 0);
 }
 
 - (NSString *)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_HEIGHT);
 }
 
 - (void)setHeight:(NSString *)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_HEIGHT, height);
 }
 
 - (long)hspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_HSPACE).toInt();
 }
 
 - (void)setHspace:(long)hspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(hspace));
+    [self _objectElementImpl]->setAttribute(ATTR_HSPACE, string);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_NAME, name);
 }
 
 - (NSString *)standby
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_STANDBY);
 }
 
 - (void)setStandby:(NSString *)standby
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_STANDBY, standby);
 }
 
 - (long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _objectElementImpl]->getAttribute(ATTR_TABINDEX).toInt();
 }
 
 - (void)setTabIndex:(long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(tabIndex));
+    [self _objectElementImpl]->setAttribute(ATTR_TABINDEX, string);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_TYPE);
 }
 
 - (void)setType:(NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_TYPE, type);
 }
 
 - (NSString *)useMap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_USEMAP);
 }
 
 - (void)setUseMap:(NSString *)useMap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_USEMAP, useMap);
 }
 
 - (long)vspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _objectElementImpl]->getAttribute(ATTR_VSPACE).toInt();
 }
 
 - (void)setVspace:(long)vspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(vspace));
+    [self _objectElementImpl]->setAttribute(ATTR_VSPACE, string);
 }
 
 - (NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _objectElementImpl]->getAttribute(ATTR_WIDTH);
 }
 
 - (void)setWidth:(NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _objectElementImpl]->setAttribute(ATTR_WIDTH, width);
 }
 
 - (DOMDocument *)contentDocument
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMDocument _documentWithImpl:[self _objectElementImpl]->contentDocument()];
 }
 
 @end
 
 @implementation DOMHTMLParamElement
 
+- (HTMLParamElementImpl *)_paramElementImpl
+{
+    return reinterpret_cast<HTMLParamElementImpl *>(_internal);
+}
+
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _paramElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _paramElementImpl]->setAttribute(ATTR_NAME, name);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _paramElementImpl]->getAttribute(ATTR_TYPE);
 }
 
 - (void)setType:(NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _paramElementImpl]->setAttribute(ATTR_TYPE, type);
 }
 
 - (NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _paramElementImpl]->getAttribute(ATTR_VALUE);
 }
 
 - (void)setValue:(NSString *)value
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _paramElementImpl]->setAttribute(ATTR_VALUE, value);
 }
 
 - (NSString *)valueType
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _paramElementImpl]->getAttribute(ATTR_VALUETYPE);
 }
 
 - (void)setValueType:(NSString *)valueType
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _paramElementImpl]->setAttribute(ATTR_VALUETYPE, valueType);
 }
 
 @end
 
 @implementation DOMHTMLAppletElement
 
+- (HTMLAppletElementImpl *)_appletElementImpl
+{
+    return reinterpret_cast<HTMLAppletElementImpl *>(_internal);
+}
+
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)alt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_ALT);
 }
 
 - (void)setAlt:(NSString *)alt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_ALT, alt);
 }
 
 - (NSString *)archive
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_ARCHIVE);
 }
 
 - (void)setArchive:(NSString *)archive
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_ARCHIVE, archive);
 }
 
 - (NSString *)code
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_CODE);
 }
 
 - (void)setCode:(NSString *)code
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_CODE, code);
 }
 
 - (NSString *)codeBase
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_CODEBASE);
 }
 
 - (void)setCodeBase:(NSString *)codeBase
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-}
-
-- (NSString *)codeType
-{
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
-}
-
-- (void)setCodeType:(NSString *)codeType
-{
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_CODEBASE, codeBase);
 }
 
 - (NSString *)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_HEIGHT);
 }
 
 - (void)setHeight:(NSString *)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_HEIGHT, height);
 }
 
 - (long)hspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_HSPACE).toInt();
 }
 
 - (void)setHspace:(long)hspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(hspace));
+    [self _appletElementImpl]->setAttribute(ATTR_HSPACE, string);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_NAME, name);
 }
 
 - (NSString *)object
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_OBJECT);
 }
 
 - (void)setObject:(NSString *)object
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_OBJECT, object);
 }
 
 - (long)vspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_VSPACE).toInt();
 }
 
 - (void)setVspace:(long)vspace
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(vspace));
+    [self _appletElementImpl]->setAttribute(ATTR_VSPACE, string);
 }
 
 - (NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _appletElementImpl]->getAttribute(ATTR_WIDTH);
 }
 
 - (void)setWidth:(NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _appletElementImpl]->setAttribute(ATTR_WIDTH, width);
 }
 
 @end
 
 @implementation DOMHTMLMapElement
 
+- (HTMLMapElementImpl *)_mapElementImpl
+{
+    return reinterpret_cast<HTMLMapElementImpl *>(_internal);
+}
+
 - (DOMHTMLCollection *)areas
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLCollectionImpl *collection = new HTMLCollectionImpl([self _mapElementImpl], HTMLCollectionImpl::MAP_AREAS);
+    return [DOMHTMLCollection _collectionWithImpl:collection];
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _mapElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _mapElementImpl]->setAttribute(ATTR_NAME, name);
 }
 
 @end
 
 @implementation DOMHTMLAreaElement
 
+- (HTMLAreaElementImpl *)_areaElementImpl
+{
+    return reinterpret_cast<HTMLAreaElementImpl *>(_internal);
+}
+
 - (NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _areaElementImpl]->getAttribute(ATTR_ACCESSKEY);
 }
 
 - (void)setAccessKey:(NSString *)accessKey
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _areaElementImpl]->setAttribute(ATTR_ACCESSKEY, accessKey);
 }
 
 - (NSString *)alt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _areaElementImpl]->getAttribute(ATTR_ALT);
 }
 
 - (void)setAlt:(NSString *)alt
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _areaElementImpl]->setAttribute(ATTR_ALT, alt);
 }
 
 - (NSString *)coords
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _areaElementImpl]->getAttribute(ATTR_COORDS);
 }
 
 - (void)setCoords:(NSString *)coords
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _areaElementImpl]->setAttribute(ATTR_COORDS, coords);
 }
 
 - (NSString *)href
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    DOMString s = [self _areaElementImpl]->getAttribute(ATTR_HREF);
+    if (!s.isNull()) {
+        Document doc([self _areaElementImpl]->getDocument());
+        s = doc.completeURL(s);
+    }
+    return s;
 }
 
 - (void)setHref:(NSString *)href
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _areaElementImpl]->setAttribute(ATTR_HREF, href);
 }
 
 - (BOOL)noHref
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _areaElementImpl]->getAttribute(ATTR_NOHREF).isNull();
 }
 
 - (void)setNoHref:(BOOL)noHref
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _areaElementImpl]->setAttribute(ATTR_NOHREF, noHref ? "" : 0);
 }
 
 - (NSString *)shape
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _areaElementImpl]->getAttribute(ATTR_SHAPE);
 }
 
 - (void)setShape:(NSString *)shape
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _areaElementImpl]->setAttribute(ATTR_SHAPE, shape);
 }
 
 - (long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _areaElementImpl]->getAttribute(ATTR_TABINDEX).toInt();
 }
 
 - (void)setTabIndex:(long)tabIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(tabIndex));
+    [self _areaElementImpl]->setAttribute(ATTR_TABINDEX, string);
 }
 
 - (NSString *)target
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _areaElementImpl]->getAttribute(ATTR_TARGET);
 }
 
 - (void)setTarget:(NSString *)target
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _areaElementImpl]->setAttribute(ATTR_TARGET, target);
 }
 
 @end
 
 @implementation DOMHTMLScriptElement
 
+- (HTMLScriptElementImpl *)_scriptElementImpl
+{
+    return reinterpret_cast<HTMLScriptElementImpl *>(_internal);
+}
+
 - (NSString *)text
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _scriptElementImpl]->getAttribute(ATTR_TEXT);
 }
 
 - (void)setText:(NSString *)text
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _scriptElementImpl]->setAttribute(ATTR_TEXT, text);
 }
 
 - (NSString *)htmlFor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    ASSERT_WITH_MESSAGE(0, "not implemented by khtml");
     return nil;
 }
 
 - (void)setHtmlFor:(NSString *)htmlFor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    ASSERT_WITH_MESSAGE(0, "not implemented by khtml");
 }
 
 - (NSString *)event
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    ASSERT_WITH_MESSAGE(0, "not implemented by khtml");
     return nil;
 }
 
 - (void)setEvent:(NSString *)event
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    ASSERT_WITH_MESSAGE(0, "not implemented by khtml");
 }
 
 - (NSString *)charset
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _scriptElementImpl]->getAttribute(ATTR_CHARSET);
 }
 
 - (void)setCharset:(NSString *)charset
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _scriptElementImpl]->setAttribute(ATTR_CHARSET, charset);
 }
 
 - (BOOL)defer
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _scriptElementImpl]->getAttribute(ATTR_DEFER).isNull();
 }
 
 - (void)setDefer:(BOOL)defer
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _scriptElementImpl]->setAttribute(ATTR_DEFER, defer ? "" : 0);
 }
 
 - (NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _scriptElementImpl]->getAttribute(ATTR_SRC);
 }
 
 - (void)setSrc:(NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _scriptElementImpl]->setAttribute(ATTR_SRC, src);
 }
 
 - (NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _scriptElementImpl]->getAttribute(ATTR_TYPE);
 }
 
 - (void)setType:(NSString *)type
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _scriptElementImpl]->setAttribute(ATTR_TYPE, type);
 }
 
 @end
 
 @implementation DOMHTMLTableCaptionElement
 
+- (id)_initWithTableCaptionElement:(HTMLTableCaptionElementImpl *)impl
+{
+    ASSERT(impl);
+    
+    [super _init];
+    _internal = reinterpret_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    setDOMWrapperForImpl(self, impl);
+    return self;
+}
+
++ (DOMHTMLTableCaptionElement *)_tableCaptionElementWithImpl:(HTMLTableCaptionElementImpl *)impl
+{
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapperForImpl(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithTableCaptionElement:impl] autorelease];
+}
+
+- (HTMLTableCaptionElementImpl *)_tableCaptionElementImpl
+{
+    return reinterpret_cast<HTMLTableCaptionElementImpl *>(_internal);
+}
+
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCaptionElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCaptionElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 @end
 
 @implementation DOMHTMLTableSectionElement
 
+- (id)_initWithTableSectionElement:(HTMLTableSectionElementImpl *)impl
+{
+    ASSERT(impl);
+    
+    [super _init];
+    _internal = reinterpret_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    setDOMWrapperForImpl(self, impl);
+    return self;
+}
+
++ (DOMHTMLTableSectionElement *)_tableSectionElementWithImpl:(HTMLTableSectionElementImpl *)impl
+{
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapperForImpl(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithTableSectionElement:impl] autorelease];
+}
+
+- (HTMLTableSectionElementImpl *)_tableSectionElementImpl
+{
+    return reinterpret_cast<HTMLTableSectionElementImpl *>(_internal);
+}
+
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableSectionElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableSectionElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)ch
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableSectionElementImpl]->getAttribute(ATTR_CHAR);
 }
 
 - (void)setCh:(NSString *)ch
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableSectionElementImpl]->setAttribute(ATTR_CHAR, ch);
 }
 
 - (NSString *)chOff
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableSectionElementImpl]->getAttribute(ATTR_CHAROFF);
 }
 
 - (void)setChOff:(NSString *)chOff
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableSectionElementImpl]->setAttribute(ATTR_CHAROFF, chOff);
 }
 
 - (NSString *)vAlign
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableSectionElementImpl]->getAttribute(ATTR_VALIGN);
 }
 
 - (void)setVAlign:(NSString *)vAlign
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableSectionElementImpl]->setAttribute(ATTR_VALIGN, vAlign);
 }
 
 - (DOMHTMLCollection *)rows
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLCollectionImpl *collection = new HTMLCollectionImpl([self _tableSectionElementImpl], HTMLCollectionImpl::TABLE_ROWS);
+    return [DOMHTMLCollection _collectionWithImpl:collection];
 }
 
 - (DOMHTMLElement *)insertRow:(long)index
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    int exceptioncode = 0;
+    HTMLTableElementImpl *impl = static_cast<HTMLTableElementImpl *>([self _tableSectionElementImpl]->insertRow(index, exceptioncode));
+    raiseOnDOMError(exceptioncode);
+    return [DOMHTMLTableElement _tableElementWithImpl:impl];
 }
 
 - (void)deleteRow:(long)index
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    int exceptioncode = 0;
+    [self _tableSectionElementImpl]->deleteRow(index, exceptioncode);
+    raiseOnDOMError(exceptioncode);
 }
 
 @end
 
 @implementation DOMHTMLTableElement
 
+- (id)_initWithTableElement:(HTMLTableElementImpl *)impl
+{
+    ASSERT(impl);
+    
+    [super _init];
+    _internal = reinterpret_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    setDOMWrapperForImpl(self, impl);
+    return self;
+}
+
++ (DOMHTMLTableElement *)_tableElementWithImpl:(HTMLTableElementImpl *)impl
+{
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapperForImpl(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithTableElement:impl] autorelease];
+}
+
+- (HTMLTableElementImpl *)_tableElementImpl
+{
+    return reinterpret_cast<HTMLTableElementImpl *>(_internal);
+}
+
 - (DOMHTMLTableCaptionElement *)caption
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLTableCaptionElement _tableCaptionElementWithImpl:[self _tableElementImpl]->caption()];
 }
 
 - (void)setCaption:(DOMHTMLTableCaptionElement *)caption
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setCaption([caption _tableCaptionElementImpl]);
 }
 
 - (DOMHTMLTableSectionElement *)tHead
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLTableSectionElement _tableSectionElementWithImpl:[self _tableElementImpl]->tHead()];
 }
 
 - (void)setTHead:(DOMHTMLTableSectionElement *)tHead
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setTHead([tHead _tableSectionElementImpl]);
 }
 
 - (DOMHTMLTableSectionElement *)tFoot
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMHTMLTableSectionElement _tableSectionElementWithImpl:[self _tableElementImpl]->tFoot()];
 }
 
 - (void)setTFoot:(DOMHTMLTableSectionElement *)tFoot
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setTFoot([tFoot _tableSectionElementImpl]);
 }
 
 - (DOMHTMLCollection *)rows
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLCollectionImpl *collection = new HTMLCollectionImpl([self _tableElementImpl], HTMLCollectionImpl::TABLE_ROWS);
+    return [DOMHTMLCollection _collectionWithImpl:collection];
 }
 
 - (DOMHTMLCollection *)tBodies
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLCollectionImpl *collection = new HTMLCollectionImpl([self _tableElementImpl], HTMLCollectionImpl::TABLE_TBODIES);
+    return [DOMHTMLCollection _collectionWithImpl:collection];
 }
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)bgColor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_BGCOLOR);
 }
 
 - (void)setBgColor:(NSString *)bgColor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_BGCOLOR, bgColor);
 }
 
 - (NSString *)border
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_BORDER);
 }
 
 - (void)setBorder:(NSString *)border
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_BORDER, border);
 }
 
 - (NSString *)cellPadding
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_CELLPADDING);
 }
 
 - (void)setCellPadding:(NSString *)cellPadding
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_CELLPADDING, cellPadding);
 }
 
 - (NSString *)cellSpacing
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_CELLSPACING);
 }
 
 - (void)setCellSpacing:(NSString *)cellSpacing
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_CELLSPACING, cellSpacing);
 }
 
 - (NSString *)frame
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_FRAME);
 }
 
 - (void)setFrame:(NSString *)frame
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_FRAME, frame);
 }
 
 - (NSString *)rules
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_RULES);
 }
 
 - (void)setRules:(NSString *)rules
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_RULES, rules);
 }
 
 - (NSString *)summary
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_SUMMARY);
 }
 
 - (void)setSummary:(NSString *)summary
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_SUMMARY, summary);
 }
 
 - (NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableElementImpl]->getAttribute(ATTR_WIDTH);
 }
 
 - (void)setWidth:(NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->setAttribute(ATTR_WIDTH, width);
 }
 
 - (DOMHTMLElement *)createTHead
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLTableSectionElementImpl *impl = static_cast<HTMLTableSectionElementImpl *>([self _tableElementImpl]->createTHead());
+    return [DOMHTMLTableSectionElement _tableSectionElementWithImpl:impl];
 }
 
 - (void)deleteTHead
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->deleteTHead();
 }
 
 - (DOMHTMLElement *)createTFoot
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLTableSectionElementImpl *impl = static_cast<HTMLTableSectionElementImpl *>([self _tableElementImpl]->createTFoot());
+    return [DOMHTMLTableSectionElement _tableSectionElementWithImpl:impl];
 }
 
 - (void)deleteTFoot
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->deleteTFoot();
 }
 
 - (DOMHTMLElement *)createCaption
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLTableCaptionElementImpl *impl = static_cast<HTMLTableCaptionElementImpl *>([self _tableElementImpl]->createCaption());
+    return [DOMHTMLTableCaptionElement _tableCaptionElementWithImpl:impl];
 }
 
 - (void)deleteCaption
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableElementImpl]->deleteCaption();
 }
 
 - (DOMHTMLElement *)insertRow:(long)index
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");    return nil;
+    int exceptioncode = 0;
+    HTMLTableElementImpl *impl = static_cast<HTMLTableElementImpl *>([self _tableElementImpl]->insertRow(index, exceptioncode));
+    raiseOnDOMError(exceptioncode);
+    return [DOMHTMLTableElement _tableElementWithImpl:impl];
 }
 
 - (void)deleteRow:(long)index
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    int exceptioncode = 0;
+    [self _tableElementImpl]->deleteRow(index, exceptioncode);
+    raiseOnDOMError(exceptioncode);
 }
 
 @end
 
 @implementation DOMHTMLTableColElement
 
+- (HTMLTableColElementImpl *)_tableColElementImpl
+{
+    return reinterpret_cast<HTMLTableColElementImpl *>(_internal);
+}
+
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableColElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableColElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)ch
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableColElementImpl]->getAttribute(ATTR_CHAR);
 }
 
 - (void)setCh:(NSString *)ch
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableColElementImpl]->setAttribute(ATTR_CHAR, ch);
 }
 
 - (NSString *)chOff
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableColElementImpl]->getAttribute(ATTR_CHAROFF);
 }
 
 - (void)setChOff:(NSString *)chOff
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableColElementImpl]->setAttribute(ATTR_CHAROFF, chOff);
 }
 
 - (long)span
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _tableColElementImpl]->getAttribute(ATTR_SPAN).toInt();
 }
 
 - (void)setSpan:(long)span
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(span));
+    [self _tableColElementImpl]->setAttribute(ATTR_SPAN, string);
 }
 
 - (NSString *)vAlign
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableColElementImpl]->getAttribute(ATTR_VALIGN);
 }
 
 - (void)setVAlign:(NSString *)vAlign
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableColElementImpl]->setAttribute(ATTR_VALIGN, vAlign);
 }
 
 - (NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableColElementImpl]->getAttribute(ATTR_WIDTH);
 }
 
 - (void)setWidth:(NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableColElementImpl]->setAttribute(ATTR_WIDTH, width);
 }
 
 @end
 
 @implementation DOMHTMLTableRowElement
 
+- (HTMLTableRowElementImpl *)_tableRowElementImpl
+{
+    return reinterpret_cast<HTMLTableRowElementImpl *>(_internal);
+}
+
 - (long)rowIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _tableRowElementImpl]->rowIndex();
 }
 
 - (long)sectionRowIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _tableRowElementImpl]->sectionRowIndex();
 }
 
 - (DOMHTMLCollection *)cells
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    HTMLCollectionImpl *collection = new HTMLCollectionImpl([self _tableRowElementImpl], HTMLCollectionImpl::TR_CELLS);
+    return [DOMHTMLCollection _collectionWithImpl:collection];
 }
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableRowElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableRowElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)bgColor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableRowElementImpl]->getAttribute(ATTR_BGCOLOR);
 }
 
 - (void)setBgColor:(NSString *)bgColor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableRowElementImpl]->setAttribute(ATTR_BGCOLOR, bgColor);
 }
 
 - (NSString *)ch
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableRowElementImpl]->getAttribute(ATTR_CHAR);
 }
 
 - (void)setCh:(NSString *)ch
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableRowElementImpl]->setAttribute(ATTR_CHAR, ch);
 }
 
 - (NSString *)chOff
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableRowElementImpl]->getAttribute(ATTR_CHAROFF);
 }
 
 - (void)setChOff:(NSString *)chOff
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableRowElementImpl]->setAttribute(ATTR_CHAROFF, chOff);
 }
 
 - (NSString *)vAlign
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableRowElementImpl]->getAttribute(ATTR_VALIGN);
 }
 
 - (void)setVAlign:(NSString *)vAlign
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableRowElementImpl]->setAttribute(ATTR_VALIGN, vAlign);
 }
 
 - (DOMHTMLElement *)insertCell:(long)index
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    int exceptioncode = 0;
+    HTMLTableCellElementImpl *impl = static_cast<HTMLTableCellElementImpl *>([self _tableRowElementImpl]->insertCell(index, exceptioncode));
+    raiseOnDOMError(exceptioncode);
+    return [DOMHTMLTableCellElement _tableCellElementWithImpl:impl];
 }
 
 - (void)deleteCell:(long)index
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    int exceptioncode = 0;
+    [self _tableRowElementImpl]->deleteCell(index, exceptioncode);
+    raiseOnDOMError(exceptioncode);
 }
 
 @end
 
 @implementation DOMHTMLTableCellElement
 
+- (id)_initWithTableCellElement:(HTMLTableCellElementImpl *)impl
+{
+    ASSERT(impl);
+    
+    [super _init];
+    _internal = reinterpret_cast<DOMObjectInternal *>(impl);
+    impl->ref();
+    setDOMWrapperForImpl(self, impl);
+    return self;
+}
+
++ (DOMHTMLTableCellElement *)_tableCellElementWithImpl:(HTMLTableCellElementImpl *)impl
+{
+    if (!impl)
+        return nil;
+    
+    id cachedInstance;
+    cachedInstance = getDOMWrapperForImpl(impl);
+    if (cachedInstance)
+        return [[cachedInstance retain] autorelease];
+    
+    return [[[self alloc] _initWithTableCellElement:impl] autorelease];
+}
+
+- (HTMLTableCellElementImpl *)_tableCellElementImpl
+{
+    return reinterpret_cast<HTMLTableCellElementImpl *>(_internal);
+}
+
 - (long)cellIndex
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _tableCellElementImpl]->cellIndex();
 }
 
 - (NSString *)abbr
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_ABBR);
 }
 
 - (void)setAbbr:(NSString *)abbr
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_ABBR, abbr);
 }
 
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)axis
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_AXIS);
 }
 
 - (void)setAxis:(NSString *)axis
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_AXIS, axis);
 }
 
 - (NSString *)bgColor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_BGCOLOR);
 }
 
 - (void)setBgColor:(NSString *)bgColor
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_BGCOLOR, bgColor);
 }
 
 - (NSString *)ch
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_CHAR);
 }
 
 - (void)setCh:(NSString *)ch
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_CHAR, ch);
 }
 
 - (NSString *)chOff
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_CHAROFF);
 }
 
 - (void)setChOff:(NSString *)chOff
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_CHAROFF, chOff);
 }
 
 - (long)colSpan
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_COLSPAN).toInt();
 }
 
 - (void)setColSpan:(long)colSpan
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(colSpan));
+    [self _tableCellElementImpl]->setAttribute(ATTR_COLSPAN, string);
 }
 
 - (NSString *)headers
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_HEADERS);
 }
 
 - (void)setHeaders:(NSString *)headers
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_HEADERS, headers);
 }
 
 - (NSString *)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_HEIGHT);
 }
 
 - (void)setHeight:(NSString *)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_HEIGHT, height);
 }
 
 - (BOOL)noWrap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_NOWRAP).isNull();
 }
 
 - (void)setNoWrap:(BOOL)noWrap
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_NOWRAP, noWrap ? "" : 0);
 }
 
 - (long)rowSpan
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return 0;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_ROWSPAN).toInt();
 }
 
 - (void)setRowSpan:(long)rowSpan
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    DOMString string(QString::number(rowSpan));
+    [self _tableCellElementImpl]->setAttribute(ATTR_ROWSPAN, string);
 }
 
 - (NSString *)scope
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_SCOPE);
 }
 
 - (void)setScope:(NSString *)scope
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_SCOPE, scope);
 }
 
 - (NSString *)vAlign
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_VALIGN);
 }
 
 - (void)setVAlign:(NSString *)vAlign
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_VALIGN, vAlign);
 }
 
 - (NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _tableCellElementImpl]->getAttribute(ATTR_WIDTH);
 }
 
 - (void)setWidth:(NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _tableCellElementImpl]->setAttribute(ATTR_WIDTH, width);
 }
 
 @end
 
 @implementation DOMHTMLFrameSetElement
 
-- (NSString *)cols
+- (HTMLFrameSetElementImpl *)_frameSetElementImpl
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return reinterpret_cast<HTMLFrameSetElementImpl *>(_internal);
 }
 
-- (void)setCols:(NSString *)cols
+- (NSString *)rows
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    return [self _frameSetElementImpl]->getAttribute(ATTR_ROWS);
 }
 
-- (NSString *)rows
+- (void)setRows:(NSString *)rows
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    [self _frameSetElementImpl]->setAttribute(ATTR_ROWS, rows);
 }
 
-- (void)setRows:(NSString *)rows
+- (NSString *)cols
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    return [self _frameSetElementImpl]->getAttribute(ATTR_COLS);
+}
+
+- (void)setCols:(NSString *)cols
+{
+    [self _frameSetElementImpl]->setAttribute(ATTR_COLS, cols);
 }
 
 @end
 
 @implementation DOMHTMLFrameElement
 
+- (HTMLFrameElementImpl *)_frameElementImpl
+{
+    return reinterpret_cast<HTMLFrameElementImpl *>(_internal);
+}
+
+
 - (NSString *)frameBorder
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _frameElementImpl]->getAttribute(ATTR_FRAMEBORDER);
 }
 
 - (void)setFrameBorder:(NSString *)frameBorder
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _frameElementImpl]->setAttribute(ATTR_FRAMEBORDER, frameBorder);
 }
 
 - (NSString *)longDesc
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _frameElementImpl]->getAttribute(ATTR_LONGDESC);
 }
 
 - (void)setLongDesc:(NSString *)longDesc
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _frameElementImpl]->setAttribute(ATTR_LONGDESC, longDesc);
 }
 
 - (NSString *)marginHeight
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _frameElementImpl]->getAttribute(ATTR_MARGINHEIGHT);
 }
 
 - (void)setMarginHeight:(NSString *)marginHeight
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _frameElementImpl]->setAttribute(ATTR_MARGINHEIGHT, marginHeight);
 }
 
 - (NSString *)marginWidth
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _frameElementImpl]->getAttribute(ATTR_MARGINWIDTH);
 }
 
 - (void)setMarginWidth:(NSString *)marginWidth
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _frameElementImpl]->setAttribute(ATTR_MARGINWIDTH, marginWidth);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _frameElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _frameElementImpl]->setAttribute(ATTR_NAME, name);
 }
 
 - (BOOL)noResize
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return NO;
+    return [self _frameElementImpl]->getAttribute(ATTR_NORESIZE).isNull();
 }
 
 - (void)setNoResize:(BOOL)noResize
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _frameElementImpl]->setAttribute(ATTR_NORESIZE, noResize ? "" : 0);
 }
 
 - (NSString *)scrolling
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _frameElementImpl]->getAttribute(ATTR_SCROLLING);
 }
 
 - (void)setScrolling:(NSString *)scrolling
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _frameElementImpl]->setAttribute(ATTR_SCROLLING, scrolling);
 }
 
 - (NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _frameElementImpl]->getAttribute(ATTR_SRC);
 }
 
 - (void)setSrc:(NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _frameElementImpl]->setAttribute(ATTR_SRC, src);
 }
 
 - (DOMDocument *)contentDocument
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMDocument _documentWithImpl:[self _frameElementImpl]->contentDocument()];
 }
 
 @end
 
 @implementation DOMHTMLIFrameElement
 
+- (HTMLIFrameElementImpl *)_IFrameElementImpl
+{
+    return reinterpret_cast<HTMLIFrameElementImpl *>(_internal);
+}
+
 - (NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_ALIGN);
 }
 
 - (void)setAlign:(NSString *)align
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_ALIGN, align);
 }
 
 - (NSString *)frameBorder
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_FRAMEBORDER);
 }
 
 - (void)setFrameBorder:(NSString *)frameBorder
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_FRAMEBORDER, frameBorder);
 }
 
 - (NSString *)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_HEIGHT);
 }
 
 - (void)setHeight:(NSString *)height
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_HEIGHT, height);
 }
 
 - (NSString *)longDesc
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_LONGDESC);
 }
 
 - (void)setLongDesc:(NSString *)longDesc
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_LONGDESC, longDesc);
 }
 
 - (NSString *)marginHeight
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_MARGINHEIGHT);
 }
 
 - (void)setMarginHeight:(NSString *)marginHeight
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_MARGINHEIGHT, marginHeight);
 }
 
 - (NSString *)marginWidth
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_MARGINWIDTH);
 }
 
 - (void)setMarginWidth:(NSString *)marginWidth
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_MARGINWIDTH, marginWidth);
 }
 
 - (NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_NAME);
 }
 
 - (void)setName:(NSString *)name
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_NAME, name);
+}
+
+- (BOOL)noResize
+{
+    return [self _IFrameElementImpl]->getAttribute(ATTR_NORESIZE).isNull();
+}
+
+- (void)setNoResize:(BOOL)noResize
+{
+    [self _IFrameElementImpl]->setAttribute(ATTR_NORESIZE, noResize ? "" : 0);
 }
 
 - (NSString *)scrolling
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_SCROLLING);
 }
 
 - (void)setScrolling:(NSString *)scrolling
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_SCROLLING, scrolling);
 }
 
 - (NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_SRC);
 }
 
 - (void)setSrc:(NSString *)src
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_SRC, src);
 }
 
 - (NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [self _IFrameElementImpl]->getAttribute(ATTR_WIDTH);
 }
 
 - (void)setWidth:(NSString *)width
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
+    [self _IFrameElementImpl]->setAttribute(ATTR_WIDTH, width);
 }
 
 - (DOMDocument *)contentDocument
 {
-    ASSERT_WITH_MESSAGE(0, "not implemented");
-    return nil;
+    return [DOMDocument _documentWithImpl:[self _IFrameElementImpl]->contentDocument()];
 }
 
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list