Commit fba6da79 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use nsIDOMElement instead of nsIDOMHTMLElement where possible.

parent a219fd31
......@@ -183,7 +183,7 @@ static HRESULT WINAPI HTMLDOMAttribute_get_specified(IHTMLDOMAttribute *iface, V
TRACE("(%p)->(%p)\n", This, p);
if(!This->elem || !This->elem->nselem) {
if(!This->elem || !This->elem->dom_element) {
FIXME("NULL This->elem\n");
return E_UNEXPECTED;
}
......@@ -199,7 +199,7 @@ static HRESULT WINAPI HTMLDOMAttribute_get_specified(IHTMLDOMAttribute *iface, V
/* FIXME: This is not exactly right, we have some attributes that don't map directly to Gecko attributes. */
nsAString_InitDepend(&nsname, name);
nsres = nsIDOMHTMLElement_GetAttributeNode(This->elem->nselem, &nsname, &nsattr);
nsres = nsIDOMElement_GetAttributeNode(This->elem->dom_element, &nsname, &nsattr);
nsAString_Finish(&nsname);
SysFreeString(name);
if(NS_FAILED(nsres))
......
......@@ -1345,7 +1345,7 @@ HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
assert(nsres == NS_OK);
nsAString_Init(&nsempty_str, NULL);
nsres = nsIDOMWindow_GetComputedStyle(nswindow, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
nsres = nsIDOMWindow_GetComputedStyle(nswindow, elem->dom_element, &nsempty_str, &nsstyle);
nsAString_Finish(&nsempty_str);
nsIDOMWindow_Release(nswindow);
if(NS_FAILED(nsres)) {
......
......@@ -377,7 +377,7 @@ static BOOL is_elem_name(HTMLElement *elem, LPCWSTR name)
static const PRUnichar nameW[] = {'n','a','m','e',0};
if(!elem->nselem)
if(!elem->dom_element)
return FALSE;
nsAString_Init(&nsstr, NULL);
......@@ -507,10 +507,10 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface,
nsAString_Init(&tag_str, NULL);
for(i=0; i<This->len; i++) {
if(!This->elems[i]->nselem)
if(!This->elems[i]->dom_element)
continue;
nsIDOMHTMLElement_GetTagName(This->elems[i]->nselem, &tag_str);
nsIDOMElement_GetTagName(This->elems[i]->dom_element, &tag_str);
nsAString_GetData(&tag_str, &tag);
if(CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, tag, -1,
......
......@@ -1590,7 +1590,7 @@ static HRESULT WINAPI HTMLLabelElement_put_htmlFor(IHTMLLabelElement *iface, BST
nsAString_InitDepend(&for_str, forW);
nsAString_InitDepend(&val_str, v);
nsres = nsIDOMHTMLElement_SetAttribute(This->element.nselem, &for_str, &val_str);
nsres = nsIDOMElement_SetAttribute(This->element.dom_element, &for_str, &val_str);
nsAString_Finish(&for_str);
nsAString_Finish(&val_str);
if(NS_FAILED(nsres)) {
......
......@@ -260,11 +260,11 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
while(1) {
nsIDOMNode *child;
nsres = nsIDOMHTMLElement_GetFirstChild(This->element.nselem, &child);
nsres = nsIDOMElement_GetFirstChild(This->element.dom_element, &child);
if(NS_FAILED(nsres) || !child)
break;
nsres = nsIDOMHTMLElement_RemoveChild(This->element.nselem, child, &tmp);
nsres = nsIDOMElement_RemoveChild(This->element.dom_element, child, &tmp);
nsIDOMNode_Release(child);
if(NS_SUCCEEDED(nsres)) {
nsIDOMNode_Release(tmp);
......@@ -282,7 +282,7 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
return E_FAIL;
}
nsres = nsIDOMHTMLElement_AppendChild(This->element.nselem, (nsIDOMNode*)text_node, &tmp);
nsres = nsIDOMElement_AppendChild(This->element.dom_element, (nsIDOMNode*)text_node, &tmp);
if(NS_SUCCEEDED(nsres))
nsIDOMNode_Release(tmp);
else
......
......@@ -200,7 +200,7 @@ static HRESULT WINAPI HTMLScriptElement_put_text(IHTMLScriptElement *iface, BSTR
return E_FAIL;
}
nsres = nsIDOMHTMLElement_GetParentNode(This->element.nselem, &parent);
nsres = nsIDOMElement_GetParentNode(This->element.dom_element, &parent);
if(NS_FAILED(nsres) || !parent) {
TRACE("No parent, not executing\n");
This->parse_on_bind = TRUE;
......
......@@ -4701,12 +4701,12 @@ static HRESULT get_style_from_elem(HTMLElement *elem, nsIDOMCSSStyleDeclaration
nsIDOMElementCSSInlineStyle *nselemstyle;
nsresult nsres;
if(!elem->nselem) {
FIXME("NULL nselem\n");
if(!elem->dom_element) {
FIXME("comment element\n");
return E_NOTIMPL;
}
nsres = nsIDOMHTMLElement_QueryInterface(elem->nselem, &IID_nsIDOMElementCSSInlineStyle,
nsres = nsIDOMElement_QueryInterface(elem->dom_element, &IID_nsIDOMElementCSSInlineStyle,
(void**)&nselemstyle);
assert(nsres == NS_OK);
......
......@@ -905,7 +905,7 @@ static void script_file_available(ScriptBSC *bsc)
return;
}
nsres = nsIDOMHTMLElement_GetParentNode(script_elem->element.nselem, &parent);
nsres = nsIDOMElement_GetParentNode(script_elem->element.dom_element, &parent);
if(NS_FAILED(nsres) || !parent) {
TRACE("No parent, not executing\n");
script_elem->parse_on_bind = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment