Commit 9e1d876d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Initialize DOMRange object with compat mode.

parent e07e0453
...@@ -5200,7 +5200,7 @@ static HRESULT WINAPI DocumentRange_createRange(IDocumentRange *iface, IHTMLDOMR ...@@ -5200,7 +5200,7 @@ static HRESULT WINAPI DocumentRange_createRange(IDocumentRange *iface, IHTMLDOMR
if(NS_FAILED(nsIDOMHTMLDocument_CreateRange(This->doc_node->nsdoc, &nsrange))) if(NS_FAILED(nsIDOMHTMLDocument_CreateRange(This->doc_node->nsdoc, &nsrange)))
return E_FAIL; return E_FAIL;
hres = HTMLDOMRange_Create(nsrange, p); hres = create_dom_range(nsrange, dispex_compat_mode(&This->doc_node->node.event_target.dispex), p);
nsIDOMRange_Release(nsrange); nsIDOMRange_Release(nsrange);
return hres; return hres;
} }
......
...@@ -1022,7 +1022,7 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode*,nsIDOMRange*,IHTMLTxtRange**) DECL ...@@ -1022,7 +1022,7 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode*,nsIDOMRange*,IHTMLTxtRange**) DECL
HRESULT create_style_sheet(nsIDOMStyleSheet*,compat_mode_t,IHTMLStyleSheet**) DECLSPEC_HIDDEN; HRESULT create_style_sheet(nsIDOMStyleSheet*,compat_mode_t,IHTMLStyleSheet**) DECLSPEC_HIDDEN;
HRESULT create_style_sheet_collection(nsIDOMStyleSheetList*,compat_mode_t, HRESULT create_style_sheet_collection(nsIDOMStyleSheetList*,compat_mode_t,
IHTMLStyleSheetsCollection**) DECLSPEC_HIDDEN; IHTMLStyleSheetsCollection**) DECLSPEC_HIDDEN;
HRESULT HTMLDOMRange_Create(nsIDOMRange*,IHTMLDOMRange**) DECLSPEC_HIDDEN; HRESULT create_dom_range(nsIDOMRange*,compat_mode_t,IHTMLDOMRange**) DECLSPEC_HIDDEN;
HRESULT create_markup_pointer(IMarkupPointer**) DECLSPEC_HIDDEN; HRESULT create_markup_pointer(IMarkupPointer**) DECLSPEC_HIDDEN;
void detach_document_node(HTMLDocumentNode*) DECLSPEC_HIDDEN; void detach_document_node(HTMLDocumentNode*) DECLSPEC_HIDDEN;
......
...@@ -2066,7 +2066,7 @@ static dispex_static_data_t HTMLDOMRange_dispex = { ...@@ -2066,7 +2066,7 @@ static dispex_static_data_t HTMLDOMRange_dispex = {
HTMLDOMRange_iface_tids HTMLDOMRange_iface_tids
}; };
HRESULT HTMLDOMRange_Create(nsIDOMRange *nsrange, IHTMLDOMRange **p) HRESULT create_dom_range(nsIDOMRange *nsrange, compat_mode_t compat_mode, IHTMLDOMRange **p)
{ {
HTMLDOMRange *ret; HTMLDOMRange *ret;
...@@ -2074,7 +2074,7 @@ HRESULT HTMLDOMRange_Create(nsIDOMRange *nsrange, IHTMLDOMRange **p) ...@@ -2074,7 +2074,7 @@ HRESULT HTMLDOMRange_Create(nsIDOMRange *nsrange, IHTMLDOMRange **p)
if(!ret) if(!ret)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMRange_iface, &HTMLDOMRange_dispex); init_dispex_with_compat_mode(&ret->dispex, (IUnknown*)&ret->IHTMLDOMRange_iface, &HTMLDOMRange_dispex, compat_mode);
ret->IHTMLDOMRange_iface.lpVtbl = &HTMLDOMRangeVtbl; ret->IHTMLDOMRange_iface.lpVtbl = &HTMLDOMRangeVtbl;
ret->ref = 1; ret->ref = 1;
......
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