mshtml: Pass Gecko elements as nsIDOMElement to element constructors.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
339a5156f7
commit
3e4565f5d7
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue