From d31f885436f6a94c84d59ae45521e0a31c991f54 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 7 Oct 2013 14:22:37 +0000 Subject: [PATCH] [MSHTML] * Sync with Wine 1.7.1. CORE-7469 svn path=/trunk/; revision=60578 --- reactos/boot/bootdata/packages/reactos.dff.in | 2 +- reactos/dll/cpl/appwiz/addons.c | 6 +- reactos/dll/win32/mshtml/binding.h | 7 +- reactos/dll/win32/mshtml/dispex.c | 6 +- reactos/dll/win32/mshtml/editor.c | 119 ++++++- reactos/dll/win32/mshtml/htmlanchor.c | 34 +- reactos/dll/win32/mshtml/htmlcurstyle.c | 7 +- reactos/dll/win32/mshtml/htmldoc.c | 59 +++- reactos/dll/win32/mshtml/htmlelem2.c | 9 +- reactos/dll/win32/mshtml/htmlinput.c | 127 +++++++- reactos/dll/win32/mshtml/htmlnode.c | 1 + reactos/dll/win32/mshtml/htmlstorage.c | 3 +- reactos/dll/win32/mshtml/htmlstyle.c | 15 +- reactos/dll/win32/mshtml/htmlstyle.h | 1 + reactos/dll/win32/mshtml/htmlstylesheet.c | 34 +- reactos/dll/win32/mshtml/htmltable.c | 59 +++- reactos/dll/win32/mshtml/htmltextnode.c | 21 +- reactos/dll/win32/mshtml/htmlwindow.c | 147 ++++++++- reactos/dll/win32/mshtml/main.c | 3 +- reactos/dll/win32/mshtml/mshtml_private.h | 23 +- reactos/dll/win32/mshtml/mutation.c | 19 +- reactos/dll/win32/mshtml/navigate.c | 15 +- reactos/dll/win32/mshtml/nsembed.c | 51 ++- reactos/dll/win32/mshtml/nsevents.c | 22 +- reactos/dll/win32/mshtml/nsiface.idl | 294 +++++++++++++----- reactos/dll/win32/mshtml/nsio.c | 71 +++-- reactos/dll/win32/mshtml/olecmd.c | 99 +----- reactos/dll/win32/mshtml/oleobj.c | 44 ++- reactos/dll/win32/mshtml/omnavigator.c | 26 +- reactos/dll/win32/mshtml/persist.c | 88 ++++-- reactos/dll/win32/mshtml/propbag.c | 8 +- reactos/dll/win32/mshtml/protocol.c | 32 +- reactos/dll/win32/mshtml/task.c | 24 +- reactos/media/doc/README.WINE | 2 +- 34 files changed, 1094 insertions(+), 384 deletions(-) diff --git a/reactos/boot/bootdata/packages/reactos.dff.in b/reactos/boot/bootdata/packages/reactos.dff.in index 9a2c54c5813..0b20c62cc4d 100644 --- a/reactos/boot/bootdata/packages/reactos.dff.in +++ b/reactos/boot/bootdata/packages/reactos.dff.in @@ -60,5 +60,5 @@ modules\optional\vmx_fb.dll 1 optional modules\optional\vmx_mode.dll 1 optional modules\optional\vmx_svga.inf 6 optional modules\optional\vmx_svga.sys 2 optional -modules\optional\wine_gecko-1.9-x86.msi 4 optional +modules\optional\wine_gecko-2.21-x86.msi 4 optional boot\bootdata\bootcdregtest\AHKAppTests.cmd 7 optional diff --git a/reactos/dll/cpl/appwiz/addons.c b/reactos/dll/cpl/appwiz/addons.c index 02b85142272..2e86442873b 100644 --- a/reactos/dll/cpl/appwiz/addons.c +++ b/reactos/dll/cpl/appwiz/addons.c @@ -39,11 +39,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(appwiz); -#define GECKO_VERSION "1.9" +#define GECKO_VERSION "2.21" #ifdef __i386__ #define ARCH_STRING "x86" -#define GECKO_SHA "cadf123dd7c4cedf2b22c066b6259e8649ac2b40" +#define GECKO_SHA "a514fc4d53783a586c7880a676c415695fe934a3" #else #define ARCH_STRING "" #define GECKO_SHA "???" @@ -73,7 +73,7 @@ static const addon_info_t *addon; static HWND install_dialog = NULL; -static WCHAR GeckoUrl[] = L"http://www.reactos.org/wine-gecko.php"; +static WCHAR GeckoUrl[] = L"http://dl.dropboxusercontent.com/u/743491/ReactOS/wine_gecko-2.21-x86.msi"; /* SHA definitions are copied from advapi32. They aren't available in headers. */ diff --git a/reactos/dll/win32/mshtml/binding.h b/reactos/dll/win32/mshtml/binding.h index 1366d98e6d1..392713b56f8 100644 --- a/reactos/dll/win32/mshtml/binding.h +++ b/reactos/dll/win32/mshtml/binding.h @@ -108,9 +108,9 @@ HRESULT create_redirect_nschannel(const WCHAR*,nsChannel*,nsChannel**) DECLSPEC_ nsresult on_start_uri_open(NSContainer*,nsIURI*,cpp_bool*) DECLSPEC_HIDDEN; HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsChannel*,DWORD,BOOL*) DECLSPEC_HIDDEN; -HRESULT create_doc_uri(HTMLOuterWindow*,const WCHAR*,nsWineURI**) DECLSPEC_HIDDEN; +HRESULT create_doc_uri(HTMLOuterWindow*,IUri*,nsWineURI**) DECLSPEC_HIDDEN; HRESULT load_nsuri(HTMLOuterWindow*,nsWineURI*,nsChannelBSC*,DWORD) DECLSPEC_HIDDEN; -HRESULT set_moniker(HTMLDocument*,IMoniker*,IBindCtx*,nsChannelBSC*,BOOL) DECLSPEC_HIDDEN; +HRESULT set_moniker(HTMLOuterWindow*,IMoniker*,IUri*,IBindCtx*,nsChannelBSC*,BOOL) DECLSPEC_HIDDEN; void prepare_for_binding(HTMLDocument*,IMoniker*,DWORD) DECLSPEC_HIDDEN; HRESULT super_navigate(HTMLOuterWindow*,IUri*,DWORD,const WCHAR*,BYTE*,DWORD) DECLSPEC_HIDDEN; HRESULT load_uri(HTMLOuterWindow*,IUri*,DWORD) DECLSPEC_HIDDEN; @@ -121,8 +121,9 @@ HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,BOOL,nsChannelBSC** HRESULT channelbsc_load_stream(HTMLInnerWindow*,IStream*) DECLSPEC_HIDDEN; void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*) DECLSPEC_HIDDEN; IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN; -HRESULT create_relative_uri(HTMLOuterWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN; +HRESULT create_relative_uri(HTMLOuterWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN; +HRESULT create_uri(const WCHAR*,DWORD,IUri**) DECLSPEC_HIDDEN; IUri *get_uri_nofrag(IUri*) DECLSPEC_HIDDEN; void set_current_mon(HTMLOuterWindow*,IMoniker*,DWORD) DECLSPEC_HIDDEN; diff --git a/reactos/dll/win32/mshtml/dispex.c b/reactos/dll/win32/mshtml/dispex.c index 209a98290e5..9b9a3910bcd 100644 --- a/reactos/dll/win32/mshtml/dispex.c +++ b/reactos/dll/win32/mshtml/dispex.c @@ -270,7 +270,7 @@ static void add_func_info(dispex_data_t *data, DWORD *size, tid_t tid, const FUN info->prop_vt = desc->elemdescFunc.tdesc.vt; if(info->prop_vt != VT_VOID && !is_arg_type_supported(info->prop_vt)) { - TRACE("%s: return type %d\n", debugstr_w(info->name), info->arg_types[i]); + TRACE("%s: return type %d\n", debugstr_w(info->name), info->prop_vt); return; /* Fallback to ITypeInfo::Invoke */ } @@ -1219,7 +1219,7 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD if(FAILED(hres)) return hres; - if(flags != (DISPATCH_PROPERTYGET|DISPATCH_METHOD)) { + if(flags != (DISPATCH_PROPERTYGET|DISPATCH_METHOD) || dp->cArgs) { if(V_VT(&v) != VT_DISPATCH) { FIXME("Not a function %s\n", debugstr_variant(&v)); VariantClear(&v); @@ -1231,7 +1231,7 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD }else if(res) { *res = v; }else { - IDispatch_Release(V_DISPATCH(&v)); + VariantClear(&v); } } } diff --git a/reactos/dll/win32/mshtml/editor.c b/reactos/dll/win32/mshtml/editor.c index ef72f9c3d4a..becf21a2fa4 100644 --- a/reactos/dll/win32/mshtml/editor.c +++ b/reactos/dll/win32/mshtml/editor.c @@ -29,6 +29,7 @@ //#include "winuser.h" #include #include +#include #include @@ -1019,17 +1020,17 @@ static HRESULT query_edit_status(HTMLDocument *This, OLECMD *cmd) static INT_PTR CALLBACK hyperlink_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { static const WCHAR wszOther[] = {'(','o','t','h','e','r',')',0}; + static const WCHAR wszFile[] = {'f','i','l','e',':',0}; + static const WCHAR wszFtp[] = {'f','t','p',':',0}; + static const WCHAR wszHttp[] = {'h','t','t','p',':',0}; + static const WCHAR wszHttps[] = {'h','t','t','p','s',':',0}; + static const WCHAR wszMailto[] = {'m','a','i','l','t','o',':',0}; + static const WCHAR wszNews[] = {'n','e','w','s',':',0}; switch (msg) { case WM_INITDIALOG: { - static const WCHAR wszFile[] = {'f','i','l','e',':',0}; - static const WCHAR wszFtp[] = {'f','t','p',':',0}; - static const WCHAR wszHttp[] = {'h','t','t','p',':',0}; - static const WCHAR wszHttps[] = {'h','t','t','p','s',':',0}; - static const WCHAR wszMailto[] = {'m','a','i','l','t','o',':',0}; - static const WCHAR wszNews[] = {'n','e','w','s',':',0}; INT def_idx; HWND hwndCB = GetDlgItem(hwnd, IDC_TYPE); HWND hwndURL = GetDlgItem(hwnd, IDC_URL); @@ -1105,8 +1106,9 @@ static INT_PTR CALLBACK hyperlink_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LP /* add new protocol */ if (*type != '\0') { - memcpy(url, type, strlenW(type) * sizeof(WCHAR)); - memcpy(url + strlenW(type), wszSlashSlash, sizeof(wszSlashSlash)); + memcpy(url, type, (strlenW(type) + 1) * sizeof(WCHAR)); + if (strcmpW(type, wszMailto) && strcmpW(type, wszNews)) + memcpy(url + strlenW(type), wszSlashSlash, sizeof(wszSlashSlash)); } SetWindowTextW(hwndURL, url); @@ -1265,3 +1267,104 @@ HRESULT editor_is_dirty(HTMLDocument *This) return modified ? S_OK : S_FALSE; } + +HRESULT setup_edit_mode(HTMLDocumentObj *doc) +{ + IMoniker *mon; + HRESULT hres; + + if(doc->usermode == EDITMODE) + return S_OK; + + doc->usermode = EDITMODE; + + if(doc->basedoc.window->mon) { + CLSID clsid = IID_NULL; + hres = IMoniker_GetClassID(doc->basedoc.window->mon, &clsid); + if(SUCCEEDED(hres)) { + /* We should use IMoniker::Save here */ + FIXME("Use CLSID %s\n", debugstr_guid(&clsid)); + } + } + + if(doc->frame) + IOleInPlaceFrame_SetStatusText(doc->frame, NULL); + + doc->basedoc.window->readystate = READYSTATE_UNINITIALIZED; + + if(doc->client) { + IOleCommandTarget *cmdtrg; + + hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&cmdtrg); + if(SUCCEEDED(hres)) { + VARIANT var; + + V_VT(&var) = VT_I4; + V_I4(&var) = 0; + IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL); + + IOleCommandTarget_Release(cmdtrg); + } + } + + if(doc->hostui) { + DOCHOSTUIINFO hostinfo; + + memset(&hostinfo, 0, sizeof(DOCHOSTUIINFO)); + hostinfo.cbSize = sizeof(DOCHOSTUIINFO); + hres = IDocHostUIHandler_GetHostInfo(doc->hostui, &hostinfo); + if(SUCCEEDED(hres)) + /* FIXME: use hostinfo */ + TRACE("hostinfo = {%u %08x %08x %s %s}\n", + hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick, + debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS)); + } + + update_doc(&doc->basedoc, UPDATE_UI); + + if(doc->basedoc.window->mon) { + /* FIXME: We should find nicer way to do this */ + remove_target_tasks(doc->basedoc.task_magic); + + mon = doc->basedoc.window->mon; + IMoniker_AddRef(mon); + }else { + static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; + + hres = CreateURLMoniker(NULL, about_blankW, &mon); + if(FAILED(hres)) { + FIXME("CreateURLMoniker failed: %08x\n", hres); + return hres; + } + } + + hres = IPersistMoniker_Load(&doc->basedoc.IPersistMoniker_iface, TRUE, mon, NULL, 0); + IMoniker_Release(mon); + if(FAILED(hres)) + return hres; + + if(doc->ui_active) { + if(doc->ip_window) + call_set_active_object(doc->ip_window, NULL); + if(doc->hostui) + IDocHostUIHandler_HideUI(doc->hostui); + } + + if(doc->ui_active) { + RECT rcBorderWidths; + + if(doc->hostui) + IDocHostUIHandler_ShowUI(doc->hostui, DOCHOSTUITYPE_AUTHOR, + &doc->basedoc.IOleInPlaceActiveObject_iface, &doc->basedoc.IOleCommandTarget_iface, + doc->frame, doc->ip_window); + + if(doc->ip_window) + call_set_active_object(doc->ip_window, &doc->basedoc.IOleInPlaceActiveObject_iface); + + memset(&rcBorderWidths, 0, sizeof(rcBorderWidths)); + if(doc->frame) + IOleInPlaceFrame_SetBorderSpace(doc->frame, &rcBorderWidths); + } + + return S_OK; +} diff --git a/reactos/dll/win32/mshtml/htmlanchor.c b/reactos/dll/win32/mshtml/htmlanchor.c index abad022f3e4..0018933359f 100644 --- a/reactos/dll/win32/mshtml/htmlanchor.c +++ b/reactos/dll/win32/mshtml/htmlanchor.c @@ -269,15 +269,31 @@ static HRESULT WINAPI HTMLAnchorElement_get_target(IHTMLAnchorElement *iface, BS static HRESULT WINAPI HTMLAnchorElement_put_rel(IHTMLAnchorElement *iface, BSTR v) { HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_InitDepend(&nsstr, v); + nsres = nsIDOMHTMLAnchorElement_SetRel(This->nsanchor, &nsstr); + nsAString_Finish(&nsstr); + if(NS_FAILED(nsres)) + return E_FAIL; + + return S_OK; } static HRESULT WINAPI HTMLAnchorElement_get_rel(IHTMLAnchorElement *iface, BSTR *p) { HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&nsstr, NULL); + nsres = nsIDOMHTMLAnchorElement_GetRel(This->nsanchor, &nsstr); + return return_nsstr(nsres, &nsstr, p); } static HRESULT WINAPI HTMLAnchorElement_put_rev(IHTMLAnchorElement *iface, BSTR v) @@ -453,8 +469,14 @@ static HRESULT WINAPI HTMLAnchorElement_put_hash(IHTMLAnchorElement *iface, BSTR static HRESULT WINAPI HTMLAnchorElement_get_hash(IHTMLAnchorElement *iface, BSTR *p) { HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString hash_str; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&hash_str, NULL); + nsres = nsIDOMHTMLAnchorElement_GetHash(This->nsanchor, &hash_str); + return return_nsstr(nsres, &hash_str, p); } static HRESULT WINAPI HTMLAnchorElement_put_onblur(IHTMLAnchorElement *iface, VARIANT v) diff --git a/reactos/dll/win32/mshtml/htmlcurstyle.c b/reactos/dll/win32/mshtml/htmlcurstyle.c index 5a1af3aecf6..911ba552657 100644 --- a/reactos/dll/win32/mshtml/htmlcurstyle.c +++ b/reactos/dll/win32/mshtml/htmlcurstyle.c @@ -982,8 +982,11 @@ static HRESULT WINAPI HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentSt static HRESULT WINAPI HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + FIXME("(%p)->(%p) returning true\n", This, p); + + *p = VARIANT_TRUE; + return S_OK; } static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2 *iface, VARIANT *p) diff --git a/reactos/dll/win32/mshtml/htmldoc.c b/reactos/dll/win32/mshtml/htmldoc.c index fdcbd72cf5e..69cb446d6a9 100644 --- a/reactos/dll/win32/mshtml/htmldoc.c +++ b/reactos/dll/win32/mshtml/htmldoc.c @@ -409,15 +409,55 @@ static HRESULT WINAPI HTMLDocument_get_title(IHTMLDocument2 *iface, BSTR *p) static HRESULT WINAPI HTMLDocument_get_scripts(IHTMLDocument2 *iface, IHTMLElementCollection **p) { HTMLDocument *This = impl_from_IHTMLDocument2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsIDOMHTMLCollection *nscoll = NULL; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + if(!p) + return E_INVALIDARG; + + *p = NULL; + + if(!This->doc_node->nsdoc) { + WARN("NULL nsdoc\n"); + return E_UNEXPECTED; + } + + nsres = nsIDOMHTMLDocument_GetScripts(This->doc_node->nsdoc, &nscoll); + if(NS_FAILED(nsres)) { + ERR("GetImages failed: %08x\n", nsres); + return E_FAIL; + } + + if(nscoll) { + *p = create_collection_from_htmlcol(This->doc_node, nscoll); + nsIDOMHTMLCollection_Release(nscoll); + } + + return S_OK; } static HRESULT WINAPI HTMLDocument_put_designMode(IHTMLDocument2 *iface, BSTR v) { HTMLDocument *This = impl_from_IHTMLDocument2(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + HRESULT hres; + + static const WCHAR onW[] = {'o','n',0}; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + if(strcmpiW(v, onW)) { + FIXME("Unsupported arg %s\n", debugstr_w(v)); + return E_NOTIMPL; + } + + hres = setup_edit_mode(This->doc_obj); + if(FAILED(hres)) + return hres; + + call_property_onchanged(&This->cp_container, DISPID_IHTMLDOCUMENT2_DESIGNMODE); + return S_OK; } static HRESULT WINAPI HTMLDocument_get_designMode(IHTMLDocument2 *iface, BSTR *p) @@ -696,7 +736,7 @@ static HRESULT WINAPI HTMLDocument_get_cookie(IHTMLDocument2 *iface, BSTR *p) return S_OK; } - *p = SysAllocStringLen(NULL, size-1); + *p = SysAllocStringLen(NULL, size/sizeof(WCHAR)-1); if(!*p) return E_OUTOFMEMORY; @@ -821,6 +861,7 @@ static HRESULT WINAPI HTMLDocument_get_nameProp(IHTMLDocument2 *iface, BSTR *p) static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln) { VARIANT *var, tmp; + JSContext *jsctx; nsAString nsstr; ULONG i, argc; nsresult nsres; @@ -847,6 +888,7 @@ static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln) V_VT(&tmp) = VT_EMPTY; + jsctx = get_context_from_document(This->doc_node->nsdoc); argc = psarray->rgsabound[0].cElements; for(i=0; i < argc; i++) { if(V_VT(var+i) == VT_BSTR) { @@ -861,9 +903,9 @@ static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln) } if(!ln || i != argc-1) - nsres = nsIDOMHTMLDocument_Write(This->doc_node->nsdoc, &nsstr, NULL /* FIXME! */); + nsres = nsIDOMHTMLDocument_Write(This->doc_node->nsdoc, &nsstr, jsctx); else - nsres = nsIDOMHTMLDocument_Writeln(This->doc_node->nsdoc, &nsstr, NULL /* FIXME! */); + nsres = nsIDOMHTMLDocument_Writeln(This->doc_node->nsdoc, &nsstr, jsctx); nsAString_Finish(&nsstr); if(V_VT(var+i) != VT_BSTR) VariantClear(&tmp); @@ -918,7 +960,8 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT || V_VT(&features) != VT_ERROR || V_VT(&replace) != VT_ERROR) FIXME("unsupported args\n"); - nsres = nsIDOMHTMLDocument_Open(This->doc_node->nsdoc, NULL, NULL, NULL, NULL, 0, &tmp); + nsres = nsIDOMHTMLDocument_Open(This->doc_node->nsdoc, NULL, NULL, NULL, + get_context_from_document(This->doc_node->nsdoc), 0, &tmp); if(NS_FAILED(nsres)) { ERR("Open failed: %08x\n", nsres); return E_FAIL; diff --git a/reactos/dll/win32/mshtml/htmlelem2.c b/reactos/dll/win32/mshtml/htmlelem2.c index 6a62fff92e9..a44a2118ecf 100644 --- a/reactos/dll/win32/mshtml/htmlelem2.c +++ b/reactos/dll/win32/mshtml/htmlelem2.c @@ -985,6 +985,7 @@ static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p) return S_OK; } + nsAString_Init(&dir_str, NULL); nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str); return return_nsstr(nsres, &dir_str, p); } @@ -1256,22 +1257,22 @@ static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BS IHTMLElementCollection **pelColl) { HTMLElement *This = impl_from_IHTMLElement2(iface); - nsIDOMNodeList *nslist; + nsIDOMHTMLCollection *nscol; nsAString tag_str; nsresult nsres; TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl); nsAString_InitDepend(&tag_str, v); - nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str, &nslist); + nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str, &nscol); nsAString_Finish(&tag_str); if(NS_FAILED(nsres)) { ERR("GetElementByTagName failed: %08x\n", nsres); return E_FAIL; } - *pelColl = create_collection_from_nodelist(This->node.doc, nslist); - nsIDOMNodeList_Release(nslist); + *pelColl = create_collection_from_htmlcol(This->node.doc, nscol); + nsIDOMHTMLCollection_Release(nscol); return S_OK; } diff --git a/reactos/dll/win32/mshtml/htmlinput.c b/reactos/dll/win32/mshtml/htmlinput.c index c4337b9f8ff..78c4ebf6da9 100644 --- a/reactos/dll/win32/mshtml/htmlinput.c +++ b/reactos/dll/win32/mshtml/htmlinput.c @@ -46,6 +46,8 @@ typedef struct { nsIDOMHTMLInputElement *nsinput; } HTMLInputElement; +static const WCHAR forW[] = {'f','o','r',0}; + static inline HTMLInputElement *impl_from_IHTMLInputElement(IHTMLInputElement *iface) { return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputElement_iface); @@ -1314,15 +1316,50 @@ static HRESULT WINAPI HTMLLabelElement_Invoke(IHTMLLabelElement *iface, DISPID d static HRESULT WINAPI HTMLLabelElement_put_htmlFor(IHTMLLabelElement *iface, BSTR v) { HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString for_str, val_str; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_InitDepend(&for_str, forW); + nsAString_InitDepend(&val_str, v); + nsres = nsIDOMHTMLElement_SetAttribute(This->element.nselem, &for_str, &val_str); + nsAString_Finish(&for_str); + nsAString_Finish(&val_str); + if(NS_FAILED(nsres)) { + ERR("SetAttribute failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLLabelElement_get_htmlFor(IHTMLLabelElement *iface, BSTR *p) { HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString for_str, val_str; + nsresult nsres; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_InitDepend(&for_str, forW); + nsAString_Init(&val_str, NULL); + nsres = nsIDOMHTMLElement_GetAttribute(This->element.nselem, &for_str, &val_str); + nsAString_Finish(&for_str); + if(NS_SUCCEEDED(nsres)) { + const PRUnichar *val; + + nsAString_GetData(&val_str, &val); + *p = SysAllocString(val); + hres = *p ? S_OK : E_OUTOFMEMORY; + }else { + ERR("GetAttribute failed: %08x\n", nsres); + hres = E_FAIL; + } + + nsAString_Finish(&val_str); + return hres; } static HRESULT WINAPI HTMLLabelElement_put_accessKey(IHTMLLabelElement *iface, BSTR v) @@ -1420,6 +1457,8 @@ typedef struct { HTMLElement element; IHTMLButtonElement IHTMLButtonElement_iface; + + nsIDOMHTMLButtonElement *nsbutton; } HTMLButtonElement; static inline HTMLButtonElement *impl_from_IHTMLButtonElement(IHTMLButtonElement *iface) @@ -1507,15 +1546,33 @@ static HRESULT WINAPI HTMLButtonElement_get_value(IHTMLButtonElement *iface, BST static HRESULT WINAPI HTMLButtonElement_put_name(IHTMLButtonElement *iface, BSTR v) { HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString name_str; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_InitDepend(&name_str, v); + nsres = nsIDOMHTMLButtonElement_SetName(This->nsbutton, &name_str); + nsAString_Finish(&name_str); + if(NS_FAILED(nsres)) { + ERR("SetName failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLButtonElement_get_name(IHTMLButtonElement *iface, BSTR *p) { HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString name_str; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&name_str, NULL); + nsres = nsIDOMHTMLButtonElement_GetName(This->nsbutton, &name_str); + return return_nsstr(nsres, &name_str, p); } static HRESULT WINAPI HTMLButtonElement_put_status(IHTMLButtonElement *iface, VARIANT v) @@ -1535,15 +1592,35 @@ static HRESULT WINAPI HTMLButtonElement_get_status(IHTMLButtonElement *iface, VA static HRESULT WINAPI HTMLButtonElement_put_disabled(IHTMLButtonElement *iface, VARIANT_BOOL v) { HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - FIXME("(%p)->(%x)\n", This, v); - return E_NOTIMPL; + nsresult nsres; + + TRACE("(%p)->(%x)\n", This, v); + + nsres = nsIDOMHTMLButtonElement_SetDisabled(This->nsbutton, !!v); + if(NS_FAILED(nsres)) { + ERR("SetDisabled failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLButtonElement_get_disabled(IHTMLButtonElement *iface, VARIANT_BOOL *p) { HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + cpp_bool disabled; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMHTMLButtonElement_GetDisabled(This->nsbutton, &disabled); + if(NS_FAILED(nsres)) { + ERR("GetDisabled failed: %08x\n", nsres); + return E_FAIL; + } + + *p = disabled ? VARIANT_TRUE : VARIANT_FALSE; + return S_OK; } static HRESULT WINAPI HTMLButtonElement_get_form(IHTMLButtonElement *iface, IHTMLFormElement **p) @@ -1606,6 +1683,18 @@ static HRESULT HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) return S_OK; } +static HRESULT HTMLButtonElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v) +{ + HTMLButtonElement *This = button_from_HTMLDOMNode(iface); + return IHTMLButtonElement_put_disabled(&This->IHTMLButtonElement_iface, v); +} + +static HRESULT HTMLButtonElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p) +{ + HTMLButtonElement *This = button_from_HTMLDOMNode(iface); + return IHTMLButtonElement_get_disabled(&This->IHTMLButtonElement_iface, p); +} + static const NodeImplVtbl HTMLButtonElementImplVtbl = { HTMLButtonElement_QI, HTMLElement_destructor, @@ -1613,6 +1702,10 @@ static const NodeImplVtbl HTMLButtonElementImplVtbl = { HTMLElement_clone, HTMLElement_handle_event, HTMLElement_get_attr_col, + NULL, + NULL, + HTMLButtonElementImpl_put_disabled, + HTMLButtonElementImpl_get_disabled }; static const tid_t HTMLButtonElement_iface_tids[] = { @@ -1631,8 +1724,7 @@ static dispex_static_data_t HTMLButtonElement_dispex = { HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem) { HTMLButtonElement *ret; - - ERR("!!!\n"); + nsresult nsres; ret = heap_alloc_zero(sizeof(*ret)); if(!ret) @@ -1642,6 +1734,13 @@ HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele ret->element.node.vtbl = &HTMLButtonElementImplVtbl; HTMLElement_Init(&ret->element, doc, nselem, &HTMLButtonElement_dispex); + + nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLButtonElement, (void**)&ret->nsbutton); + + /* Share nsbutton reference with nsnode */ + assert(nsres == NS_OK && (nsIDOMNode*)ret->nsbutton == ret->element.node.nsnode); + nsIDOMNode_Release(ret->element.node.nsnode); + *elem = &ret->element; return S_OK; } diff --git a/reactos/dll/win32/mshtml/htmlnode.c b/reactos/dll/win32/mshtml/htmlnode.c index dd7c8b96f2e..bb5db965c36 100644 --- a/reactos/dll/win32/mshtml/htmlnode.c +++ b/reactos/dll/win32/mshtml/htmlnode.c @@ -1215,6 +1215,7 @@ HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDO if(unk) { *ret = get_node_obj((IHTMLDOMNode*)unk); + nsISupports_Release(unk); return NS_OK; } diff --git a/reactos/dll/win32/mshtml/htmlstorage.c b/reactos/dll/win32/mshtml/htmlstorage.c index d764442707f..9ad18e50299 100644 --- a/reactos/dll/win32/mshtml/htmlstorage.c +++ b/reactos/dll/win32/mshtml/htmlstorage.c @@ -98,8 +98,7 @@ static ULONG WINAPI HTMLStorage_Release(IHTMLStorage *iface) static HRESULT WINAPI HTMLStorage_GetTypeInfoCount(IHTMLStorage *iface, UINT *pctinfo) { HTMLStorage *This = impl_from_IHTMLStorage(iface); - FIXME("(%p)->(%p)\n", This, pctinfo); - return E_NOTIMPL; + return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); } static HRESULT WINAPI HTMLStorage_GetTypeInfo(IHTMLStorage *iface, UINT iTInfo, diff --git a/reactos/dll/win32/mshtml/htmlstyle.c b/reactos/dll/win32/mshtml/htmlstyle.c index c78b726a85b..e04b608c9fc 100644 --- a/reactos/dll/win32/mshtml/htmlstyle.c +++ b/reactos/dll/win32/mshtml/htmlstyle.c @@ -174,6 +174,8 @@ static const WCHAR attrVerticalAlign[] = {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0}; static const WCHAR attrVisibility[] = {'v','i','s','i','b','i','l','i','t','y',0}; +static const WCHAR attrWhiteSpace[] = + {'w','h','i','t','e','-','s','p','a','c','e',0}; static const WCHAR attrWidth[] = {'w','i','d','t','h',0}; static const WCHAR attrWordSpacing[] = @@ -260,6 +262,7 @@ static const style_tbl_entry_t style_tbl[] = { {attrTop, DISPID_IHTMLSTYLE_TOP}, {attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN}, {attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY}, + {attrWhiteSpace, DISPID_IHTMLSTYLE_WHITESPACE}, {attrWidth, DISPID_IHTMLSTYLE_WIDTH}, {attrWordSpacing, DISPID_IHTMLSTYLE_WORDSPACING}, {attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP}, @@ -2217,15 +2220,19 @@ static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p) static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return set_nsstyle_attr(This->nsstyle, STYLEID_WHITE_SPACE, v, 0); } static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_nsstyle_attr(This->nsstyle, STYLEID_WHITE_SPACE, p, 0); } static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v) diff --git a/reactos/dll/win32/mshtml/htmlstyle.h b/reactos/dll/win32/mshtml/htmlstyle.h index 0a45e05db80..4f2e5ab3421 100644 --- a/reactos/dll/win32/mshtml/htmlstyle.h +++ b/reactos/dll/win32/mshtml/htmlstyle.h @@ -101,6 +101,7 @@ typedef enum { STYLEID_TOP, STYLEID_VERTICAL_ALIGN, STYLEID_VISIBILITY, + STYLEID_WHITE_SPACE, STYLEID_WIDTH, STYLEID_WORD_SPACING, STYLEID_WORD_WRAP, diff --git a/reactos/dll/win32/mshtml/htmlstylesheet.c b/reactos/dll/win32/mshtml/htmlstylesheet.c index 787f89051bb..8896ee8c8c7 100644 --- a/reactos/dll/win32/mshtml/htmlstylesheet.c +++ b/reactos/dll/win32/mshtml/htmlstylesheet.c @@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); struct HTMLStyleSheet { + DispatchEx dispex; IHTMLStyleSheet IHTMLStyleSheet_iface; LONG ref; @@ -415,6 +416,8 @@ static HRESULT WINAPI HTMLStyleSheet_QueryInterface(IHTMLStyleSheet *iface, REFI }else if(IsEqualGUID(&IID_IHTMLStyleSheet, riid)) { TRACE("(%p)->(IID_IHTMLStyleSheet %p)\n", This, ppv); *ppv = &This->IHTMLStyleSheet_iface; + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { + return *ppv ? S_OK : E_NOINTERFACE; } if(*ppv) { @@ -452,16 +455,16 @@ static ULONG WINAPI HTMLStyleSheet_Release(IHTMLStyleSheet *iface) static HRESULT WINAPI HTMLStyleSheet_GetTypeInfoCount(IHTMLStyleSheet *iface, UINT *pctinfo) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface); - FIXME("(%p)->(%p)\n", This, pctinfo); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, pctinfo); + return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); } static HRESULT WINAPI HTMLStyleSheet_GetTypeInfo(IHTMLStyleSheet *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface); - FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); - return E_NOTIMPL; + TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); } static HRESULT WINAPI HTMLStyleSheet_GetIDsOfNames(IHTMLStyleSheet *iface, REFIID riid, @@ -469,9 +472,8 @@ static HRESULT WINAPI HTMLStyleSheet_GetIDsOfNames(IHTMLStyleSheet *iface, REFII LCID lcid, DISPID *rgDispId) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface); - FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, - lcid, rgDispId); - return E_NOTIMPL; + TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); + return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); } static HRESULT WINAPI HTMLStyleSheet_Invoke(IHTMLStyleSheet *iface, DISPID dispIdMember, @@ -479,9 +481,10 @@ static HRESULT WINAPI HTMLStyleSheet_Invoke(IHTMLStyleSheet *iface, DISPID dispI VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface); - FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - return E_NOTIMPL; + return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, + pVarResult, pExcepInfo, puArgErr); } static HRESULT WINAPI HTMLStyleSheet_put_title(IHTMLStyleSheet *iface, BSTR v) @@ -679,6 +682,17 @@ static const IHTMLStyleSheetVtbl HTMLStyleSheetVtbl = { HTMLStyleSheet_get_rules }; +static const tid_t HTMLStyleSheet_iface_tids[] = { + IHTMLStyleSheet_tid, + 0 +}; +static dispex_static_data_t HTMLStyleSheet_dispex = { + NULL, + DispHTMLStyleSheet_tid, + NULL, + HTMLStyleSheet_iface_tids +}; + IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet *nsstylesheet) { HTMLStyleSheet *ret = heap_alloc(sizeof(HTMLStyleSheet)); @@ -688,6 +702,8 @@ IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet *nsstylesheet) ret->ref = 1; ret->nsstylesheet = NULL; + init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLStyleSheet_iface, &HTMLStyleSheet_dispex); + if(nsstylesheet) { nsres = nsIDOMStyleSheet_QueryInterface(nsstylesheet, &IID_nsIDOMCSSStyleSheet, (void**)&ret->nsstylesheet); diff --git a/reactos/dll/win32/mshtml/htmltable.c b/reactos/dll/win32/mshtml/htmltable.c index f25f39c74dc..31b32c97a31 100644 --- a/reactos/dll/win32/mshtml/htmltable.c +++ b/reactos/dll/win32/mshtml/htmltable.c @@ -173,15 +173,49 @@ static HRESULT WINAPI HTMLTable_get_rules(IHTMLTable *iface, BSTR *p) static HRESULT WINAPI HTMLTable_put_cellSpacing(IHTMLTable *iface, VARIANT v) { HTMLTable *This = impl_from_IHTMLTable(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + nsAString nsstr; + WCHAR buf[64]; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + switch(V_VT(&v)) { + case VT_BSTR: + nsAString_InitDepend(&nsstr, V_BSTR(&v)); + break; + case VT_I4: { + static const WCHAR formatW[] = {'%','d',0}; + sprintfW(buf, formatW, V_I4(&v)); + nsAString_InitDepend(&nsstr, buf); + break; + } + default: + FIXME("unsupported arg %s\n", debugstr_variant(&v)); + return E_NOTIMPL; + } + + nsres = nsIDOMHTMLTableElement_SetCellSpacing(This->nstable, &nsstr); + nsAString_Finish(&nsstr); + if(NS_FAILED(nsres)) { + ERR("SetCellSpacing failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLTable_get_cellSpacing(IHTMLTable *iface, VARIANT *p) { HTMLTable *This = impl_from_IHTMLTable(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&nsstr, NULL); + nsres = nsIDOMHTMLTableElement_GetCellSpacing(This->nstable, &nsstr); + V_VT(p) = VT_BSTR; + return return_nsstr(nsres, &nsstr, &V_BSTR(p)); } static HRESULT WINAPI HTMLTable_put_cellPadding(IHTMLTable *iface, VARIANT v) @@ -382,8 +416,21 @@ static HRESULT WINAPI HTMLTable_get_tFoot(IHTMLTable *iface, IHTMLTableSection * static HRESULT WINAPI HTMLTable_get_tBodies(IHTMLTable *iface, IHTMLElementCollection **p) { HTMLTable *This = impl_from_IHTMLTable(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsIDOMHTMLCollection *nscol = NULL; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMHTMLTableElement_GetTBodies(This->nstable, &nscol); + if(NS_FAILED(nsres)) { + ERR("GetTBodies failed: %08x\n", nsres); + return E_FAIL; + } + + *p = create_collection_from_htmlcol(This->element.node.doc, nscol); + + nsIDOMHTMLCollection_Release(nscol); + return S_OK; } static HRESULT WINAPI HTMLTable_get_caption(IHTMLTable *iface, IHTMLTableCaption **p) diff --git a/reactos/dll/win32/mshtml/htmltextnode.c b/reactos/dll/win32/mshtml/htmltextnode.c index 3297450bf5f..3908314f584 100644 --- a/reactos/dll/win32/mshtml/htmltextnode.c +++ b/reactos/dll/win32/mshtml/htmltextnode.c @@ -103,15 +103,28 @@ static HRESULT WINAPI HTMLDOMTextNode_Invoke(IHTMLDOMTextNode *iface, DISPID dis static HRESULT WINAPI HTMLDOMTextNode_put_data(IHTMLDOMTextNode *iface, BSTR v) { HTMLDOMTextNode *This = impl_from_IHTMLDOMTextNode(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_InitDepend(&nsstr, v); + nsres = nsIDOMText_SetData(This->nstext, &nsstr); + nsAString_Finish(&nsstr); + return NS_SUCCEEDED(nsres) ? S_OK : E_FAIL; } static HRESULT WINAPI HTMLDOMTextNode_get_data(IHTMLDOMTextNode *iface, BSTR *p) { HTMLDOMTextNode *This = impl_from_IHTMLDOMTextNode(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&nsstr, NULL); + nsres = nsIDOMText_GetData(This->nstext, &nsstr); + return return_nsstr(nsres, &nsstr, p); } static HRESULT WINAPI HTMLDOMTextNode_toString(IHTMLDOMTextNode *iface, BSTR *String) diff --git a/reactos/dll/win32/mshtml/htmlwindow.c b/reactos/dll/win32/mshtml/htmlwindow.c index 4026dfe0014..cfc98af35ae 100644 --- a/reactos/dll/win32/mshtml/htmlwindow.c +++ b/reactos/dll/win32/mshtml/htmlwindow.c @@ -30,7 +30,8 @@ #include #include #include -#include "shobjidl.h" +#include +#include #define NO_SHLWAPI_REG #include "shlwapi.h" @@ -176,6 +177,9 @@ static HRESULT WINAPI HTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID rii }else if(IsEqualGUID(&IID_ITravelLogClient, riid)) { TRACE("(%p)->(IID_ITravelLogClient %p)\n", This, ppv); *ppv = &This->ITravelLogClient_iface; + }else if(IsEqualGUID(&IID_IObjectIdentity, riid)) { + TRACE("(%p)->(IID_IObjectIdentity %p)\n", This, ppv); + *ppv = &This->IObjectIdentity_iface; }else if(dispex_query_interface(&This->inner_window->dispex, riid, ppv)) { assert(!*ppv); return E_NOINTERFACE; @@ -266,8 +270,12 @@ static void release_inner_window(HTMLInnerWindow *This) if(This->screen) IHTMLScreen_Release(This->screen); - if(This->history) - IOmHistory_Release(This->history); + + if(This->history) { + This->history->window = NULL; + IOmHistory_Release(&This->history->IOmHistory_iface); + } + if(This->mon) IMoniker_Release(This->mon); @@ -765,20 +773,89 @@ static HRESULT WINAPI HTMLWindow2_get_history(IHTMLWindow2 *iface, IOmHistory ** if(!window->history) { HRESULT hres; - hres = create_history(&window->history); + hres = create_history(window, &window->history); if(FAILED(hres)) return hres; } - IOmHistory_AddRef(window->history); - *p = window->history; + IOmHistory_AddRef(&window->history->IOmHistory_iface); + *p = &window->history->IOmHistory_iface; return S_OK; } +static BOOL notify_webbrowser_close(HTMLOuterWindow *window, HTMLDocumentObj *doc) +{ + IConnectionPointContainer *cp_container; + VARIANT_BOOL cancel = VARIANT_FALSE; + IEnumConnections *enum_conn; + VARIANT args[2]; + DISPPARAMS dp = {args, NULL, 2, 0}; + CONNECTDATA conn_data; + IConnectionPoint *cp; + IDispatch *disp; + ULONG fetched; + HRESULT hres; + + if(!doc->webbrowser) + return TRUE; + + hres = IUnknown_QueryInterface(doc->webbrowser, &IID_IConnectionPointContainer, (void**)&cp_container); + if(FAILED(hres)) + return TRUE; + + hres = IConnectionPointContainer_FindConnectionPoint(cp_container, &DIID_DWebBrowserEvents2, &cp); + IConnectionPointContainer_Release(cp_container); + if(FAILED(hres)) + return TRUE; + + hres = IConnectionPoint_EnumConnections(cp, &enum_conn); + IConnectionPoint_Release(cp); + if(FAILED(hres)) + return TRUE; + + while(!cancel) { + conn_data.pUnk = NULL; + conn_data.dwCookie = 0; + fetched = 0; + hres = IEnumConnections_Next(enum_conn, 1, &conn_data, &fetched); + if(hres != S_OK) + break; + + hres = IUnknown_QueryInterface(conn_data.pUnk, &IID_IDispatch, (void**)&disp); + IUnknown_Release(conn_data.pUnk); + if(FAILED(hres)) + continue; + + V_VT(args) = VT_BYREF|VT_BOOL; + V_BOOLREF(args) = &cancel; + V_VT(args+1) = VT_BOOL; + V_BOOL(args+1) = window->parent ? VARIANT_TRUE : VARIANT_FALSE; + hres = IDispatch_Invoke(disp, DISPID_WINDOWCLOSING, &IID_NULL, 0, DISPATCH_METHOD, &dp, NULL, NULL, NULL); + IDispatch_Release(disp); + if(FAILED(hres)) + cancel = VARIANT_FALSE; + } + + IEnumConnections_Release(enum_conn); + return !cancel; +} + static HRESULT WINAPI HTMLWindow2_close(IHTMLWindow2 *iface) { HTMLWindow *This = impl_from_IHTMLWindow2(iface); - FIXME("(%p)->()\n", This); + HTMLOuterWindow *window = This->outer_window; + + TRACE("(%p)\n", This); + + if(!window->doc_obj) { + FIXME("No document object\n"); + return E_FAIL; + } + + if(!notify_webbrowser_close(window, window->doc_obj)) + return S_OK; + + FIXME("default action not implemented\n"); return E_NOTIMPL; } @@ -2086,7 +2163,7 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface, translated_url = NULL; } - hres = CreateUri(translated_url ? translated_url : url, 0, 0, &uri); + hres = create_uri(translated_url ? translated_url : url, 0, &uri); CoTaskMemFree(translated_url); if(FAILED(hres)) return hres; @@ -2224,6 +2301,57 @@ static const ITravelLogClientVtbl TravelLogClientVtbl = { TravelLogClient_LoadHistoryPosition }; +static inline HTMLWindow *impl_from_IObjectIdentity(IObjectIdentity *iface) +{ + return CONTAINING_RECORD(iface, HTMLWindow, IObjectIdentity_iface); +} + +static HRESULT WINAPI ObjectIdentity_QueryInterface(IObjectIdentity *iface, REFIID riid, void **ppv) +{ + HTMLWindow *This = impl_from_IObjectIdentity(iface); + + return IHTMLWindow2_QueryInterface(&This->IHTMLWindow2_iface, riid, ppv); +} + +static ULONG WINAPI ObjectIdentity_AddRef(IObjectIdentity *iface) +{ + HTMLWindow *This = impl_from_IObjectIdentity(iface); + + return IHTMLWindow2_AddRef(&This->IHTMLWindow2_iface); +} + +static ULONG WINAPI ObjectIdentity_Release(IObjectIdentity *iface) +{ + HTMLWindow *This = impl_from_IObjectIdentity(iface); + + return IHTMLWindow2_Release(&This->IHTMLWindow2_iface); +} + +static HRESULT WINAPI ObjectIdentity_IsEqualObject(IObjectIdentity *iface, IUnknown *unk) +{ + HTMLWindow *This = impl_from_IObjectIdentity(iface); + IServiceProvider *sp; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, unk); + + hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (void**)&sp); + if(hres != S_OK) + return hres; + + hres = &This->inner_window->base.IServiceProvider_iface==sp || + &This->outer_window->base.IServiceProvider_iface==sp ? S_OK : S_FALSE; + IServiceProvider_Release(sp); + return hres; +} + +static const IObjectIdentityVtbl ObjectIdentityVtbl = { + ObjectIdentity_QueryInterface, + ObjectIdentity_AddRef, + ObjectIdentity_Release, + ObjectIdentity_IsEqualObject +}; + static inline HTMLWindow *impl_from_IDispatchEx(IDispatchEx *iface) { return CONTAINING_RECORD(iface, HTMLWindow, IDispatchEx_iface); @@ -2722,6 +2850,7 @@ static void *alloc_window(size_t size) window->IDispatchEx_iface.lpVtbl = &WindowDispExVtbl; window->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl; window->ITravelLogClient_iface.lpVtbl = &TravelLogClientVtbl; + window->IObjectIdentity_iface.lpVtbl = &ObjectIdentityVtbl; window->ref = 1; return window; @@ -2882,7 +3011,7 @@ HRESULT update_window_doc(HTMLInnerWindow *window) static const PRUnichar onW[] = {'o','n',0}; - nsAString_Init(&mode_str, onW); + nsAString_InitDepend(&mode_str, onW); nsres = nsIDOMHTMLDocument_SetDesignMode(window->doc->nsdoc, &mode_str); nsAString_Finish(&mode_str); if(NS_FAILED(nsres)) diff --git a/reactos/dll/win32/mshtml/main.c b/reactos/dll/win32/mshtml/main.c index 7b23b9770ae..c96f10633ca 100644 --- a/reactos/dll/win32/mshtml/main.c +++ b/reactos/dll/win32/mshtml/main.c @@ -167,13 +167,14 @@ HDC get_display_dc(void) return display_dc; } -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved) { switch(fdwReason) { case DLL_PROCESS_ATTACH: hInst = hInstDLL; break; case DLL_PROCESS_DETACH: + if (reserved) break; process_detach(); break; case DLL_THREAD_DETACH: diff --git a/reactos/dll/win32/mshtml/mshtml_private.h b/reactos/dll/win32/mshtml/mshtml_private.h index d2eb8707a26..b7d8a49e55d 100644 --- a/reactos/dll/win32/mshtml/mshtml_private.h +++ b/reactos/dll/win32/mshtml/mshtml_private.h @@ -28,6 +28,7 @@ #include "objsafe.h" #include "htiframe.h" #include "tlogstg.h" +#include #include #include @@ -105,6 +106,7 @@ typedef struct event_target_t event_target_t; XDIID(DispHTMLSelectElement) \ XDIID(DispHTMLStyle) \ XDIID(DispHTMLStyleElement) \ + XDIID(DispHTMLStyleSheet) \ XDIID(DispHTMLStyleSheetsCollection) \ XDIID(DispHTMLTable) \ XDIID(DispHTMLTableCell) \ @@ -177,6 +179,7 @@ typedef struct event_target_t event_target_t; XIID(IHTMLStyle5) \ XIID(IHTMLStyle6) \ XIID(IHTMLStyleElement) \ + XIID(IHTMLStyleSheet) \ XIID(IHTMLStyleSheetsCollection) \ XIID(IHTMLTable) \ XIID(IHTMLTable2) \ @@ -338,6 +341,15 @@ struct HTMLLocation { HTMLInnerWindow *window; }; +typedef struct { + DispatchEx dispex; + IOmHistory IOmHistory_iface; + + LONG ref; + + HTMLInnerWindow *window; +} OmHistory; + typedef struct { HTMLOuterWindow *window; LONG ref; @@ -355,6 +367,7 @@ struct HTMLWindow { IDispatchEx IDispatchEx_iface; IServiceProvider IServiceProvider_iface; ITravelLogClient ITravelLogClient_iface; + IObjectIdentity IObjectIdentity_iface; LONG ref; @@ -403,7 +416,7 @@ struct HTMLInnerWindow { HTMLImageElementFactory *image_factory; HTMLOptionElementFactory *option_factory; IHTMLScreen *screen; - IOmHistory *history; + OmHistory *history; IHTMLStorage *session_storage; unsigned parser_callback_cnt; @@ -544,6 +557,9 @@ struct HTMLDocumentObj { IOleInPlaceUIWindow *ip_window; IAdviseSink *view_sink; IDocObjectService *doc_object_service; + IUnknown *webbrowser; + ITravelLog *travel_log; + IUnknown *browser_service; DOCHOSTUIINFO hostinfo; @@ -557,7 +573,6 @@ struct HTMLDocumentObj { BOOL ui_active; BOOL window_active; BOOL hostui_setup; - BOOL is_webbrowser; BOOL container_locked; BOOL focus; BOOL has_popup; @@ -738,7 +753,7 @@ HRESULT HTMLImageElementFactory_Create(HTMLInnerWindow*,HTMLImageElementFactory* HRESULT HTMLLocation_Create(HTMLInnerWindow*,HTMLLocation**) DECLSPEC_HIDDEN; IOmNavigator *OmNavigator_Create(void) DECLSPEC_HIDDEN; HRESULT HTMLScreen_Create(IHTMLScreen**) DECLSPEC_HIDDEN; -HRESULT create_history(IOmHistory**) DECLSPEC_HIDDEN; +HRESULT create_history(HTMLInnerWindow*,OmHistory**) DECLSPEC_HIDDEN; HRESULT create_storage(IHTMLStorage**) DECLSPEC_HIDDEN; @@ -768,6 +783,7 @@ void NSContainer_Release(NSContainer*) DECLSPEC_HIDDEN; void init_mutation(nsIComponentManager*) DECLSPEC_HIDDEN; void init_document_mutation(HTMLDocumentNode*) DECLSPEC_HIDDEN; void release_document_mutation(HTMLDocumentNode*) DECLSPEC_HIDDEN; +JSContext *get_context_from_document(nsIDOMHTMLDocument*) DECLSPEC_HIDDEN; void HTMLDocument_LockContainer(HTMLDocumentObj*,BOOL) DECLSPEC_HIDDEN; void show_context_menu(HTMLDocumentObj*,DWORD,POINT*,IDispatch*) DECLSPEC_HIDDEN; @@ -952,6 +968,7 @@ void update_title(HTMLDocumentObj*) DECLSPEC_HIDDEN; HRESULT do_query_service(IUnknown*,REFGUID,REFIID,void**) DECLSPEC_HIDDEN; /* editor */ +HRESULT setup_edit_mode(HTMLDocumentObj*) DECLSPEC_HIDDEN; void init_editor(HTMLDocument*) DECLSPEC_HIDDEN; void handle_edit_event(HTMLDocument*,nsIDOMEvent*) DECLSPEC_HIDDEN; HRESULT editor_exec_copy(HTMLDocument*,DWORD,VARIANT*,VARIANT*) DECLSPEC_HIDDEN; diff --git a/reactos/dll/win32/mshtml/mutation.c b/reactos/dll/win32/mshtml/mutation.c index 1c05bfe589c..62735c00e9b 100644 --- a/reactos/dll/win32/mshtml/mutation.c +++ b/reactos/dll/win32/mshtml/mutation.c @@ -22,6 +22,7 @@ #include #include +#include #define COBJMACROS @@ -271,7 +272,7 @@ static void parse_complete(HTMLDocumentObj *doc) call_property_onchanged(&doc->basedoc.cp_container, 1005); call_explorer_69(doc); - if(doc->is_webbrowser && doc->usermode != EDITMODE && !(doc->basedoc.window->load_flags & BINDING_REFRESH)) + if(doc->webbrowser && doc->usermode != EDITMODE && !(doc->basedoc.window->load_flags & BINDING_REFRESH)) IDocObjectService_FireNavigateComplete2(doc->doc_object_service, &doc->basedoc.window->base.IHTMLWindow2_iface, 0); /* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */ @@ -778,6 +779,22 @@ void release_document_mutation(HTMLDocumentNode *doc) nsIDocument_Release(nsdoc); } +JSContext *get_context_from_document(nsIDOMHTMLDocument *nsdoc) +{ + nsIDocument *doc; + JSContext *ctx; + nsresult nsres; + + nsres = nsIDOMHTMLDocument_QueryInterface(nsdoc, &IID_nsIDocument, (void**)&doc); + assert(nsres == NS_OK); + + ctx = nsIContentUtils_GetContextFromDocument(content_utils, doc); + nsIDocument_Release(doc); + + TRACE("ret %p\n", ctx); + return ctx; +} + void init_mutation(nsIComponentManager *component_manager) { nsIFactory *factory; diff --git a/reactos/dll/win32/mshtml/navigate.c b/reactos/dll/win32/mshtml/navigate.c index fbacb79c9e3..f7f7af7a1a4 100644 --- a/reactos/dll/win32/mshtml/navigate.c +++ b/reactos/dll/win32/mshtml/navigate.c @@ -1135,7 +1135,7 @@ static void on_stop_nsrequest(nsChannelBSC *This, HRESULT result) WARN("OnStopRequest failed: %08x\n", nsres); } - if(This->nschannel->load_group) { + if(This->nschannel && This->nschannel->load_group) { nsres = nsILoadGroup_RemoveRequest(This->nschannel->load_group, (nsIRequest*)&This->nschannel->nsIHttpChannel_iface, NULL, request_result); if(NS_FAILED(nsres)) @@ -1762,6 +1762,7 @@ HRESULT create_channelbsc(IMoniker *mon, const WCHAR *headers, BYTE *post_data, ret->bsc.post_data_len = post_data_size; } + TRACE("created %p\n", ret); *retval = ret; return S_OK; } @@ -1957,7 +1958,7 @@ static void navigate_proc(task_t *_task) navigate_task_t *task = (navigate_task_t*)_task; HRESULT hres; - hres = set_moniker(&task->window->doc_obj->basedoc, task->mon, NULL, task->bscallback, TRUE); + hres = set_moniker(task->window, task->mon, task->uri, NULL, task->bscallback, TRUE); if(SUCCEEDED(hres)) { set_current_mon(task->window, task->bscallback->bsc.mon, task->flags); set_current_uri(task->window, task->uri); @@ -2269,7 +2270,9 @@ static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *dis nsWineURI *nsuri; HRESULT hres; - if(window->doc_obj && window->doc_obj->is_webbrowser && window == window->doc_obj->basedoc.window) { + TRACE("%s\n", debugstr_w(display_uri)); + + if(window->doc_obj && window->doc_obj->webbrowser && window == window->doc_obj->basedoc.window) { if(!(flags & BINDING_REFRESH)) { BOOL cancel = FALSE; @@ -2297,7 +2300,7 @@ static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *dis } } - hres = create_doc_uri(window, display_uri, &nsuri); + hres = create_doc_uri(window, uri, &nsuri); if(FAILED(hres)) return hres; @@ -2330,7 +2333,7 @@ HRESULT navigate_url(HTMLOuterWindow *window, const WCHAR *new_url, IUri *base_u hres = CoInternetCombineUrlEx(base_uri, new_url, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, &uri, 0); else - hres = CreateUri(new_url, 0, 0, &uri); + hres = create_uri(new_url, 0, &uri); if(FAILED(hres)) return hres; @@ -2349,7 +2352,7 @@ HRESULT navigate_url(HTMLOuterWindow *window, const WCHAR *new_url, IUri *base_u TRACE("%08x %s -> %s\n", hres, debugstr_w(display_uri), debugstr_w(translated_url)); SysFreeString(display_uri); IUri_Release(uri); - hres = CreateUri(translated_url, 0, 0, &uri); + hres = create_uri(translated_url, 0, &uri); CoTaskMemFree(translated_url); if(FAILED(hres)) return hres; diff --git a/reactos/dll/win32/mshtml/nsembed.c b/reactos/dll/win32/mshtml/nsembed.c index c42ead86033..57d2ff2b18f 100644 --- a/reactos/dll/win32/mshtml/nsembed.c +++ b/reactos/dll/win32/mshtml/nsembed.c @@ -290,6 +290,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro return nsIFile_Clone(profile_directory, _retval); } + *_retval = NULL; return NS_ERROR_FAILURE; } @@ -313,8 +314,10 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr strcpyW(plugin_path+len, gecko_pluginW); nsres = create_nsfile(plugin_path, &plugin_directory); - if(NS_FAILED(nsres)) + if(NS_FAILED(nsres)) { + *_retval = NULL; return nsres; + } } nsres = nsIFile_Clone(plugin_directory, &file); @@ -329,6 +332,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr return NS_OK; } + *_retval = NULL; return NS_ERROR_FAILURE; } @@ -395,6 +399,46 @@ static void register_nscontainer_class(void) nscontainer_class = RegisterClassExW(&wndclass); } +#ifndef __REACTOS__ +static BOOL install_wine_gecko(void) +{ + PROCESS_INFORMATION pi; + STARTUPINFOW si; + WCHAR app[MAX_PATH]; + WCHAR *args; + LONG len; + BOOL ret; + + static const WCHAR controlW[] = {'\\','c','o','n','t','r','o','l','.','e','x','e',0}; + static const WCHAR argsW[] = + {' ','a','p','p','w','i','z','.','c','p','l',' ','i','n','s','t','a','l','l','_','g','e','c','k','o',0}; + + len = GetSystemDirectoryW(app, MAX_PATH-sizeof(controlW)/sizeof(WCHAR)); + memcpy(app+len, controlW, sizeof(controlW)); + + args = heap_alloc(len*sizeof(WCHAR) + sizeof(controlW) + sizeof(argsW)); + if(!args) + return FALSE; + + memcpy(args, app, len*sizeof(WCHAR) + sizeof(controlW)); + memcpy(args + len + sizeof(controlW)/sizeof(WCHAR)-1, argsW, sizeof(argsW)); + + TRACE("starting %s\n", debugstr_w(args)); + + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); + ret = CreateProcessW(app, args, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + heap_free(args); + if (ret) { + CloseHandle(pi.hThread); + WaitForSingleObject(pi.hProcess, INFINITE); + CloseHandle(pi.hProcess); + } + + return ret; +} +#endif + static void set_environment(LPCWSTR gre_path) { WCHAR path_env[MAX_PATH], buf[20]; @@ -723,7 +767,12 @@ BOOL load_gecko(void) if(!loading_thread) { loading_thread = GetCurrentThreadId(); +#ifdef __REACTOS__ if(load_wine_gecko(gre_path)) +#else + if(load_wine_gecko(gre_path) + || (install_wine_gecko() && load_wine_gecko(gre_path))) +#endif ret = init_xpcom(gre_path); else MESSAGE("Could not load wine-gecko. HTML rendering will be disabled.\n"); diff --git a/reactos/dll/win32/mshtml/nsevents.c b/reactos/dll/win32/mshtml/nsevents.c index d7147fe1ca7..bfd2f8b54e7 100644 --- a/reactos/dll/win32/mshtml/nsevents.c +++ b/reactos/dll/win32/mshtml/nsevents.c @@ -238,6 +238,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event HTMLDocumentNode *doc = This->This->doc; nsIDOMHTMLElement *nsbody = NULL; HTMLDocumentObj *doc_obj = NULL; + nsresult nsres = NS_OK; TRACE("(%p)\n", doc); @@ -248,6 +249,8 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event connect_scripts(doc->window); + htmldoc_addref(&doc->basedoc); + if(doc_obj) handle_docobj_load(doc_obj); @@ -267,18 +270,19 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event IDocObjectService_FireDocumentComplete(doc_obj->doc_object_service, &doc->basedoc.window->base.IHTMLWindow2_iface, 0); - if(!doc->nsdoc) { + if(doc->nsdoc) { + nsIDOMHTMLDocument_GetBody(doc->nsdoc, &nsbody); + if(nsbody) { + fire_event(doc, EVENTID_LOAD, TRUE, (nsIDOMNode*)nsbody, event, (IDispatch*)&doc->window->base.IDispatchEx_iface); + nsIDOMHTMLElement_Release(nsbody); + } + }else { ERR("NULL nsdoc\n"); - return NS_ERROR_FAILURE; + nsres = NS_ERROR_FAILURE; } - nsIDOMHTMLDocument_GetBody(doc->nsdoc, &nsbody); - if(nsbody) { - fire_event(doc, EVENTID_LOAD, TRUE, (nsIDOMNode*)nsbody, event, (IDispatch*)&doc->window->base.IDispatchEx_iface); - nsIDOMHTMLElement_Release(nsbody); - } - - return NS_OK; + htmldoc_release(&doc->basedoc); + return nsres; } static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *event) diff --git a/reactos/dll/win32/mshtml/nsiface.idl b/reactos/dll/win32/mshtml/nsiface.idl index 647566f87a5..fcdf6f16cfb 100644 --- a/reactos/dll/win32/mshtml/nsiface.idl +++ b/reactos/dll/win32/mshtml/nsiface.idl @@ -23,7 +23,7 @@ * compatible with XPCOM, usable in C code. */ -cpp_quote("#define GECKO_VERSION \"1.9\"") +cpp_quote("#define GECKO_VERSION \"2.21\"") cpp_quote("#define GECKO_VERSION_STRING \"Wine Gecko \" GECKO_VERSION") import "wtypes.idl"; @@ -179,10 +179,7 @@ typedef nsISupports nsIDOMHistory; typedef nsISupports nsIDOMNavigator; typedef nsISupports nsIDOMMediaQueryList; typedef nsISupports nsIDOMScreen; -typedef nsISupports nsIDOMCrypto; -typedef nsISupports nsIDOMPkcs11; typedef nsISupports nsIAnimationFrameListener; -typedef nsISupports nsIDOMMozURLProperty; typedef nsISupports nsIDOMStorageList; typedef nsISupports nsILocalFile; typedef nsISupports nsIDOMHTMLMenuElement; @@ -195,6 +192,10 @@ typedef nsISupports nsIDOMBlob; typedef nsISupports nsIPrivacyTransitionObserver; typedef nsISupports nsIDOMHTMLPropertiesCollection; typedef nsISupports mozIDOMApplication; +typedef nsISupports nsILoadGroupConnectionInfo; +typedef nsISupports nsIDOMCrypto; +typedef nsISupports nsIDOMPkcs11; +typedef nsISupports nsIDocShellTreeOwner; typedef void *JSContext; typedef void *JSObject; @@ -226,7 +227,7 @@ interface nsIFactory : nsISupports [ object, - uuid(59e7e77a-38e4-11d4-8cf5-0060b0fc14a3), + uuid(6aef11c4-8615-44a6-9711-98f43805693d), local ] interface nsIMemory : nsISupports @@ -236,6 +237,7 @@ interface nsIMemory : nsISupports void Free(void *_ptr); nsresult HeapMinimize(bool immediate); nsresult IsLowMemory(bool *_retval); + nsresult IsLowMemoryPlatform(bool *_retval); } [ @@ -521,7 +523,7 @@ interface nsIStreamListener : nsIRequestObserver [ object, - uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc), + uuid(19501006-46e3-4634-b97d-26eff894b4d3), local ] interface nsILoadGroup : nsIRequest @@ -536,15 +538,26 @@ interface nsILoadGroup : nsIRequest nsresult GetActiveCount(uint32_t *aActiveCount); nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks); nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks); + nsresult GetConnectionInfo(nsILoadGroupConnectionInfo **aConnectionInfo); } [ object, - uuid(98f3b51b-bb55-4276-a43c-db636f8d77e3), + uuid(2a8a7237-c1e2-4de7-b669-2002af29e42d), local ] interface nsIChannel : nsIRequest { + const UINT LOAD_DOCUMENT_URI = 1 << 16; + const UINT LOAD_RETARGETED_DOCUMENT_URI = 1 << 17; + const UINT LOAD_REPLACE = 1 << 18; + const UINT LOAD_INITIAL_DOCUMENT_URI = 1 << 19; + const UINT LOAD_TARGETED = 1 << 20; + const UINT LOAD_CALL_CONTENT_SNIFFERS = 1 << 21; + const UINT LOAD_CLASSIFY_URI = 1 << 22; + const UINT LOAD_TREAT_APPLICATION_OCTET_STREAM_AS_UNKNOWN = 1 << 23; + const UINT LOAD_EXPLICIT_CREDENTIALS = 1 << 24; + nsresult GetOriginalURI(nsIURI **aOriginalURI); nsresult SetOriginalURI(nsIURI *aOriginalURI); nsresult GetURI(nsIURI **aURI); @@ -557,8 +570,8 @@ interface nsIChannel : nsIRequest nsresult SetContentType(const nsACString *aContentType); nsresult GetContentCharset(nsACString *aContentCharset); nsresult SetContentCharset(const nsACString *aContentCharset); - nsresult GetContentLength(int32_t *aContentLength); - nsresult SetContentLength(int32_t aContentLength); + nsresult GetContentLength(int64_t *aContentLength); + nsresult SetContentLength(int64_t aContentLength); nsresult Open(nsIInputStream **_retval); nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext); nsresult GetContentDisposition(uint32_t *aContentDisposition); @@ -580,7 +593,7 @@ interface nsIHttpHeaderVisitor : nsISupports [ object, - uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260), + uuid(a01362a0-5c45-11e2-bcfd-0800200c9a66), local ] interface nsIHttpChannel : nsIChannel @@ -604,11 +617,12 @@ interface nsIHttpChannel : nsIChannel nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor); nsresult IsNoStoreResponse(bool *_retval); nsresult IsNoCacheResponse(bool *_retval); + nsresult RedirectTo(nsIURI *aNewURI); } [ object, - uuid(9363fd96-af59-47e8-bddf-1d5e91acd336), + uuid(74d13d41-85cd-490f-9942-300d0c01c726), local ] interface nsIHttpChannelInternal : nsISupports @@ -632,6 +646,10 @@ interface nsIHttpChannelInternal : nsISupports nsresult HTTPUpgrade(const nsACString *aProtocolName, nsIHttpUpgradeListener *aListener); nsresult GetAllowSpdy(bool *aAllowSpdy); nsresult SetAllowSpdy(bool aAllowSpdy); + nsresult GetLoadAsBlocking(bool *aLoadAsBlocking); + nsresult SetLoadAsBlocking(bool aLoadAsBlocking); + nsresult GetLoadUnblocked(bool *aLoadUnblocked); + nsresult SetLoadUnblocked(bool aLoadUnblocked); } [ @@ -673,7 +691,7 @@ interface nsIChannelEventSink : nsISupports [ object, - uuid(a6cf906d-15b3-11d2-932e-00805f8add32), + uuid(79de76e5-994e-4f6b-81aa-42d9adb6e67e), local ] interface nsIDOMLocation : nsISupports @@ -694,10 +712,12 @@ interface nsIDOMLocation : nsISupports nsresult SetProtocol(const nsAString *aProtocol); nsresult GetSearch(nsAString *aSearch); nsresult SetSearch(const nsAString *aSearch); + nsresult GetOrigin(nsAString *aOrigin); nsresult Reload(bool forceget); nsresult Replace(const nsAString *url); nsresult Assign(const nsAString *url); nsresult ToString(nsAString *_retval); + nsresult ValueOf(nsIDOMLocation **_retval); } [ @@ -788,14 +808,25 @@ interface nsIDOMStyleSheetList : nsISupports [ object, - uuid(496852ba-e48d-4fa5-982e-e0dc1b475bf1), + uuid(450cf0ba-de90-4f86-85bf-e10cc8b8713f), local ] interface nsIDOMNodeList : nsISupports { nsresult Item(uint32_t index, nsIDOMNode **_retval); nsresult GetLength(uint32_t *aLength); - /* Followed by semi-internal API that we don't want to use */ +} + +[ + object, + uuid(bb07f567-5b37-4172-92aa-7d00ceed4809), + local +] +interface nsIDOMHTMLCollection : nsISupports +{ + nsresult GetLength(uint32_t *aLength); + nsresult Item(uint32_t index, nsIDOMNode **_retval); + nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval); } [ @@ -919,13 +950,13 @@ interface nsIDOMClientRect : nsISupports [ object, - uuid(69d44ce2-b544-49a8-bb5f-87804b971ee4), + uuid(8f972a47-1f20-4906-b59d-19310349a2c2), local ] interface nsIDOMElement : nsIDOMNode { nsresult GetTagName(nsAString *aTagName); - nsresult GetClassList(nsIDOMDOMTokenList **aClassList); + nsresult GetClassList(nsISupports **aClassList); nsresult GetAttribute(const nsAString *name, nsAString *_retval); nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName, nsAString *_retval); nsresult SetAttribute(const nsAString *name, const nsAString *value); @@ -939,9 +970,9 @@ interface nsIDOMElement : nsIDOMNode nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval); nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMAttr **_retval); nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); - nsresult GetElementsByTagName(const nsAString *name, nsIDOMNodeList **_retval); - nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNodeList **_retval); - nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval); + nsresult GetElementsByTagName(const nsAString *name, nsIDOMHTMLCollection **_retval); + nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMHTMLCollection **_retval); + nsresult GetElementsByClassName(const nsAString *classes, nsIDOMHTMLCollection **_retval); nsresult GetChildElements(nsIDOMNodeList **aChildren); nsresult GetFirstElementChild(nsIDOMElement **aFirstElementChild); nsresult GetLastElementChild(nsIDOMElement **aLastElementChild); @@ -1002,14 +1033,14 @@ interface nsIDOMHTMLElement : nsIDOMElement nsresult SetDir(const nsAString *aDir); nsresult GetClassName(nsAString *aClassName); nsresult SetClassName(const nsAString *aClassName); - nsresult GetDataset(nsIDOMDOMStringMap **aDataset); + nsresult GetDataset(nsISupports **aDataset); nsresult GetItemScope(bool *aItemScope); nsresult SetItemScope(bool aItemScope); nsresult GetItemType(nsIVariant **aItemType); nsresult SetItemType(nsIVariant *aItemType); nsresult GetItemId(nsAString *aItemId); nsresult SetItemId(const nsAString *aItemId); - nsresult GetProperties(nsIDOMHTMLPropertiesCollection **aProperties); + nsresult GetProperties(nsISupports **aProperties); nsresult GetItemValue(nsIVariant **aItemValue); nsresult SetItemValue(nsIVariant *aItemValue); nsresult GetItemProp(nsIVariant **aItemProp); @@ -1056,20 +1087,6 @@ interface nsIDOMHTMLHeadElement : nsIDOMHTMLElement { } - -[ - object, - uuid(db690d8f-3bca-4198-be64-78adb7f38bf8), - local -] -interface nsIDOMHTMLCollection : nsISupports -{ - nsresult GetLength(uint32_t *aLength); - nsresult Item(uint32_t index, nsIDOMNode **_retval); - nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval); - /* Followed by semi-internal API that we don't want to use */ -} - [ object, uuid(cb75c251-afc7-444f-b2d6-b9635555f3ed), @@ -1118,7 +1135,7 @@ interface nsIDOMDocumentFragment : nsIDOMNode [ object, - uuid(b7e90442-74d6-494e-af01-906d95926dec), + uuid(9b93f82b-9691-4021-8f45-1bf505db77ba), local ] interface nsIDOMDocument : nsIDOMNode @@ -1141,6 +1158,7 @@ interface nsIDOMDocument : nsIDOMNode nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval); nsresult GetInputEncoding(nsAString *aInputEncoding); nsresult GetDocumentURI(nsAString *aDocumentURI); + nsresult GetURL(nsAString *aURL); nsresult AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval); nsresult CreateRange(nsIDOMRange **_retval); nsresult CreateNodeIterator(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc, @@ -1180,6 +1198,7 @@ interface nsIDOMDocument : nsIDOMNode nsresult GetMozFullScreen(bool *aMozFullScreen); nsresult GetMozFullScreenEnabled(bool *aMozFullScreenEnabled); nsresult GetMozPointerLockElement(nsIDOMElement **aMozPointerLockElement); + nsresult CaretPositionFromPoint(float x, float y, nsISupports **_retval); nsresult MozExitPointerLock(); nsresult GetOnreadystatechange(JSContext* cx, jsval aOnreadystatechange); nsresult SetOnreadystatechange(JSContext* cx, const jsval *aOnreadystatechange); @@ -1191,21 +1210,20 @@ interface nsIDOMDocument : nsIDOMNode nsresult GetMozHidden(bool *aMozHidden); nsresult GetVisibilityState(nsAString *aVisibilityState); nsresult GetMozVisibilityState(nsAString *aMozVisibilityState); + nsresult GetCompatMode(nsAString *aCompatMode); } [ object, - uuid(ecae54c6-2ab9-4167-b0ef-61960aadbb68), + uuid(3f8666a9-76f0-4733-ae11-4aea8753062d), local ] interface nsIDOMHTMLDocument : nsIDOMDocument { - nsresult GetURL(nsAString *aURL); nsresult GetDomain(nsAString *aDomain); nsresult SetDomain(const nsAString *aDomain); nsresult GetCookie(nsAString *aCookie); nsresult SetCookie(const nsAString *aCookie); - nsresult GetCompatMode(nsAString *aCompatMode); nsresult GetHead(nsIDOMHTMLHeadElement **aHead); nsresult GetBody(nsIDOMHTMLElement **aBody); nsresult SetBody(nsIDOMHTMLElement *aBody); @@ -1341,7 +1359,7 @@ interface nsIDOMWindowCollection : nsISupports [ object, - uuid(7afa38e6-45a1-4f0b-ae84-997669d14059), + uuid(39cb59d4-fba9-48a9-b70b-570a7ec2ebfa), local ] interface nsIDOMWindow : nsISupports @@ -1381,7 +1399,7 @@ interface nsIDOMWindow : nsISupports nsresult Prompt(const nsAString *aMessage, const nsAString *aInitial, nsAString *_retval); nsresult Print(); nsresult ShowModalDialog(const nsAString *aURI, nsIVariant *aArgs, const nsAString *aOptions, nsIVariant **_retval); - nsresult PostMessageMoz(const long /*jsval*/ *message, const nsAString *targetOrigin, JSContext *cx); + nsresult PostMessageMoz(const long /*jsval*/ *message, const nsAString *targetOrigin, const /*JS::Value*/ void *transfer, JSContext *cx); nsresult Atob(const nsAString *aAsciiString, nsAString *_retval); nsresult Btoa(const nsAString *aBase64Data, nsAString *_retval); nsresult GetSessionStorage(nsIDOMStorage **aSessionStorage); @@ -1409,6 +1427,7 @@ interface nsIDOMWindow : nsISupports nsresult GetOuterHeight(int32_t *aOuterHeight); nsresult SetOuterHeight(int32_t aOuterHeight); nsresult GetComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval); + nsresult GetDefaultComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval); nsresult GetWindowRoot(nsIDOMEventTarget **aWindowRoot); nsresult GetFrames(nsIDOMWindowCollection **aFrames); nsresult GetTextZoom(float *aTextZoom); @@ -1449,7 +1468,6 @@ interface nsIDOMWindow : nsISupports nsresult MozCancelAnimationFrame(int32_t aHandle); nsresult MozCancelRequestAnimationFrame(int32_t aHandle); nsresult GetMozAnimationStartTime(int64_t *aMozAnimationStartTime); - nsresult GetURL(nsIDOMMozURLProperty **aURL); nsresult GetOnafterprint(JSContext *cx, jsval *aOnafterprint); nsresult SetOnafterprint(JSContext *cx, const jsval *aOnafterprint); nsresult GetOnbeforeprint(JSContext *cx, jsval *aOnbeforeprint); @@ -1569,7 +1587,7 @@ interface nsIDOMHTMLFormElement : nsIDOMHTMLElement [ object, - uuid(e59a4df5-0904-414d-9203-9af2790698ea), + uuid(83984fd0-b0b2-11e1-afa6-0800200c9a66), local ] interface nsIDOMHTMLInputElement : nsIDOMHTMLElement @@ -1604,6 +1622,8 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement nsresult SetHeight(uint32_t aHeight); nsresult GetIndeterminate(bool *aIndeterminate); nsresult SetIndeterminate(bool aIndeterminate); + nsresult GetInputmode(nsAString *aInputmode); + nsresult SetInputmode(const nsAString *aInputmode); nsresult GetList(nsIDOMHTMLElement **aList); nsresult GetMax(nsAString *aMax); nsresult SetMax(const nsAString *aMax); @@ -1641,6 +1661,8 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement nsresult SetValue(const nsAString *aValue); nsresult GetValueAsNumber(double *aValueAsNumber); nsresult SetValueAsNumber(double aValueAsNumber); + nsresult GetValueAsDate(JSContext* cx, /*JS::Value*/ void *aValueAsDate); + nsresult SetValueAsDate(JSContext* cx, const /*JS::Value*/ void *aValueAsDate); nsresult StepDown(int32_t n, uint8_t _argc); nsresult StepUp(int32_t n, uint8_t _argc); nsresult GetWillValidate(bool *aWillValidate); @@ -1690,7 +1712,42 @@ interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement [ object, - uuid(429b041b-06df-486c-9a3a-a1d901cc76a2), + uuid(8e40d4d7-c204-4192-802a-0b5602e9c669), + local +] +interface nsIDOMHTMLButtonElement : nsIDOMHTMLElement +{ + nsresult GetAutofocus(bool *aAutofocus); + nsresult SetAutofocus(bool aAutofocus); + nsresult GetDisabled(bool *aDisabled); + nsresult SetDisabled(bool aDisabled); + nsresult GetForm(nsIDOMHTMLFormElement **aForm); + nsresult GetFormAction(nsAString *aFormAction); + nsresult SetFormAction(const nsAString *aFormAction); + nsresult GetFormEnctype(nsAString *aFormEnctype); + nsresult SetFormEnctype(const nsAString *aFormEnctype); + nsresult GetFormMethod(nsAString *aFormMethod); + nsresult SetFormMethod(const nsAString *aFormMethod); + nsresult GetFormNoValidate(bool *aFormNoValidate); + nsresult SetFormNoValidate(bool aFormNoValidate); + nsresult GetFormTarget(nsAString *aFormTarget); + nsresult SetFormTarget(const nsAString *aFormTarget); + nsresult GetName(nsAString *aName); + nsresult SetName(const nsAString *aName); + nsresult GetType(nsAString *aType); + nsresult SetType(const nsAString *aType); + nsresult GetValue(nsAString *aValue); + nsresult SetValue(const nsAString *aValue); + nsresult GetWillValidate(bool *aWillValidate); + nsresult GetValidity(nsIDOMValidityState **aValidity); + nsresult GetValidationMessage(nsAString *aValidationMessage); + nsresult CheckValidity(bool *_retval); + nsresult SetCustomValidity(const nsAString *error); +} + +[ + object, + uuid(4173cc53-30f6-4d12-a770-981ba53164e2), local ] interface nsIDOMHTMLOptionsCollection : nsISupports @@ -1701,7 +1758,6 @@ interface nsIDOMHTMLOptionsCollection : nsISupports nsresult SetLength(uint32_t aLength); nsresult Item(uint32_t index, nsIDOMNode **_retval); nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval); - nsISupports* __cdecl GetNamedItem(const nsAString *name, nsWrapperCache **cache); nsresult GetSelectedIndex(int32_t *aSelectedIndex); nsresult SetSelectedIndex(int32_t aSelectedIndex); nsresult SetOption(uint32_t index, nsIDOMHTMLOptionElement *option); @@ -1870,7 +1926,7 @@ interface nsIDOMHTMLImageElement : nsIDOMHTMLElement [ object, - uuid(68f49f8f-5ffd-44eb-a59f-d2b3f4817299), + uuid(1339c36e-23ad-4047-a04c-1702e27c7c83), local ] interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement @@ -1881,6 +1937,8 @@ interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement nsresult SetTarget(const nsAString *aTarget); nsresult GetPing(nsAString *aPing); nsresult SetPing(const nsAString *aPing); + nsresult GetDownload(nsAString *aPing); + nsresult SetDownload(const nsAString *aPing); nsresult GetRel(nsAString *aRel); nsresult SetRel(const nsAString *aRel); nsresult GetHreflang(nsAString *aHreflang); @@ -2141,7 +2199,7 @@ interface nsIDOMHTMLParamElement : nsIDOMHTMLElement [ object, - uuid(830d9170-f8eb-4749-b721-16d60d6b0f1b), + uuid(f9db1001-faae-46e1-b85f-0a0afb80c5b2), local ] interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement @@ -2152,6 +2210,8 @@ interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement nsresult SetMedia(const nsAString *aMedia); nsresult GetType(nsAString *aType); nsresult SetType(const nsAString *aType); + nsresult GetScoped(bool *aScoped); + nsresult SetScoped(bool aScoped); nsresult GetDOMStyleSheet(nsIDOMStyleSheet **aDOMStyleSheet); } @@ -2232,7 +2292,7 @@ typedef void* nativeWindow; [ object, - uuid(9da319f3-eee6-4504-81a5-6a19cf6215bf), + uuid(9da319f3-eee6-4504-81a5-6A19cf6215bf), local ] interface nsIBaseWindow : nsISupports @@ -2264,17 +2324,32 @@ interface nsIBaseWindow : nsISupports nsresult SetTitle(const PRUnichar *aTitle); } -cpp_quote("#define LOAD_FLAGS_NONE 0x00000000") -cpp_quote("#define LOAD_REPLACE 0x00040000") -cpp_quote("#define LOAD_INITIAL_DOCUMENT_URI 0x00080000") - [ object, - uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c), + uuid(28404f7e-0f17-4dc3-a21a-2074d8659b02), local ] interface nsIWebNavigation : nsISupports { + const UINT LOAD_FLAGS_MASK = 0xffff; + const UINT LOAD_FLAGS_NONE = 0; + const UINT LOAD_FLAGS_IS_REFRESH = 0x0010; + const UINT LOAD_FLAGS_IS_LINK = 0x0020; + const UINT LOAD_FLAGS_BYPASS_HISTORY = 0x0040; + const UINT LOAD_FLAGS_REPLACE_HISTORY = 0x0080; + const UINT LOAD_FLAGS_BYPASS_CACHE = 0x0100; + const UINT LOAD_FLAGS_BYPASS_PROXY = 0x0200; + const UINT LOAD_FLAGS_CHARSET_CHANGE = 0x0400; + const UINT LOAD_FLAGS_STOP_CONTENT = 0x0800; + const UINT LOAD_FLAGS_FROM_EXTERNAL = 0x1000; + const UINT LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 0x2000; + const UINT LOAD_FLAGS_FIRST_LOAD = 0x4000; + const UINT LOAD_FLAGS_ALLOW_POPUPS = 0x8000; + const UINT LOAD_FLAGS_BYPASS_CLASSIFIER = 0x10000; + const UINT LOAD_FLAGS_FORCE_ALLOW_COOKIES = 0x20000; + const UINT LOAD_FLAGS_DISALLOW_INHERIT_OWNER = 0x40000; + const UINT LOAD_FLAGS_URI_IS_UTF8 = 0x80000; + nsresult GetCanGoBack(bool *aCanGoBack); nsresult GetCanGoForward(bool *aCanGoForward); nsresult GoBack(); @@ -2306,7 +2381,7 @@ interface nsIWebProgress : nsISupports [ object, - uuid(4404c94b-0506-4255-9e3c-4582dba6cfbb), + uuid(a65cfa37-b381-4fe9-81b7-db08853f54ad), local ] interface nsIPrintSettings : nsISupports @@ -2431,6 +2506,8 @@ interface nsIPrintSettings : nsISupports nsresult SetIsInitializedFromPrinter(bool aIsInitializedFromPrinter); nsresult GetIsInitializedFromPrefs(bool *aIsInitializedFromPrefs); nsresult SetIsInitializedFromPrefs(bool aIsInitializedFromPrefs); + nsresult GetPersistMarginBoxSettings(bool *aPersistMarginBoxSettings); + nsresult SetPersistMarginBoxSettings(bool aPersistMarginBoxSettings); nsresult SetMarginInTwips(nsIntMargin *aMargin); nsresult SetEdgeInTwips(nsIntMargin *aEdge); nsresult GetMarginInTwips(nsIntMargin *aMargin); @@ -2593,7 +2670,7 @@ interface nsIComponentManager : nsISupports [ object, - uuid(7df46a54-d8b0-448e-903c-4341a1b2499c), + uuid(55d25e49-793f-4727-a69f-de8b15f4b985), local ] interface nsIPrefBranch : nsISupports @@ -2643,7 +2720,7 @@ interface nsIDirectoryServiceProvider2 : nsIDirectoryServiceProvider [ object, - uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40), + uuid(f5753fec-a051-4ddc-8891-11f1f1575072), local ] interface nsIProtocolHandler : nsISupports @@ -2772,7 +2849,7 @@ interface nsIDOMEventTarget : nsISupports [ object, - uuid(270c945b-8a65-4170-bc0b-4ec1443cd39f), + uuid(c939eab8-1345-4344-875b-e0f2d8d89171), local ] interface nsIDOMEvent : nsISupports @@ -2799,14 +2876,14 @@ interface nsIDOMEvent : nsISupports nsresult SetTarget(nsIDOMEventTarget *aTarget); bool IsDispatchStopped(); /*nsEvent*/ void *GetInternalNSEvent(); - nsresult SetTrusted(bool aTrusted); + void SetTrusted(bool aTrusted); void Serialize(/*IPC::Message*/ void *aMsg, bool aSerializeInterfaceType); bool Deserialize(const /*IPC::Message*/ void *aMsg, void **aIter); } [ object, - uuid(ed36f965-173c-4101-a615-63b44f51ed90), + uuid(16b3bdcc-75d4-11e2-8a20-aaff78957a39), local ] interface nsIDOMWindowUtils : nsISupports @@ -2821,11 +2898,13 @@ interface nsIDOMWindowUtils : nsISupports nsresult GetViewportInfo(uint32_t aDisplayWidth, uint32_t aDisplayHeight, double *aDefaultZoom, bool *aAllowZoom, double *aMinZoom, double *aMaxZoom, uint32_t *aWidth, uint32_t *aHeight, bool *aAutoSize); nsresult SetDisplayPortForElement(float aXPx, float aYPx, float aWidthPx, float aHeightPx, nsIDOMElement *aElement); + nsresult SetCriticalDisplayPortForElement(float aXPx, float aYPx, float aWidthPx, float aHeightPx, nsIDOMElement *aElement); nsresult SetResolution(float aXResolution, float aYResolution); + nsresult GetResolution(float *aXResolution, float *aYResolution); nsresult GetIsFirstPaint(bool *aIsFirstPaint); nsresult SetIsFirstPaint(bool aIsFirstPaint); nsresult SendMouseEvent(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount, - int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg); + int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg, bool *_retval); nsresult SendTouchEvent(const nsAString *aType, uint32_t *aIdentifiers, int32_t *aXs, int32_t *aYs, uint32_t *aRxs, uint32_t *aRys, float *aRotationAngles, float *aForces, uint32_t count, int32_t aModifiers, bool aIgnoreRootScrollFrame, bool *_retval); @@ -2858,12 +2937,14 @@ interface nsIDOMWindowUtils : nsISupports nsresult ClearMozAfterPaintEvents(); nsresult DisableNonTestMouseEvents(bool aDisable); nsresult GetScrollXY(bool aFlushLayout, int32_t *aScrollX, int32_t *aScrollY); + nsresult GetScrollbarWidth(bool aFlushLayout, int32_t *_retval); nsresult GetRootBounds(nsIDOMClientRect **_retval); nsresult GetIMEIsOpen(bool *aIMEIsOpen); nsresult GetIMEStatus(uint32_t *aIMEStatus); nsresult GetScreenPixelsPerCSSPixel(float *aScreenPixelsPerCSSPixel); nsresult GetFullZoom(float *aFullZoom); nsresult DispatchDOMEventViaPresShell(nsIDOMNode *aTarget, nsIDOMEvent *aEvent, bool aTrusted, bool *_retval); + nsresult DispatchEventToChromeOnly(nsIDOMEventTarget *aTarget, nsIDOMEvent *aEvent, bool *_retval); nsresult GetClassName(const /*JS::Value*/ void *aObject, JSContext *cx, char **_retval); nsresult SendContentCommandEvent(const nsAString *aType, nsITransferable *aTransferable); nsresult SendCompositionEvent(const nsAString *aType, const nsAString *aData, const nsAString *aLocale); @@ -2890,8 +2971,8 @@ interface nsIDOMWindowUtils : nsISupports nsresult SuspendTimeouts(); nsresult ResumeTimeouts(); nsresult GetLayerManagerType(nsAString *aLayerManagerType); - nsresult StartFrameTimeRecording(); - nsresult StopFrameTimeRecording(uint32_t *frameCount, float **frameTime); + nsresult StartFrameTimeRecording(uint32_t *startIndex); + nsresult StopFrameTimeRecording(uint32_t startIndex, float **paintTimes, uint32_t *frameCount, float **frameIntervals); nsresult BeginTabSwitch(); nsresult GetDisplayDPI(float *aDisplayDPI); nsresult GetOuterWindowWithId(uint64_t aOuterWindowID, nsIDOMWindow **_retval); @@ -2929,6 +3010,7 @@ interface nsIDOMWindowUtils : nsISupports nsresult RemoveSheet(nsIURI *sheetURI, uint32_t type); nsresult GetIsHandlingUserInput(bool *aIsHandlingUserInput); nsresult AllowScriptsToClose(); + nsresult IsNodeDisabledForEvents(nsIDOMNode *aNode, bool *_retval); } cpp_quote("#define CONTEXT_NONE 0x00") @@ -2951,7 +3033,7 @@ interface nsIContextMenuListener : nsISupports [ object, - uuid(415453e6-132a-4902-9a99-cc480f0311b6), + uuid(d73852f8-7bd6-477d-8233-117dbf83860b), local ] interface nsIDOMUIEvent : nsIDOMEvent @@ -2974,7 +3056,7 @@ interface nsIDOMUIEvent : nsIDOMEvent [ object, - uuid(796c3436-5f89-4145-be3a-49808c09fdc6), + uuid(afb2e57b-2822-4969-b2a9-0cada6859534), local ] interface nsIDOMMouseEvent : nsIDOMUIEvent @@ -3009,7 +3091,7 @@ interface nsIDOMMouseEvent : nsIDOMUIEvent [ object, - uuid(5d116380-8432-48cb-a717-200f04c39d2f), + uuid(ffbe684c-ca90-4b58-aa8c-9727f997f86d), local ] interface nsIDOMKeyEvent : nsIDOMUIEvent @@ -3205,7 +3287,7 @@ interface nsIController : nsISupports [ object, - uuid(e2985850-81ca-4b5d-b0f3-e395d50d8564), + uuid(8a8b4b1d-72d8-428e-9575-f918baf69ea1), local ] interface nsIContent : nsISupports @@ -3215,7 +3297,7 @@ interface nsIContent : nsISupports [ object, - uuid(0e1324c9-c997-447e-bcd9-a657802991e4), + uuid(4e6f7d97-091e-4eda-b7d6-feb0b8012a93), local ] interface nsIDocument : nsISupports @@ -3249,7 +3331,7 @@ interface nsIContentSerializer : nsISupports [ object, - uuid(12efa18c-920a-47cd-94a1-4052f245f76c), + uuid(753b38d1-ee03-4e58-a650-1076ccccdb7f), local ] interface nsIEditor : nsISupports @@ -3324,8 +3406,8 @@ interface nsIEditor : nsISupports nsresult SwitchTextDirection(); nsresult OutputToString([in] nsAString formatType, [in] uint32_t flags, [out] nsAString *_retval); nsresult OutputToStream([in] nsIOutputStream *aStream, [in] nsAString *formatType, [in] nsACString *charsetOverride, [in] uint32_t flags); - nsresult SetEditorObserver(void /* EditActionListener*/ *observer); - nsresult RemoveEditorObserver(); + nsresult SetEditorObserver(nsIEditorObserver *observer); + nsresult RemoveEditorObserver(nsIEditorObserver *observer); nsresult AddEditActionListener([in] nsIEditActionListener *listener); nsresult RemoveEditActionListener([in] nsIEditActionListener *listener); nsresult AddDocumentStateListener([in] nsIDocumentStateListener *listener); @@ -3402,26 +3484,64 @@ interface nsIHTMLEditor : nsISupports void /*Element*/ *GetActiveEditingHost(); } +interface nsIDocShellTreeItem; + [ object, - uuid(318ce516-3f7a-41f6-8f3d-3661650f7a46), + uuid(37f1ab73-f224-44b1-82f0-d2834ab1cec0), local ] -interface nsIDocShell : nsISupports +interface nsIDocShellTreeNode : nsISupports +{ + nsresult GetChildCount(int32_t *aChildCount); + nsresult AddChild(nsIDocShellTreeItem *child); + nsresult RemoveChild(nsIDocShellTreeItem *child); + nsresult GetChildAt(int32_t index, nsIDocShellTreeItem **_retval); + nsresult FindChildWithName(const PRUnichar *aName, bool aRecurse, bool aSameType, nsIDocShellTreeItem *aRequestor, + nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval); +} + +[ + object, + uuid(09b54ec1-d98a-49a9-bc95-3219e8b55089), + local +] +interface nsIDocShellTreeItem : nsIDocShellTreeNode +{ + nsresult GetName(PRUnichar **aName); + nsresult SetName(const PRUnichar *aName); + nsresult NameEquals(const PRUnichar *name, bool *_retval); + nsresult GetItemType(int32_t *aItemType); + nsresult SetItemType(int32_t aItemType); + nsresult GetParent(nsIDocShellTreeItem **aParent); + nsresult GetSameTypeParent(nsIDocShellTreeItem **aSameTypeParent); + nsresult GetRootTreeItem(nsIDocShellTreeItem **aRootTreeItem); + nsresult GetSameTypeRootTreeItem(nsIDocShellTreeItem **aSameTypeRootTreeItem); + nsresult FindItemWithName(const PRUnichar *name, nsISupports *aRequestor, nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval); + nsresult GetTreeOwner(nsIDocShellTreeOwner **aTreeOwner); + nsresult SetTreeOwner(nsIDocShellTreeOwner *treeOwner); +} + +[ + object, + uuid(e8f6f3e5-8cee-4be3-8d56-5ed617305bf8), + local +] +interface nsIDocShell : nsIDocShellTreeItem { nsresult LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, uint32_t aLoadFlags, bool firstParty); nsresult LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString *aContentType, const nsACString *aContentCharset, nsIDocShellLoadInfo *aLoadInfo); nsresult InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, uint32_t aFlags, const PRUnichar *aWindowTarget, - const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, uint32_t aLoadFlags, - nsISHEntry *aSHEntry, bool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest); + const char *aTypeHint, nsACString *aFileName, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, + uint32_t aLoadFlags, nsISHEntry *aSHEntry, bool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest); nsresult AddState(nsIVariant *aData, const nsAString *aTitle, const nsAString *aURL, bool aReplace, JSContext *cx); nsresult CreateLoadInfo(nsIDocShellLoadInfo **loadInfo); nsresult PrepareForNewContentModel(); nsresult SetCurrentURI(nsIURI *aURI); nsresult FirePageHideNotification(bool isUnload); nsresult GetPresContext(void /*nsPresContext*/ **aPresContext); - nsresult GetPresShell(nsIPresShell **aPresShell); + nsIPresShell *GetPresShell(); nsresult GetEldestPresShell(nsIPresShell **aEldestPresShell); nsresult GetContentViewer(nsIContentViewer **aContentViewer); nsresult GetChromeEventHandler(nsIDOMEventTarget **aChromeEventHandler); @@ -3483,6 +3603,10 @@ interface nsIDocShell : nsISupports nsresult SetChildOffset(uint32_t offset); nsresult GetIsInUnload(bool *aIsInUnload); nsresult GetChannelIsUnsafe(bool *aChannelIsUnsafe); + nsresult GetHasMixedActiveContentLoaded(bool *aHasMixedActiveContentLoaded); + nsresult GetHasMixedActiveContentBlocked(bool *aHasMixedActiveContentBlocked); + nsresult GetHasMixedDisplayContentLoaded(bool *aHasMixedDisplayContentLoaded); + nsresult GetHasMixedDisplayContentBlocked(bool *aHasMixedDisplayContentBlocked); void DetachEditorFromWindow(); nsresult GetIsOffScreenBrowser(bool *aIsOffScreenBrowser); nsresult SetIsOffScreenBrowser(bool aIsOffScreenBrowser); @@ -3515,9 +3639,20 @@ interface nsIDocShell : nsISupports nsresult GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled); nsresult GetSandboxFlags(uint32_t *aSandboxFlags); nsresult SetSandboxFlags(uint32_t aSandboxFlags); + nsresult GetMixedContentChannel(nsIChannel **aMixedContentChannel); + nsresult SetMixedContentChannel(nsIChannel *aMixedContentChannel); + nsresult GetAllowMixedContentAndConnectionData(bool *rootHasSecureConnection, bool *allowMixedContent, bool *isRootDocShell); bool PluginsAllowedInCurrentDoc(); nsresult GetFullscreenAllowed(bool *aFullscreenAllowed); nsresult SetFullscreenAllowed(bool allowed); + nsresult GetAffectPrivateSessionLifetime(bool *aAffectPrivateSessionLifetime); + nsresult SetAffectPrivateSessionLifetime(bool aAffectPrivateSessionLifetime); + nsresult GetMayEnableCharacterEncodingMenu(bool *aMayEnableCharacterEncodingMenu); + nsresult GetEditor(nsIEditor **aEditor); + nsresult SetEditor(nsIEditor *aEditor); + nsresult GetEditable(bool *aEditable); + nsresult GetHasEditingSession(bool *aHasEditingSession); + nsresult MakeEditable(bool inWaitForUriLoad); } [ @@ -3619,13 +3754,6 @@ interface nsIDocumentObserver : nsIMutationObserver void AttemptToExecuteScript(nsIContent *aContent, nsIParser *aParser, bool *aBlock); } -[ - object, - uuid(c61eac14-5f7a-4481-965e-7eaa6effa85f), - local -] -interface nsCycleCollectionISupports {} - [ object, uuid(3682dd99-8560-44f4-9b8f-ccce9d7b96fb), @@ -3651,3 +3779,5 @@ interface nsIPluginInstance : nsISupports { nsresult GetDOMElement(nsIDOMElement **aDOMElement); } + +cpp_quote("DEFINE_GUID(IID_nsCycleCollectionISupports, 0xc61eac14,0x5f7a,0x4481,0x96,0x5e,0x7e,0xaa,0x6e,0xff,0xa8,0x5f);") diff --git a/reactos/dll/win32/mshtml/nsio.c b/reactos/dll/win32/mshtml/nsio.c index dcde4e0ebfb..07b20e477ce 100644 --- a/reactos/dll/win32/mshtml/nsio.c +++ b/reactos/dll/win32/mshtml/nsio.c @@ -837,7 +837,7 @@ static nsresult NSAPI nsChannel_SetContentCharset(nsIHttpChannel *iface, return NS_OK; } -static nsresult NSAPI nsChannel_GetContentLength(nsIHttpChannel *iface, LONG *aContentLength) +static nsresult NSAPI nsChannel_GetContentLength(nsIHttpChannel *iface, INT64 *aContentLength) { nsChannel *This = impl_from_nsIHttpChannel(iface); @@ -846,11 +846,11 @@ static nsresult NSAPI nsChannel_GetContentLength(nsIHttpChannel *iface, LONG *aC return NS_ERROR_NOT_IMPLEMENTED; } -static nsresult NSAPI nsChannel_SetContentLength(nsIHttpChannel *iface, LONG aContentLength) +static nsresult NSAPI nsChannel_SetContentLength(nsIHttpChannel *iface, INT64 aContentLength) { nsChannel *This = impl_from_nsIHttpChannel(iface); - FIXME("(%p)->(%d)\n", This, aContentLength); + FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(aContentLength)); return NS_ERROR_NOT_IMPLEMENTED; } @@ -1385,6 +1385,15 @@ static nsresult NSAPI nsChannel_IsNoCacheResponse(nsIHttpChannel *iface, cpp_boo return NS_ERROR_NOT_IMPLEMENTED; } +static nsresult NSAPI nsChannel_RedirectTo(nsIHttpChannel *iface, nsIURI *aNewURI) +{ + nsChannel *This = impl_from_nsIHttpChannel(iface); + + FIXME("(%p)->(%p)\n", This, aNewURI); + + return NS_ERROR_NOT_IMPLEMENTED; +} + static const nsIHttpChannelVtbl nsChannelVtbl = { nsChannel_QueryInterface, nsChannel_AddRef, @@ -1438,7 +1447,8 @@ static const nsIHttpChannelVtbl nsChannelVtbl = { nsChannel_SetResponseHeader, nsChannel_VisitResponseHeaders, nsChannel_IsNoStoreResponse, - nsChannel_IsNoCacheResponse + nsChannel_IsNoCacheResponse, + nsChannel_RedirectTo }; static inline nsChannel *impl_from_nsIUploadChannel(nsIUploadChannel *iface) @@ -1722,6 +1732,34 @@ static nsresult NSAPI nsHttpChannelInternal_SetAllowSpdy(nsIHttpChannelInternal return NS_ERROR_NOT_IMPLEMENTED; } +static nsresult NSAPI nsHttpChannelInternal_GetLoadAsBlocking(nsIHttpChannelInternal *iface, cpp_bool *aLoadAsBlocking) +{ + nsChannel *This = impl_from_nsIHttpChannelInternal(iface); + FIXME("(%p)->(%p)\n", This, aLoadAsBlocking); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsHttpChannelInternal_SetLoadAsBlocking(nsIHttpChannelInternal *iface, cpp_bool aLoadAsBlocking) +{ + nsChannel *This = impl_from_nsIHttpChannelInternal(iface); + FIXME("(%p)->(%x)\n", This, aLoadAsBlocking); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsHttpChannelInternal_GetLoadUnblocked(nsIHttpChannelInternal *iface, cpp_bool *aLoadUnblocked) +{ + nsChannel *This = impl_from_nsIHttpChannelInternal(iface); + FIXME("(%p)->(%p)\n", This, aLoadUnblocked); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsHttpChannelInternal_SetLoadUnblocked(nsIHttpChannelInternal *iface, cpp_bool aLoadUnblocked) +{ + nsChannel *This = impl_from_nsIHttpChannelInternal(iface); + FIXME("(%p)->(%x)\n", This, aLoadUnblocked); + return NS_ERROR_NOT_IMPLEMENTED; +} + static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl = { nsHttpChannelInternal_QueryInterface, nsHttpChannelInternal_AddRef, @@ -1744,7 +1782,11 @@ static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl = { nsHttpChannelInternal_SetCacheKeysRedirectChain, nsHttpChannelInternal_HTTPUpgrade, nsHttpChannelInternal_GetAllowSpdy, - nsHttpChannelInternal_SetAllowSpdy + nsHttpChannelInternal_SetAllowSpdy, + nsHttpChannelInternal_GetLoadAsBlocking, + nsHttpChannelInternal_SetLoadAsBlocking, + nsHttpChannelInternal_GetLoadUnblocked, + nsHttpChannelInternal_SetLoadUnblocked }; @@ -1907,10 +1949,10 @@ static nsresult NSAPI nsURI_SetSpec(nsIFileURL *iface, const nsACString *aSpec) if(!spec) return NS_ERROR_OUT_OF_MEMORY; - hres = CreateUri(spec, 0, 0, &uri); + hres = create_uri(spec, 0, &uri); heap_free(spec); if(FAILED(hres)) { - WARN("CreateUri failed: %08x\n", hres); + WARN("create_uri failed: %08x\n", hres); return NS_ERROR_FAILURE; } @@ -2920,19 +2962,12 @@ static nsresult create_nsuri(IUri *iuri, HTMLOuterWindow *window, NSContainer *c return NS_OK; } -HRESULT create_doc_uri(HTMLOuterWindow *window, const WCHAR *url, nsWineURI **ret) +HRESULT create_doc_uri(HTMLOuterWindow *window, IUri *iuri, nsWineURI **ret) { nsWineURI *uri; - IUri *iuri; nsresult nsres; - HRESULT hres; - - hres = CreateUri(url, 0, 0, &iuri); - if(FAILED(hres)) - return hres; nsres = create_nsuri(iuri, window, window->doc_obj->nscontainer, NULL, &uri); - IUri_Release(iuri); if(NS_FAILED(nsres)) return E_FAIL; @@ -2977,7 +3012,7 @@ HRESULT create_redirect_nschannel(const WCHAR *url, nsChannel *orig_channel, nsC nsresult nsres; HRESULT hres; - hres = CreateUri(url, 0, 0, &iuri); + hres = create_uri(url, 0, &iuri); if(FAILED(hres)) return hres; @@ -3290,9 +3325,9 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString * if(FAILED(hres)) WARN("CoInternetCombineUrlEx failed: %08x\n", hres); }else { - hres = CreateUri(new_spec, 0, 0, &urlmon_uri); + hres = create_uri(new_spec, 0, &urlmon_uri); if(FAILED(hres)) - WARN("CreateUri failed: %08x\n", hres); + WARN("create_uri failed: %08x\n", hres); } if(FAILED(hres)) diff --git a/reactos/dll/win32/mshtml/olecmd.c b/reactos/dll/win32/mshtml/olecmd.c index 68ae50bafc6..ae8c4d5de31 100644 --- a/reactos/dll/win32/mshtml/olecmd.c +++ b/reactos/dll/win32/mshtml/olecmd.c @@ -595,109 +595,12 @@ static HRESULT exec_browsemode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out) { - IMoniker *mon; - HRESULT hres; - TRACE("(%p)->(%08x %p %p)\n", This, cmdexecopt, in, out); if(in || out) FIXME("unsupported args\n"); - if(This->doc_obj->usermode == EDITMODE) - return S_OK; - - This->doc_obj->usermode = EDITMODE; - - if(This->window->mon) { - CLSID clsid = IID_NULL; - hres = IMoniker_GetClassID(This->window->mon, &clsid); - if(SUCCEEDED(hres)) { - /* We should use IMoniker::Save here */ - FIXME("Use CLSID %s\n", debugstr_guid(&clsid)); - } - } - - if(This->doc_obj->frame) - IOleInPlaceFrame_SetStatusText(This->doc_obj->frame, NULL); - - This->window->readystate = READYSTATE_UNINITIALIZED; - - if(This->doc_obj->client) { - IOleCommandTarget *cmdtrg; - - hres = IOleClientSite_QueryInterface(This->doc_obj->client, &IID_IOleCommandTarget, - (void**)&cmdtrg); - if(SUCCEEDED(hres)) { - VARIANT var; - - V_VT(&var) = VT_I4; - V_I4(&var) = 0; - IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL); - - IOleCommandTarget_Release(cmdtrg); - } - } - - if(This->doc_obj->hostui) { - DOCHOSTUIINFO hostinfo; - - memset(&hostinfo, 0, sizeof(DOCHOSTUIINFO)); - hostinfo.cbSize = sizeof(DOCHOSTUIINFO); - hres = IDocHostUIHandler_GetHostInfo(This->doc_obj->hostui, &hostinfo); - if(SUCCEEDED(hres)) - /* FIXME: use hostinfo */ - TRACE("hostinfo = {%u %08x %08x %s %s}\n", - hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick, - debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS)); - } - - update_doc(This, UPDATE_UI); - - if(This->window->mon) { - /* FIXME: We should find nicer way to do this */ - remove_target_tasks(This->task_magic); - - mon = This->window->mon; - IMoniker_AddRef(mon); - }else { - static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; - - hres = CreateURLMoniker(NULL, about_blankW, &mon); - if(FAILED(hres)) { - FIXME("CreateURLMoniker failed: %08x\n", hres); - return hres; - } - } - - hres = IPersistMoniker_Load(&This->IPersistMoniker_iface, TRUE, mon, NULL, 0); - IMoniker_Release(mon); - if(FAILED(hres)) - return hres; - - if(This->doc_obj->ui_active) { - if(This->doc_obj->ip_window) - call_set_active_object(This->doc_obj->ip_window, NULL); - if(This->doc_obj->hostui) - IDocHostUIHandler_HideUI(This->doc_obj->hostui); - } - - if(This->doc_obj->ui_active) { - RECT rcBorderWidths; - - if(This->doc_obj->hostui) - IDocHostUIHandler_ShowUI(This->doc_obj->hostui, DOCHOSTUITYPE_AUTHOR, - &This->IOleInPlaceActiveObject_iface, &This->IOleCommandTarget_iface, - This->doc_obj->frame, This->doc_obj->ip_window); - - if(This->doc_obj->ip_window) - call_set_active_object(This->doc_obj->ip_window, &This->IOleInPlaceActiveObject_iface); - - memset(&rcBorderWidths, 0, sizeof(rcBorderWidths)); - if(This->doc_obj->frame) - IOleInPlaceFrame_SetBorderSpace(This->doc_obj->frame, &rcBorderWidths); - } - - return S_OK; + return setup_edit_mode(This->doc_obj); } static HRESULT exec_htmleditmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out) diff --git a/reactos/dll/win32/mshtml/oleobj.c b/reactos/dll/win32/mshtml/oleobj.c index 09f1c97fa27..3a69b1c2593 100644 --- a/reactos/dll/win32/mshtml/oleobj.c +++ b/reactos/dll/win32/mshtml/oleobj.c @@ -218,6 +218,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite HTMLDocument *This = impl_from_IOleObject(iface); IOleCommandTarget *cmdtrg = NULL; IOleWindow *ole_window; + IBrowserService *browser_service; BOOL hostui_setup; VARIANT silent; HWND hwnd; @@ -249,8 +250,22 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite This->doc_obj->doc_object_service = NULL; } + if(This->doc_obj->webbrowser) { + IUnknown_Release(This->doc_obj->webbrowser); + This->doc_obj->webbrowser = NULL; + } + + if(This->doc_obj->browser_service) { + IUnknown_Release(This->doc_obj->browser_service); + This->doc_obj->browser_service = NULL; + } + + if(This->doc_obj->travel_log) { + ITravelLog_Release(This->doc_obj->travel_log); + This->doc_obj->travel_log = NULL; + } + memset(&This->doc_obj->hostinfo, 0, sizeof(DOCHOSTUIINFO)); - This->doc_obj->is_webbrowser = FALSE; if(!pClientSite) return S_OK; @@ -322,6 +337,20 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite IOleWindow_Release(ole_window); } + hres = do_query_service((IUnknown*)pClientSite, &IID_IShellBrowser, + &IID_IBrowserService, (void**)&browser_service); + if(SUCCEEDED(hres)) { + ITravelLog *travel_log; + + This->doc_obj->browser_service = (IUnknown*)browser_service; + + hres = IBrowserService_GetTravelLog(browser_service, &travel_log); + if(SUCCEEDED(hres)) + This->doc_obj->travel_log = travel_log; + }else { + browser_service = NULL; + } + hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleCommandTarget, (void**)&cmdtrg); if(SUCCEEDED(hres)) { VARIANT var; @@ -331,16 +360,13 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite if(!hostui_setup) { IDocObjectService *doc_object_service; - IBrowserService *browser_service; IWebBrowser2 *wb; V_VT(&var) = VT_UNKNOWN; V_UNKNOWN(&var) = (IUnknown*)&This->window->base.IHTMLWindow2_iface; IOleCommandTarget_Exec(cmdtrg, &CGID_DocHostCmdPriv, DOCHOST_DOCCANNAVIGATE, 0, &var, NULL); - hres = do_query_service((IUnknown*)pClientSite, &IID_IShellBrowser, - &IID_IBrowserService, (void**)&browser_service); - if(SUCCEEDED(hres)) { + if(browser_service) { hres = IBrowserService_QueryInterface(browser_service, &IID_IDocObjectService, (void**)&doc_object_service); if(SUCCEEDED(hres)) { @@ -351,12 +377,8 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite * embedder supports IWebBrowserApp. */ hres = do_query_service((IUnknown*)pClientSite, &IID_IWebBrowserApp, &IID_IWebBrowser2, (void**)&wb); - if(SUCCEEDED(hres)) { - This->doc_obj->is_webbrowser = TRUE; - IWebBrowser2_Release(wb); - } - - IBrowserService_Release(browser_service); + if(SUCCEEDED(hres)) + This->doc_obj->webbrowser = (IUnknown*)wb; } } } diff --git a/reactos/dll/win32/mshtml/omnavigator.c b/reactos/dll/win32/mshtml/omnavigator.c index 9ad7e931712..95528b1f405 100644 --- a/reactos/dll/win32/mshtml/omnavigator.c +++ b/reactos/dll/win32/mshtml/omnavigator.c @@ -57,13 +57,6 @@ typedef struct { HTMLMimeTypesCollection *mime_types; } OmNavigator; -typedef struct { - DispatchEx dispex; - IOmHistory IOmHistory_iface; - - LONG ref; -} OmHistory; - static inline OmHistory *impl_from_IOmHistory(IOmHistory *iface) { return CONTAINING_RECORD(iface, OmHistory, IOmHistory_iface); @@ -155,8 +148,17 @@ static HRESULT WINAPI OmHistory_Invoke(IOmHistory *iface, DISPID dispIdMember, R static HRESULT WINAPI OmHistory_get_length(IOmHistory *iface, short *p) { OmHistory *This = impl_from_IOmHistory(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + if(!This->window || !This->window->base.outer_window->doc_obj + || !This->window->base.outer_window->doc_obj->travel_log) { + *p = 0; + }else { + *p = ITravelLog_CountEntries(This->window->base.outer_window->doc_obj->travel_log, + This->window->base.outer_window->doc_obj->browser_service); + } + return S_OK; } static HRESULT WINAPI OmHistory_back(IOmHistory *iface, VARIANT *pvargdistance) @@ -206,7 +208,7 @@ static dispex_static_data_t OmHistory_dispex = { }; -HRESULT create_history(IOmHistory **ret) +HRESULT create_history(HTMLInnerWindow *window, OmHistory **ret) { OmHistory *history; @@ -218,7 +220,9 @@ HRESULT create_history(IOmHistory **ret) history->IOmHistory_iface.lpVtbl = &OmHistoryVtbl; history->ref = 1; - *ret = &history->IOmHistory_iface; + history->window = window; + + *ret = history; return S_OK; } diff --git a/reactos/dll/win32/mshtml/persist.c b/reactos/dll/win32/mshtml/persist.c index af746c0a9fa..6d2b041db08 100644 --- a/reactos/dll/win32/mshtml/persist.c +++ b/reactos/dll/win32/mshtml/persist.c @@ -80,7 +80,7 @@ static void notify_travellog_update(HTMLDocumentObj *doc) IOleCommandTarget *cmdtrg; HRESULT hres; - if(!doc->is_webbrowser) + if(!doc->webbrowser) return; hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&cmdtrg); @@ -161,7 +161,7 @@ void set_current_mon(HTMLOuterWindow *This, IMoniker *mon, DWORD flags) hres = IMoniker_GetDisplayName(mon, NULL, NULL, &url); if(SUCCEEDED(hres)) { - hres = CreateUri(url, 0, 0, &uri); + hres = create_uri(url, 0, &uri); if(FAILED(hres)) { WARN("CrateUri failed: %08x\n", hres); set_current_uri(This, NULL); @@ -181,11 +181,16 @@ void set_current_mon(HTMLOuterWindow *This, IMoniker *mon, DWORD flags) set_script_mode(This, use_gecko_script(This) ? SCRIPTMODE_GECKO : SCRIPTMODE_ACTIVESCRIPT); } +HRESULT create_uri(const WCHAR *uri_str, DWORD flags, IUri **uri) +{ + return CreateUri(uri_str, flags | Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, uri); +} + HRESULT create_relative_uri(HTMLOuterWindow *window, const WCHAR *rel_uri, IUri **uri) { return window->uri ? CoInternetCombineUrlEx(window->uri, rel_uri, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, uri, 0) - : CreateUri(rel_uri, 0, 0, uri); + : create_uri(rel_uri, 0, uri); } void set_download_state(HTMLDocumentObj *doc, int state) @@ -347,25 +352,43 @@ void prepare_for_binding(HTMLDocument *This, IMoniker *mon, DWORD flags) } } -HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannelBSC *async_bsc, BOOL set_download) +HRESULT set_moniker(HTMLOuterWindow *window, IMoniker *mon, IUri *nav_uri, IBindCtx *pibc, nsChannelBSC *async_bsc, + BOOL set_download) { download_proc_task_t *download_task; + HTMLDocumentObj *doc_obj = NULL; nsChannelBSC *bscallback; nsWineURI *nsuri; LPOLESTR url; + IUri *uri; HRESULT hres; + if(window->doc_obj && window->doc_obj->basedoc.window == window) + doc_obj = window->doc_obj; + hres = IMoniker_GetDisplayName(mon, pibc, NULL, &url); if(FAILED(hres)) { WARN("GetDiaplayName failed: %08x\n", hres); return hres; } + if(nav_uri) { + uri = nav_uri; + }else { + hres = create_uri(url, 0, &uri); + if(FAILED(hres)) { + CoTaskMemFree(url); + return hres; + } + } + TRACE("got url: %s\n", debugstr_w(url)); - set_ready_state(This->window, READYSTATE_LOADING); + set_ready_state(window, READYSTATE_LOADING); - hres = create_doc_uri(This->window, url, &nsuri); + hres = create_doc_uri(window, uri, &nsuri); + if(!nav_uri) + IUri_Release(uri); if(SUCCEEDED(hres)) { if(async_bsc) bscallback = async_bsc; @@ -374,13 +397,16 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel } if(SUCCEEDED(hres)) { - remove_target_tasks(This->task_magic); - abort_window_bindings(This->window->base.inner_window); + if(window->base.inner_window->doc) + remove_target_tasks(window->base.inner_window->task_magic); + abort_window_bindings(window->base.inner_window); - hres = load_nsuri(This->window, nsuri, bscallback, 0/*LOAD_INITIAL_DOCUMENT_URI*/); + hres = load_nsuri(window, nsuri, bscallback, LOAD_FLAGS_BYPASS_CACHE); nsISupports_Release((nsISupports*)nsuri); /* FIXME */ - if(SUCCEEDED(hres)) - hres = create_pending_window(This->window, bscallback); + if(SUCCEEDED(hres)) { + hres = create_pending_window(window, bscallback); + TRACE("pending window for %p %p %p\n", window, bscallback, window->pending_window); + } if(bscallback != async_bsc) IBindStatusCallback_Release(&bscallback->bsc.IBindStatusCallback_iface); } @@ -390,25 +416,29 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel return hres; } - HTMLDocument_LockContainer(This->doc_obj, TRUE); + if(doc_obj) { + HTMLDocument_LockContainer(doc_obj, TRUE); - if(This->doc_obj->frame) { - docobj_task_t *task; + if(doc_obj->frame) { + docobj_task_t *task; - task = heap_alloc(sizeof(docobj_task_t)); - task->doc = This->doc_obj; - hres = push_task(&task->header, set_progress_proc, NULL, This->doc_obj->basedoc.task_magic); - if(FAILED(hres)) { - CoTaskMemFree(url); - return hres; + task = heap_alloc(sizeof(docobj_task_t)); + task->doc = doc_obj; + hres = push_task(&task->header, set_progress_proc, NULL, doc_obj->basedoc.task_magic); + if(FAILED(hres)) { + CoTaskMemFree(url); + return hres; + } } + + download_task = heap_alloc(sizeof(download_proc_task_t)); + download_task->doc = doc_obj; + download_task->set_download = set_download; + download_task->url = url; + return push_task(&download_task->header, set_downloading_proc, set_downloading_task_destr, doc_obj->basedoc.task_magic); } - download_task = heap_alloc(sizeof(download_proc_task_t)); - download_task->doc = This->doc_obj; - download_task->set_download = set_download; - download_task->url = url; - return push_task(&download_task->header, set_downloading_proc, set_downloading_task_destr, This->doc_obj->basedoc.task_magic); + return S_OK; } void set_ready_state(HTMLOuterWindow *window, READYSTATE readystate) @@ -547,7 +577,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva prepare_for_binding(This, pimkName, FALSE); call_docview_84(This->doc_obj); - hres = set_moniker(This, pimkName, pibc, NULL, TRUE); + hres = set_moniker(This->window, pimkName, NULL, pibc, NULL, TRUE); if(FAILED(hres)) return hres; @@ -816,7 +846,7 @@ static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM } prepare_for_binding(This, mon, FALSE); - hres = set_moniker(This, mon, NULL, NULL, TRUE); + hres = set_moniker(This->window, mon, NULL, NULL, NULL, TRUE); IMoniker_Release(mon); if(FAILED(hres)) return hres; @@ -873,7 +903,7 @@ static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface) } prepare_for_binding(This, mon, FALSE); - hres = set_moniker(This, mon, NULL, NULL, FALSE); + hres = set_moniker(This->window, mon, NULL, NULL, NULL, FALSE); IMoniker_Release(mon); if(FAILED(hres)) return hres; @@ -970,7 +1000,7 @@ static HRESULT WINAPI PersistHistory_LoadHistory(IPersistHistory *iface, IStream hres = E_FAIL; if(SUCCEEDED(hres)) { uri_str[str_len] = 0; - hres = CreateUri(uri_str, 0, 0, &uri); + hres = create_uri(uri_str, 0, &uri); } heap_free(uri_str); if(FAILED(hres)) diff --git a/reactos/dll/win32/mshtml/propbag.c b/reactos/dll/win32/mshtml/propbag.c index 40bc4c25bff..e764b4935a6 100644 --- a/reactos/dll/win32/mshtml/propbag.c +++ b/reactos/dll/win32/mshtml/propbag.c @@ -275,7 +275,7 @@ static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag) { nsIDOMHTMLParamElement *nsparam; nsAString name_str, value_str; - nsIDOMNodeList *params; + nsIDOMHTMLCollection *params; UINT32 length, i; nsIDOMNode *nsnode; nsresult nsres; @@ -289,12 +289,12 @@ static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag) if(NS_FAILED(nsres)) return E_FAIL; - nsres = nsIDOMNodeList_GetLength(params, &length); + nsres = nsIDOMHTMLCollection_GetLength(params, &length); if(NS_FAILED(nsres)) length = 0; for(i=0; i < length; i++) { - nsres = nsIDOMNodeList_Item(params, i, &nsnode); + nsres = nsIDOMHTMLCollection_Item(params, i, &nsnode); if(NS_FAILED(nsres)) { hres = E_FAIL; break; @@ -333,7 +333,7 @@ static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag) } } - nsIDOMNodeList_Release(params); + nsIDOMHTMLCollection_Release(params); return hres; } diff --git a/reactos/dll/win32/mshtml/protocol.c b/reactos/dll/win32/mshtml/protocol.c index 9f1cfa15d7b..a8b65c07df5 100644 --- a/reactos/dll/win32/mshtml/protocol.c +++ b/reactos/dll/win32/mshtml/protocol.c @@ -634,31 +634,27 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, } url_dll = url + sizeof(wszRes)/sizeof(wszRes[0]); - if(!(url_file = strrchrW(url_dll, '/'))) { + if(!(res_type = strchrW(url_dll, '/'))) { WARN("wrong url: %s\n", debugstr_w(url)); IInternetProtocolSink_ReportResult(pOIProtSink, MK_E_SYNTAX, 0, NULL); heap_free(url); return MK_E_SYNTAX; } - *url_file++ = 0; + *res_type++ = 0; + if ((url_file = strchrW(res_type, '/'))) { + *url_file++ = 0; + }else { + url_file = res_type; + res_type = MAKEINTRESOURCEW(RT_HTML); + } + hdll = LoadLibraryExW(url_dll, NULL, LOAD_LIBRARY_AS_DATAFILE); if(!hdll) { - if (!(res_type = strrchrW(url_dll, '/'))) { - WARN("Could not open dll: %s\n", debugstr_w(url_dll)); - IInternetProtocolSink_ReportResult(pOIProtSink, HRESULT_FROM_WIN32(GetLastError()), 0, NULL); - heap_free(url); - return HRESULT_FROM_WIN32(GetLastError()); - } - *res_type++ = 0; - - hdll = LoadLibraryExW(url_dll, NULL, LOAD_LIBRARY_AS_DATAFILE); - if(!hdll) { - WARN("Could not open dll: %s\n", debugstr_w(url_dll)); - IInternetProtocolSink_ReportResult(pOIProtSink, HRESULT_FROM_WIN32(GetLastError()), 0, NULL); - heap_free(url); - return HRESULT_FROM_WIN32(GetLastError()); - } + WARN("Could not open dll: %s\n", debugstr_w(url_dll)); + IInternetProtocolSink_ReportResult(pOIProtSink, HRESULT_FROM_WIN32(GetLastError()), 0, NULL); + heap_free(url); + return HRESULT_FROM_WIN32(GetLastError()); } TRACE("trying to find resource type %s, name %s\n", debugstr_w(res_type), debugstr_w(url_file)); @@ -668,7 +664,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, LPWSTR endpoint = NULL; DWORD file_id = strtolW(url_file, &endpoint, 10); if(endpoint == url_file+strlenW(url_file)) - src = FindResourceW(hdll, MAKEINTRESOURCEW(file_id), MAKEINTRESOURCEW(RT_HTML)); + src = FindResourceW(hdll, MAKEINTRESOURCEW(file_id), res_type); if(!src) { WARN("Could not find resource\n"); diff --git a/reactos/dll/win32/mshtml/task.c b/reactos/dll/win32/mshtml/task.c index e7999a0b64d..6942c4fadf1 100644 --- a/reactos/dll/win32/mshtml/task.c +++ b/reactos/dll/win32/mshtml/task.c @@ -131,8 +131,10 @@ void remove_target_tasks(LONG target) } if(!list_empty(&thread_data->timer_list)) { + DWORD tc = GetTickCount(); + timer = LIST_ENTRY(list_head(&thread_data->timer_list), task_timer_t, entry); - SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time - GetTickCount(), NULL); + SetTimer(thread_data->thread_hwnd, TIMER_ID, max( (int)(timer->time - tc), 0 ), NULL); } while(thread_data->task_queue_head && thread_data->task_queue_head->target_magic == target) { @@ -258,17 +260,29 @@ static LRESULT process_timer(void) thread_data_t *thread_data; IDispatch *disp; DWORD tc; - task_timer_t *timer; + task_timer_t *timer=NULL, *last_timer; TRACE("\n"); thread_data = get_thread_data(FALSE); assert(thread_data != NULL); - while(!list_empty(&thread_data->timer_list)) { + if(list_empty(&thread_data->timer_list)) { + KillTimer(thread_data->thread_hwnd, TIMER_ID); + return 0; + } + + last_timer = LIST_ENTRY(list_tail(&thread_data->timer_list), task_timer_t, entry); + do { + tc = GetTickCount(); + if(timer == last_timer) { + timer = LIST_ENTRY(list_head(&thread_data->timer_list), task_timer_t, entry); + SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time>tc ? timer->time-tc : 0, NULL); + return 0; + } + timer = LIST_ENTRY(list_head(&thread_data->timer_list), task_timer_t, entry); - tc = GetTickCount(); if(timer->time > tc) { SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time-tc, NULL); return 0; @@ -287,7 +301,7 @@ static LRESULT process_timer(void) call_timer_disp(disp); IDispatch_Release(disp); - } + }while(!list_empty(&thread_data->timer_list)); KillTimer(thread_data->thread_hwnd, TIMER_ID); return 0; diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 2cf1f0802db..248373e1380 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -116,7 +116,7 @@ reactos/dll/win32/msctf # Synced to Wine-1.7.1 reactos/dll/win32/msftedit # Synced to Wine-1.5.19 reactos/dll/win32/msg711.acm # Synced to Wine-1.7.1 reactos/dll/win32/msgsm32.acm # Synced to Wine-1.7.1 -reactos/dll/win32/mshtml # Synced to Wine-1.5.26 +reactos/dll/win32/mshtml # Synced to Wine-1.7.1 reactos/dll/win32/mshtml.tlb # Synced to Wine-1.5.26 reactos/dll/win32/msi # Synced to Wine-1.7.1 reactos/dll/win32/msimg32 # Synced to Wine-1.5.19