mshtml: Added history update notification support.

This commit is contained in:
Jacek Caban 2012-01-20 15:11:06 +01:00 committed by Alexandre Julliard
parent d9e57da4c7
commit 5e84789578
2 changed files with 35 additions and 2 deletions

View File

@ -44,6 +44,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
/* Undocumented notification, see tests */
#define CMDID_EXPLORER_UPDATEHISTORY 38
typedef struct {
task_t header;
HTMLDocumentObj *doc;
@ -70,6 +73,35 @@ static BOOL use_gecko_script(HTMLWindow *window)
return FAILED(hres) || scheme != URL_SCHEME_ABOUT;
}
static void notify_travellog_update(HTMLDocumentObj *doc)
{
IOleCommandTarget *cmdtrg;
HRESULT hres;
if(!doc->is_webbrowser)
return;
/* Don't notify if we were in about: page */
if(doc->basedoc.window->uri) {
DWORD scheme;
hres = IUri_GetScheme(doc->basedoc.window->uri, &scheme);
if(SUCCEEDED(hres) && scheme == URL_SCHEME_ABOUT)
return;
}
hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
if(SUCCEEDED(hres)) {
VARIANT vin;
V_VT(&vin) = VT_I4;
V_I4(&vin) = 0;
IOleCommandTarget_Exec(cmdtrg, &CGID_Explorer, CMDID_EXPLORER_UPDATEHISTORY, 0, &vin, NULL);
IOleCommandTarget_Release(cmdtrg);
}
}
void set_current_uri(HTMLWindow *window, IUri *uri)
{
if(window->uri) {
@ -96,11 +128,12 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon)
HRESULT hres;
if(This->mon) {
if(This->doc_obj)
notify_travellog_update(This->doc_obj);
IMoniker_Release(This->mon);
This->mon = NULL;
}
if(!mon)
return;

View File

@ -5113,7 +5113,7 @@ static void test_download(DWORD flags)
CLEAR_CALLED(Exec_UPDATECOMMANDS);
CLEAR_CALLED(Exec_SETTITLE);
if(flags & DWL_EXPECT_HISTUPDATE)
todo_wine CHECK_CALLED(Exec_Explorer_38);
CHECK_CALLED(Exec_Explorer_38);
todo_wine CHECK_CALLED_BROKEN(UpdateBackForwardState);
}
if(!is_js) {