mshtml: Call Exec(DOCHOST_DOCCANNAVIGATE) from IOleObject::SetClientSite.
This commit is contained in:
parent
80f8a0df82
commit
2cf2d8fed2
|
@ -398,7 +398,7 @@ struct HTMLDocumentObj {
|
||||||
BOOL in_place_active;
|
BOOL in_place_active;
|
||||||
BOOL ui_active;
|
BOOL ui_active;
|
||||||
BOOL window_active;
|
BOOL window_active;
|
||||||
BOOL has_key_path;
|
BOOL hostui_setup;
|
||||||
BOOL container_locked;
|
BOOL container_locked;
|
||||||
BOOL focus;
|
BOOL focus;
|
||||||
INT download_state;
|
INT download_state;
|
||||||
|
|
|
@ -34,9 +34,13 @@
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
#include "mshtml_private.h"
|
#include "mshtml_private.h"
|
||||||
|
#include "initguid.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
||||||
|
|
||||||
|
DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0);
|
||||||
|
#define DOCHOST_DOCCANNAVIGATE 0
|
||||||
|
|
||||||
/**********************************************************
|
/**********************************************************
|
||||||
* IOleObject implementation
|
* IOleObject implementation
|
||||||
*/
|
*/
|
||||||
|
@ -92,6 +96,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
HTMLDocument *This = OLEOBJ_THIS(iface);
|
HTMLDocument *This = OLEOBJ_THIS(iface);
|
||||||
IDocHostUIHandler *pDocHostUIHandler = NULL;
|
IDocHostUIHandler *pDocHostUIHandler = NULL;
|
||||||
IOleCommandTarget *cmdtrg = NULL;
|
IOleCommandTarget *cmdtrg = NULL;
|
||||||
|
BOOL hostui_setup;
|
||||||
VARIANT silent;
|
VARIANT silent;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -116,6 +121,8 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
if(!pClientSite)
|
if(!pClientSite)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
|
hostui_setup = This->doc_obj->hostui_setup;
|
||||||
|
|
||||||
hres = IOleObject_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (void**)&pDocHostUIHandler);
|
hres = IOleObject_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (void**)&pDocHostUIHandler);
|
||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
DOCHOSTUIINFO hostinfo;
|
DOCHOSTUIINFO hostinfo;
|
||||||
|
@ -133,7 +140,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
This->doc_obj->hostinfo = hostinfo;
|
This->doc_obj->hostinfo = hostinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!This->doc_obj->has_key_path) {
|
if(!hostui_setup) {
|
||||||
hres = IDocHostUIHandler_GetOptionKeyPath(pDocHostUIHandler, &key_path, 0);
|
hres = IDocHostUIHandler_GetOptionKeyPath(pDocHostUIHandler, &key_path, 0);
|
||||||
if(hres == S_OK && key_path) {
|
if(hres == S_OK && key_path) {
|
||||||
if(key_path[0]) {
|
if(key_path[0]) {
|
||||||
|
@ -157,7 +164,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
IDocHostUIHandler2_Release(pDocHostUIHandler2);
|
IDocHostUIHandler2_Release(pDocHostUIHandler2);
|
||||||
}
|
}
|
||||||
|
|
||||||
This->doc_obj->has_key_path = TRUE;
|
This->doc_obj->hostui_setup = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,6 +186,12 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
VARIANT var;
|
VARIANT var;
|
||||||
OLECMD cmd = {OLECMDID_SETPROGRESSTEXT, 0};
|
OLECMD cmd = {OLECMDID_SETPROGRESSTEXT, 0};
|
||||||
|
|
||||||
|
if(!hostui_setup) {
|
||||||
|
V_VT(&var) = VT_UNKNOWN;
|
||||||
|
V_UNKNOWN(&var) = (IUnknown*)HTMLWINDOW2(This->window);
|
||||||
|
IOleCommandTarget_Exec(cmdtrg, &CGID_DocHostCmdPriv, DOCHOST_DOCCANNAVIGATE, 0, &var, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
IOleCommandTarget_QueryStatus(cmdtrg, NULL, 1, &cmd, NULL);
|
IOleCommandTarget_QueryStatus(cmdtrg, NULL, 1, &cmd, NULL);
|
||||||
|
|
||||||
V_VT(&var) = VT_I4;
|
V_VT(&var) = VT_I4;
|
||||||
|
|
|
@ -3142,7 +3142,7 @@ static void test_Load(IPersistMoniker *persist, IMoniker *mon)
|
||||||
CHECK_CALLED(GetOptionKeyPath);
|
CHECK_CALLED(GetOptionKeyPath);
|
||||||
CHECK_CALLED(GetOverrideKeyPath);
|
CHECK_CALLED(GetOverrideKeyPath);
|
||||||
CHECK_CALLED(GetWindow);
|
CHECK_CALLED(GetWindow);
|
||||||
todo_wine CHECK_CALLED(Exec_DOCCANNAVIGATE);
|
CHECK_CALLED(Exec_DOCCANNAVIGATE);
|
||||||
CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
|
CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
|
||||||
CHECK_CALLED(Exec_SETPROGRESSMAX);
|
CHECK_CALLED(Exec_SETPROGRESSMAX);
|
||||||
CHECK_CALLED(Exec_SETPROGRESSPOS);
|
CHECK_CALLED(Exec_SETPROGRESSPOS);
|
||||||
|
@ -3865,7 +3865,7 @@ static void test_ClientSite(IOleObject *oleobj, DWORD flags)
|
||||||
}
|
}
|
||||||
CHECK_CALLED(GetWindow);
|
CHECK_CALLED(GetWindow);
|
||||||
if(flags & CLIENTSITE_EXPECTPATH)
|
if(flags & CLIENTSITE_EXPECTPATH)
|
||||||
todo_wine CHECK_CALLED(Exec_DOCCANNAVIGATE);
|
CHECK_CALLED(Exec_DOCCANNAVIGATE);
|
||||||
CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
|
CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
|
||||||
CHECK_CALLED(Exec_SETPROGRESSMAX);
|
CHECK_CALLED(Exec_SETPROGRESSMAX);
|
||||||
CHECK_CALLED(Exec_SETPROGRESSPOS);
|
CHECK_CALLED(Exec_SETPROGRESSPOS);
|
||||||
|
@ -4987,7 +4987,7 @@ static void test_UIActivate(BOOL do_load, BOOL use_ipsex, BOOL use_ipsw)
|
||||||
CHECK_CALLED(GetOptionKeyPath);
|
CHECK_CALLED(GetOptionKeyPath);
|
||||||
CHECK_CALLED(GetOverrideKeyPath);
|
CHECK_CALLED(GetOverrideKeyPath);
|
||||||
CHECK_CALLED(GetWindow);
|
CHECK_CALLED(GetWindow);
|
||||||
todo_wine CHECK_CALLED(Exec_DOCCANNAVIGATE);
|
CHECK_CALLED(Exec_DOCCANNAVIGATE);
|
||||||
CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
|
CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
|
||||||
CHECK_CALLED(Exec_SETPROGRESSMAX);
|
CHECK_CALLED(Exec_SETPROGRESSMAX);
|
||||||
CHECK_CALLED(Exec_SETPROGRESSPOS);
|
CHECK_CALLED(Exec_SETPROGRESSPOS);
|
||||||
|
|
Loading…
Reference in New Issue