diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c
index 5c799ac8325..7c845bb4a1e 100644
--- a/dlls/mshtml/htmlanchor.c
+++ b/dlls/mshtml/htmlanchor.c
@@ -811,7 +811,7 @@ static dispex_static_data_t HTMLAnchorElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLAnchorElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLAnchorElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLAnchorElement *ret;
nsresult nsres;
@@ -825,7 +825,7 @@ HRESULT HTMLAnchorElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele
HTMLElement_Init(&ret->element, doc, nselem, &HTMLAnchorElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLAnchorElement, (void**)&ret->nsanchor);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLAnchorElement, (void**)&ret->nsanchor);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmlarea.c b/dlls/mshtml/htmlarea.c
index 50bfbe6fdbe..4fe03bff2f1 100644
--- a/dlls/mshtml/htmlarea.c
+++ b/dlls/mshtml/htmlarea.c
@@ -456,7 +456,7 @@ static dispex_static_data_t HTMLAreaElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLAreaElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLAreaElement *ret;
nsresult nsres;
@@ -470,7 +470,7 @@ HRESULT HTMLAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
HTMLElement_Init(&ret->element, doc, nselem, &HTMLAreaElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLAreaElement, (void**)&ret->nsarea);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLAreaElement, (void**)&ret->nsarea);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c
index 1c40c52d68e..fcace12748e 100644
--- a/dlls/mshtml/htmlbody.c
+++ b/dlls/mshtml/htmlbody.c
@@ -902,7 +902,7 @@ static dispex_static_data_t HTMLBodyElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLBodyElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLBodyElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLBodyElement *ret;
nsresult nsres;
@@ -914,7 +914,7 @@ HRESULT HTMLBodyElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
ret->IHTMLBodyElement_iface.lpVtbl = &HTMLBodyElementVtbl;
ret->textcont.element.node.vtbl = &HTMLBodyElementImplVtbl;
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLBodyElement, (void**)&ret->nsbody);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLBodyElement, (void**)&ret->nsbody);
if(NS_FAILED(nsres)) {
ERR("Could not get nsDOMHTMLBodyElement: %08x\n", nsres);
heap_free(ret);
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index f6280237da0..8be0fe54b50 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -70,7 +70,7 @@ static const WCHAR trW[] = {'T','R',0};
typedef struct {
const WCHAR *name;
- HRESULT (*constructor)(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
+ HRESULT (*constructor)(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**);
} tag_desc_t;
static const tag_desc_t tag_descs[] = {
@@ -5443,7 +5443,7 @@ static dispex_static_data_t HTMLElement_dispex = {
HTMLElement_init_dispex_info
};
-void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
+void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMElement *nselem, dispex_static_data_t *dispex_data)
{
This->IHTMLElement_iface.lpVtbl = &HTMLElementVtbl;
This->IHTMLElement2_iface.lpVtbl = &HTMLElement2Vtbl;
@@ -5459,12 +5459,22 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen
dispex_data->vtbl = &HTMLElement_event_target_vtbl.dispex_vtbl;
if(nselem) {
+ nsIDOMHTMLElement *html_element;
+ nsresult nsres;
+
HTMLDOMNode_Init(doc, &This->node, (nsIDOMNode*)nselem, dispex_data ? dispex_data : &HTMLElement_dispex);
/* No AddRef, share reference with HTMLDOMNode */
assert((nsIDOMNode*)nselem == This->node.nsnode);
- This->dom_element = (nsIDOMElement*)nselem;
- This->html_element = nselem;
+ This->dom_element = nselem;
+
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLElement, (void**)&html_element);
+ if(NS_SUCCEEDED(nsres)) {
+ This->html_element = html_element;
+ /* share reference with HTMLDOMNode */
+ assert((nsIDOMNode*)html_element == This->node.nsnode);
+ nsIDOMHTMLElement_Release(html_element);
+ }
This->nselem = This->html_element;
}
@@ -5492,14 +5502,14 @@ HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_g
tag = get_tag_desc(class_name);
if(tag) {
- hres = tag->constructor(doc, nselem, &elem);
+ hres = tag->constructor(doc, (nsIDOMElement*)nselem, &elem);
}else if(use_generic) {
- hres = HTMLGenericElement_Create(doc, nselem, &elem);
+ hres = HTMLGenericElement_Create(doc, (nsIDOMElement*)nselem, &elem);
}else {
elem = heap_alloc_zero(sizeof(HTMLElement));
if(elem) {
elem->node.vtbl = &HTMLElementImplVtbl;
- HTMLElement_Init(elem, doc, nselem, &HTMLElement_dispex);
+ HTMLElement_Init(elem, doc, (nsIDOMElement*)nselem, &HTMLElement_dispex);
hres = S_OK;
}else {
hres = E_OUTOFMEMORY;
diff --git a/dlls/mshtml/htmlembed.c b/dlls/mshtml/htmlembed.c
index b2fa234fe02..55d216eeb43 100644
--- a/dlls/mshtml/htmlembed.c
+++ b/dlls/mshtml/htmlembed.c
@@ -272,7 +272,7 @@ static dispex_static_data_t HTMLEmbedElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLEmbedElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLEmbedElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLEmbed *ret;
diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c
index e969c3bf0f7..975756cad2a 100644
--- a/dlls/mshtml/htmlform.c
+++ b/dlls/mshtml/htmlform.c
@@ -814,7 +814,7 @@ static dispex_static_data_t HTMLFormElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLFormElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLFormElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLFormElement *ret;
nsresult nsres;
@@ -828,7 +828,7 @@ HRESULT HTMLFormElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
HTMLElement_Init(&ret->element, doc, nselem, &HTMLFormElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLFormElement, (void**)&ret->nsform);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLFormElement, (void**)&ret->nsform);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmlframe.c b/dlls/mshtml/htmlframe.c
index 106858b11bf..6fb6d3d7368 100644
--- a/dlls/mshtml/htmlframe.c
+++ b/dlls/mshtml/htmlframe.c
@@ -321,7 +321,7 @@ static dispex_static_data_t HTMLFrameElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLFrameElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLFrameElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLFrameElement *ret;
diff --git a/dlls/mshtml/htmlframebase.c b/dlls/mshtml/htmlframebase.c
index 83cf9fcd14e..a58068adece 100644
--- a/dlls/mshtml/htmlframebase.c
+++ b/dlls/mshtml/htmlframebase.c
@@ -731,7 +731,7 @@ void HTMLFrameBase_destructor(HTMLFrameBase *This)
HTMLElement_destructor(&This->element.node);
}
-void HTMLFrameBase_Init(HTMLFrameBase *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
+void HTMLFrameBase_Init(HTMLFrameBase *This, HTMLDocumentNode *doc, nsIDOMElement *nselem,
dispex_static_data_t *dispex_data)
{
nsresult nsres;
@@ -741,10 +741,10 @@ void HTMLFrameBase_Init(HTMLFrameBase *This, HTMLDocumentNode *doc, nsIDOMHTMLEl
HTMLElement_Init(&This->element, doc, nselem, dispex_data);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLFrameElement, (void**)&This->nsframe);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLFrameElement, (void**)&This->nsframe);
if(NS_FAILED(nsres)) {
This->nsframe = NULL;
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLIFrameElement, (void**)&This->nsiframe);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLIFrameElement, (void**)&This->nsiframe);
assert(nsres == NS_OK);
}else {
This->nsiframe = NULL;
diff --git a/dlls/mshtml/htmlgeneric.c b/dlls/mshtml/htmlgeneric.c
index 8a9578ababa..639c95ee43d 100644
--- a/dlls/mshtml/htmlgeneric.c
+++ b/dlls/mshtml/htmlgeneric.c
@@ -174,7 +174,7 @@ static dispex_static_data_t HTMLGenericElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLGenericElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLGenericElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLGenericElement *ret;
diff --git a/dlls/mshtml/htmlhead.c b/dlls/mshtml/htmlhead.c
index 7b77cb032d0..2bb552cf4d5 100644
--- a/dlls/mshtml/htmlhead.c
+++ b/dlls/mshtml/htmlhead.c
@@ -175,7 +175,7 @@ static dispex_static_data_t HTMLTitleElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLTitleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLTitleElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLTitleElement *ret;
@@ -358,7 +358,7 @@ static dispex_static_data_t HTMLHtmlElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLHtmlElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLHtmlElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLHtmlElement *ret;
@@ -519,7 +519,7 @@ static dispex_static_data_t HTMLHeadElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLHeadElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLHeadElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLHeadElement *ret;
diff --git a/dlls/mshtml/htmliframe.c b/dlls/mshtml/htmliframe.c
index e43dc7d633d..a9c2bc1c2b1 100644
--- a/dlls/mshtml/htmliframe.c
+++ b/dlls/mshtml/htmliframe.c
@@ -596,7 +596,7 @@ static dispex_static_data_t HTMLIFrame_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLIFrame *ret;
diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c
index 02f0cba48d9..64214404f17 100644
--- a/dlls/mshtml/htmlimg.c
+++ b/dlls/mshtml/htmlimg.c
@@ -739,7 +739,7 @@ static dispex_static_data_t HTMLImgElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLImgElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLImgElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLImg *ret;
nsresult nsres;
@@ -753,7 +753,7 @@ HRESULT HTMLImgElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
HTMLElement_Init(&ret->element, doc, nselem, &HTMLImgElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLImageElement, (void**)&ret->nsimg);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLImageElement, (void**)&ret->nsimg);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c
index 0dea8cb9bbb..03b0aae2016 100644
--- a/dlls/mshtml/htmlinput.c
+++ b/dlls/mshtml/htmlinput.c
@@ -1490,7 +1490,7 @@ static dispex_static_data_t HTMLInputElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLInputElement *ret;
nsresult nsres;
@@ -1506,7 +1506,7 @@ HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem
HTMLElement_Init(&ret->element, doc, nselem, &HTMLInputElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement, (void**)&ret->nsinput);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement, (void**)&ret->nsinput);
assert(nsres == NS_OK);
*elem = &ret->element;
@@ -1686,7 +1686,7 @@ static dispex_static_data_t HTMLLabelElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLLabelElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLLabelElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLLabelElement *ret;
@@ -2037,7 +2037,7 @@ static dispex_static_data_t HTMLButtonElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLButtonElement *ret;
nsresult nsres;
@@ -2051,7 +2051,7 @@ HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele
HTMLElement_Init(&ret->element, doc, nselem, &HTMLButtonElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLButtonElement, (void**)&ret->nsbutton);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLButtonElement, (void**)&ret->nsbutton);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmllink.c b/dlls/mshtml/htmllink.c
index 43a4f4cabbf..22342027cbc 100644
--- a/dlls/mshtml/htmllink.c
+++ b/dlls/mshtml/htmllink.c
@@ -453,7 +453,7 @@ static dispex_static_data_t HTMLLinkElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLLinkElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLLinkElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLLinkElement *ret;
nsresult nsres;
@@ -467,7 +467,7 @@ HRESULT HTMLLinkElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
HTMLElement_Init(&ret->element, doc, nselem, &HTMLLinkElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLLinkElement, (void**)&ret->nslink);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLLinkElement, (void**)&ret->nslink);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmlmeta.c b/dlls/mshtml/htmlmeta.c
index 2611dcb91f4..f405ba62baa 100644
--- a/dlls/mshtml/htmlmeta.c
+++ b/dlls/mshtml/htmlmeta.c
@@ -255,7 +255,7 @@ static dispex_static_data_t HTMLMetaElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLMetaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLMetaElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLMetaElement *ret;
diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c
index e72c07fba52..fa7b096381f 100644
--- a/dlls/mshtml/htmlobject.c
+++ b/dlls/mshtml/htmlobject.c
@@ -777,7 +777,7 @@ static dispex_static_data_t HTMLObjectElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLObjectElement *ret;
nsresult nsres;
@@ -792,7 +792,7 @@ HRESULT HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele
HTMLElement_Init(&ret->plugin_container.element, doc, nselem, &HTMLObjectElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLObjectElement, (void**)&ret->nsobject);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLObjectElement, (void**)&ret->nsobject);
assert(nsres == NS_OK);
*elem = &ret->plugin_container.element;
diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c
index 616328b49fa..b0c35e5ecf2 100644
--- a/dlls/mshtml/htmloption.c
+++ b/dlls/mshtml/htmloption.c
@@ -448,7 +448,7 @@ static dispex_static_data_t HTMLOptionElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLOptionElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLOptionElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLOptionElement *ret;
nsresult nsres;
@@ -462,7 +462,7 @@ HRESULT HTMLOptionElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele
HTMLElement_Init(&ret->element, doc, nselem, &HTMLOptionElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLOptionElement, (void**)&ret->nsoption);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLOptionElement, (void**)&ret->nsoption);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c
index 49d82aa93c4..c755add6e03 100644
--- a/dlls/mshtml/htmlscript.c
+++ b/dlls/mshtml/htmlscript.c
@@ -480,7 +480,7 @@ static dispex_static_data_t HTMLScriptElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLScriptElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLScriptElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLScriptElement *ret;
nsresult nsres;
@@ -494,7 +494,7 @@ HRESULT HTMLScriptElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele
HTMLElement_Init(&ret->element, doc, nselem, &HTMLScriptElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLScriptElement, (void**)&ret->nsscript);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLScriptElement, (void**)&ret->nsscript);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c
index 59e68118215..5a116a7905e 100644
--- a/dlls/mshtml/htmlselect.c
+++ b/dlls/mshtml/htmlselect.c
@@ -721,7 +721,7 @@ static dispex_static_data_t HTMLSelectElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLSelectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLSelectElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLSelectElement *ret;
nsresult nsres;
@@ -735,8 +735,7 @@ HRESULT HTMLSelectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele
HTMLElement_Init(&ret->element, doc, nselem, &HTMLSelectElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLSelectElement,
- (void**)&ret->nsselect);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLSelectElement, (void**)&ret->nsselect);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmlstyleelem.c b/dlls/mshtml/htmlstyleelem.c
index d8196d9de10..14fd8bc8f53 100644
--- a/dlls/mshtml/htmlstyleelem.c
+++ b/dlls/mshtml/htmlstyleelem.c
@@ -371,7 +371,7 @@ static dispex_static_data_t HTMLStyleElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLStyleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLStyleElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLStyleElement *ret;
nsresult nsres;
@@ -385,7 +385,7 @@ HRESULT HTMLStyleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem
HTMLElement_Init(&ret->element, doc, nselem, &HTMLStyleElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLStyleElement, (void**)&ret->nsstyle);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLStyleElement, (void**)&ret->nsstyle);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmltable.c b/dlls/mshtml/htmltable.c
index 4d4dffde8f9..455826ee9c4 100644
--- a/dlls/mshtml/htmltable.c
+++ b/dlls/mshtml/htmltable.c
@@ -675,7 +675,7 @@ static HRESULT WINAPI HTMLTable_insertRow(IHTMLTable *iface, LONG index, IDispat
return E_FAIL;
}
- hres = HTMLTableRow_Create(This->element.node.doc, nselem, &elem);
+ hres = HTMLTableRow_Create(This->element.node.doc, (nsIDOMElement*)nselem, &elem);
nsIDOMHTMLElement_Release(nselem);
if (FAILED(hres)) {
ERR("Create TableRow failed: %08x\n", hres);
@@ -1076,7 +1076,7 @@ static dispex_static_data_t HTMLTable_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLTable *ret;
nsresult nsres;
@@ -1092,7 +1092,7 @@ HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLE
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTable_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableElement, (void**)&ret->nstable);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableElement, (void**)&ret->nstable);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmltablecell.c b/dlls/mshtml/htmltablecell.c
index d7fc73b8431..023227a41a6 100644
--- a/dlls/mshtml/htmltablecell.c
+++ b/dlls/mshtml/htmltablecell.c
@@ -493,7 +493,7 @@ static dispex_static_data_t HTMLTableCell_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLTableCell_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLTableCell_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLTableCell *ret;
nsresult nsres;
@@ -507,7 +507,7 @@ HRESULT HTMLTableCell_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, H
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTableCell_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableCellElement, (void**)&ret->nscell);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableCellElement, (void**)&ret->nscell);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmltablerow.c b/dlls/mshtml/htmltablerow.c
index 09e492466c9..61bdbd4fad8 100644
--- a/dlls/mshtml/htmltablerow.c
+++ b/dlls/mshtml/htmltablerow.c
@@ -320,7 +320,7 @@ static HRESULT WINAPI HTMLTableRow_insertCell(IHTMLTableRow *iface, LONG index,
return E_FAIL;
}
- hres = HTMLTableCell_Create(This->element.node.doc, nselem, &elem);
+ hres = HTMLTableCell_Create(This->element.node.doc, (nsIDOMElement*)nselem, &elem);
nsIDOMHTMLElement_Release(nselem);
if (FAILED(hres)) {
ERR("Create TableCell failed: %08x\n", hres);
@@ -455,7 +455,7 @@ static dispex_static_data_t HTMLTableRow_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLTableRow_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLTableRow_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLTableRow *ret;
nsresult nsres;
@@ -469,7 +469,7 @@ HRESULT HTMLTableRow_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HT
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTableRow_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableRowElement, (void**)&ret->nsrow);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableRowElement, (void**)&ret->nsrow);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c
index 71a8798237e..5506329f5bc 100644
--- a/dlls/mshtml/htmltextarea.c
+++ b/dlls/mshtml/htmltextarea.c
@@ -509,7 +509,7 @@ static dispex_static_data_t HTMLTextAreaElement_dispex = {
HTMLElement_init_dispex_info
};
-HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
+HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
{
HTMLTextAreaElement *ret;
nsresult nsres;
@@ -523,7 +523,7 @@ HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nse
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTextAreaElement_dispex);
- nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement, (void**)&ret->nstextarea);
+ nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement, (void**)&ret->nstextarea);
assert(nsres == NS_OK);
*elem = &ret->element;
diff --git a/dlls/mshtml/htmltextcont.c b/dlls/mshtml/htmltextcont.c
index 0c72ceef1e6..8ffca8b2c7a 100644
--- a/dlls/mshtml/htmltextcont.c
+++ b/dlls/mshtml/htmltextcont.c
@@ -185,7 +185,7 @@ static const IHTMLTextContainerVtbl HTMLTextContainerVtbl = {
HTMLTextContainer_get_onscroll
};
-void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
+void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLDocumentNode *doc, nsIDOMElement *nselem,
dispex_static_data_t *dispex_data)
{
This->IHTMLTextContainer_iface.lpVtbl = &HTMLTextContainerVtbl;
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 26f4e9743f4..be60375b81d 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -1023,37 +1023,37 @@ HRESULT HTMLDOMAttribute_Create(const WCHAR*,HTMLElement*,DISPID,HTMLDOMAttribut
HRESULT HTMLElement_Create(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLElement**) DECLSPEC_HIDDEN;
HRESULT HTMLCommentElement_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLAnchorElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLAreaElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLBodyElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLButtonElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLEmbedElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLFormElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLFrameElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLHeadElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLHtmlElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLIFrame_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLStyleElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLImgElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLInputElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLLabelElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLLinkElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLMetaElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLObjectElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLOptionElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLScriptElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLSelectElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLTable_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLTableCell_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLTableRow_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLTitleElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
-HRESULT HTMLGenericElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLAnchorElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLAreaElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLBodyElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLButtonElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLEmbedElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLFormElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLFrameElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLHeadElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLHtmlElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLIFrame_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLStyleElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLImgElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLInputElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLLabelElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLLinkElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLMetaElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLObjectElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLOptionElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLScriptElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLSelectElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLTable_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLTableCell_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLTableRow_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLTitleElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
+HRESULT HTMLGenericElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
void HTMLDOMNode_Init(HTMLDocumentNode*,HTMLDOMNode*,nsIDOMNode*,dispex_static_data_t*) DECLSPEC_HIDDEN;
-void HTMLElement_Init(HTMLElement*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
-void HTMLTextContainer_Init(HTMLTextContainer*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
-void HTMLFrameBase_Init(HTMLFrameBase*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
+void HTMLElement_Init(HTMLElement*,HTMLDocumentNode*,nsIDOMElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
+void HTMLTextContainer_Init(HTMLTextContainer*,HTMLDocumentNode*,nsIDOMElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
+void HTMLFrameBase_Init(HTMLFrameBase*,HTMLDocumentNode*,nsIDOMElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
void EventTarget_Init(EventTarget*,IUnknown*,dispex_static_data_t*,compat_mode_t) DECLSPEC_HIDDEN;
HRESULT EventTarget_QI(EventTarget*,REFIID,void**) DECLSPEC_HIDDEN;