Commit cfe8651c authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

mshtml: Remove useless casts to self.

parent a1a9ca8f
......@@ -295,7 +295,7 @@ static void get_font_size(HTMLDocument *This, WCHAR *ret)
TRACE("found font tag %p\n", elem);
get_elem_attr_value((nsIDOMElement*)elem, sizeW, &val_str, &val);
get_elem_attr_value(elem, sizeW, &val_str, &val);
if(*val) {
TRACE("found size %s\n", debugstr_w(val));
strcpyW(ret, val);
......@@ -366,7 +366,7 @@ static void set_font_size(HTMLDocument *This, LPCWSTR size)
nsISelection_Collapse(nsselection, (nsIDOMNode*)elem, 0);
}else {
/* Remove all size attributes from the range */
remove_child_attr((nsIDOMElement*)elem, fontW, &size_str);
remove_child_attr(elem, fontW, &size_str);
nsISelection_SelectAllChildren(nsselection, (nsIDOMNode*)elem);
}
......@@ -1174,10 +1174,10 @@ static HRESULT exec_hyperlink(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if (insert_link_at_caret) {
/* add them to the document at the caret position */
nsres = nsIHTMLEditor_InsertElementAtSelection(html_editor, (nsIDOMElement*)anchor_elem, FALSE);
nsres = nsIHTMLEditor_InsertElementAtSelection(html_editor, anchor_elem, FALSE);
nsISelection_SelectAllChildren(nsselection, (nsIDOMNode*)anchor_elem);
}else /* add them around the selection using the magic provided to us by nsIHTMLEditor */
nsres = nsIHTMLEditor_InsertLinkAroundSelection(html_editor, (nsIDOMElement*)anchor_elem);
nsres = nsIHTMLEditor_InsertLinkAroundSelection(html_editor, anchor_elem);
nsIHTMLEditor_Release(html_editor);
hres = NS_SUCCEEDED(nsres) ? S_OK : E_FAIL;
......
......@@ -5597,14 +5597,14 @@ HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_g
tag = get_tag_desc(tag_name);
if(tag) {
hres = tag->constructor(doc, (nsIDOMElement*)nselem, &elem);
hres = tag->constructor(doc, nselem, &elem);
}else if(use_generic) {
hres = HTMLGenericElement_Create(doc, (nsIDOMElement*)nselem, &elem);
hres = HTMLGenericElement_Create(doc, nselem, &elem);
}else {
elem = heap_alloc_zero(sizeof(HTMLElement));
if(elem) {
elem->node.vtbl = &HTMLElementImplVtbl;
HTMLElement_Init(elem, doc, (nsIDOMElement*)nselem, &HTMLElement_dispex);
HTMLElement_Init(elem, doc, nselem, &HTMLElement_dispex);
hres = S_OK;
}else {
hres = E_OUTOFMEMORY;
......
......@@ -7543,7 +7543,7 @@ static void test_QueryInterface(IHTMLDocument2 *htmldoc)
hres = IUnknown_QueryInterface(doc, &IID_IDispatch, (void**)&qi);
ok(hres == S_OK, "Could not get IDispatch interface: %08x\n", hres);
ok(qi != (IUnknown*)doc, "disp == doc\n");
ok(qi != doc, "disp == doc\n");
IUnknown_Release(qi);
}
......
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