Module: wine Branch: master Commit: fba6da7982c3ef21fe6c717b9f2963829c4f9f7f URL: https://source.winehq.org/git/wine.git/?a=commit;h=fba6da7982c3ef21fe6c717b9...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Feb 12 23:28:15 2018 +0100
mshtml: Use nsIDOMElement instead of nsIDOMHTMLElement where possible.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/htmlattr.c | 4 ++-- dlls/mshtml/htmlcurstyle.c | 2 +- dlls/mshtml/htmlelemcol.c | 6 +++--- dlls/mshtml/htmlinput.c | 2 +- dlls/mshtml/htmloption.c | 6 +++--- dlls/mshtml/htmlscript.c | 2 +- dlls/mshtml/htmlstyle.c | 6 +++--- dlls/mshtml/script.c | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index e3a16df..61c6455 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -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)) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index a7daf4b..898fdd8 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -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)) { diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index a851220..226cfe4 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -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, diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 03b0aae..ad8663c 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -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)) { diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c index 43661b7..8210969 100644 --- a/dlls/mshtml/htmloption.c +++ b/dlls/mshtml/htmloption.c @@ -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 diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c index c755add..c449d3f 100644 --- a/dlls/mshtml/htmlscript.c +++ b/dlls/mshtml/htmlscript.c @@ -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; diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index fcec264..b99ea08 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -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);
diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 72747af..0cd3162 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -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;