mshtml: Added exec_refresh implementation.
This commit is contained in:
parent
f0b7db4df8
commit
1cc3cf1b64
|
@ -101,6 +101,7 @@ typedef struct {
|
||||||
#define BINDING_NAVIGATED 0x0001
|
#define BINDING_NAVIGATED 0x0001
|
||||||
#define BINDING_REPLACE 0x0002
|
#define BINDING_REPLACE 0x0002
|
||||||
#define BINDING_FROMHIST 0x0004
|
#define BINDING_FROMHIST 0x0004
|
||||||
|
#define BINDING_REFRESH 0x0008
|
||||||
|
|
||||||
HRESULT set_http_header(struct list*,const WCHAR*,int,const WCHAR*,int) DECLSPEC_HIDDEN;
|
HRESULT set_http_header(struct list*,const WCHAR*,int,const WCHAR*,int) DECLSPEC_HIDDEN;
|
||||||
HRESULT create_redirect_nschannel(const WCHAR*,nsChannel*,nsChannel**) DECLSPEC_HIDDEN;
|
HRESULT create_redirect_nschannel(const WCHAR*,nsChannel*,nsChannel**) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -374,6 +374,7 @@ struct HTMLOuterWindow {
|
||||||
IUri *uri;
|
IUri *uri;
|
||||||
IUri *uri_nofrag;
|
IUri *uri_nofrag;
|
||||||
BSTR url;
|
BSTR url;
|
||||||
|
DWORD load_flags;
|
||||||
|
|
||||||
SCRIPTMODE scriptmode;
|
SCRIPTMODE scriptmode;
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "mshtml_private.h"
|
#include "mshtml_private.h"
|
||||||
#include "htmlscript.h"
|
#include "htmlscript.h"
|
||||||
#include "htmlevent.h"
|
#include "htmlevent.h"
|
||||||
|
#include "binding.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
@ -267,7 +268,7 @@ static void parse_complete(HTMLDocumentObj *doc)
|
||||||
call_property_onchanged(&doc->basedoc.cp_propnotif, 1005);
|
call_property_onchanged(&doc->basedoc.cp_propnotif, 1005);
|
||||||
call_explorer_69(doc);
|
call_explorer_69(doc);
|
||||||
|
|
||||||
if(doc->is_webbrowser && doc->usermode != EDITMODE)
|
if(doc->is_webbrowser && doc->usermode != EDITMODE && !(doc->basedoc.window->load_flags & BINDING_REFRESH))
|
||||||
IDocObjectService_FireNavigateComplete2(doc->doc_object_service, &doc->basedoc.window->base.IHTMLWindow2_iface, 0);
|
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 */
|
/* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
|
||||||
|
|
|
@ -2052,7 +2052,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC
|
||||||
if(!uri_nofrag)
|
if(!uri_nofrag)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
if(window->doc_obj->client) {
|
if(window->doc_obj->client && !(flags & BINDING_REFRESH)) {
|
||||||
IOleCommandTarget *cmdtrg;
|
IOleCommandTarget *cmdtrg;
|
||||||
|
|
||||||
hres = IOleClientSite_QueryInterface(window->doc_obj->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
|
hres = IOleClientSite_QueryInterface(window->doc_obj->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
|
||||||
|
@ -2075,7 +2075,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(window->uri_nofrag && !post_data_size) {
|
if(!(flags & BINDING_REFRESH) && window->uri_nofrag && !post_data_size) {
|
||||||
BOOL eq;
|
BOOL eq;
|
||||||
|
|
||||||
hres = IUri_IsEqual(uri_nofrag, window->uri_nofrag, &eq);
|
hres = IUri_IsEqual(uri_nofrag, window->uri_nofrag, &eq);
|
||||||
|
@ -2115,7 +2115,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC
|
||||||
|
|
||||||
/* Silently and repeated when real loading starts? */
|
/* Silently and repeated when real loading starts? */
|
||||||
window->readystate = READYSTATE_LOADING;
|
window->readystate = READYSTATE_LOADING;
|
||||||
if(!(flags & BINDING_FROMHIST))
|
if(!(flags & (BINDING_FROMHIST|BINDING_REFRESH)))
|
||||||
call_docview_84(window->doc_obj);
|
call_docview_84(window->doc_obj);
|
||||||
|
|
||||||
task->window = window;
|
task->window = window;
|
||||||
|
@ -2266,6 +2266,7 @@ static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *dis
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
if(window->doc_obj && window->doc_obj->is_webbrowser && window == window->doc_obj->basedoc.window) {
|
if(window->doc_obj && window->doc_obj->is_webbrowser && window == window->doc_obj->basedoc.window) {
|
||||||
|
if(!(flags & BINDING_REFRESH)) {
|
||||||
BOOL cancel = FALSE;
|
BOOL cancel = FALSE;
|
||||||
|
|
||||||
hres = IDocObjectService_FireBeforeNavigate2(window->doc_obj->doc_object_service, NULL, display_uri, 0x40,
|
hres = IDocObjectService_FireBeforeNavigate2(window->doc_obj->doc_object_service, NULL, display_uri, 0x40,
|
||||||
|
@ -2274,6 +2275,7 @@ static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *dis
|
||||||
TRACE("Navigation canceled\n");
|
TRACE("Navigation canceled\n");
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return super_navigate(window, uri, flags, NULL, NULL, 0);
|
return super_navigate(window, uri, flags, NULL, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "mshtml_private.h"
|
#include "mshtml_private.h"
|
||||||
#include "htmlscript.h"
|
#include "htmlscript.h"
|
||||||
#include "htmlevent.h"
|
#include "htmlevent.h"
|
||||||
|
#include "binding.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
||||||
|
@ -258,7 +259,8 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
|
||||||
update_title(doc_obj);
|
update_title(doc_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc_obj && doc_obj->usermode!=EDITMODE && doc_obj->doc_object_service)
|
if(doc_obj && doc_obj->usermode!=EDITMODE && doc_obj->doc_object_service
|
||||||
|
&& !(doc->basedoc.window->load_flags & BINDING_REFRESH))
|
||||||
IDocObjectService_FireDocumentComplete(doc_obj->doc_object_service,
|
IDocObjectService_FireDocumentComplete(doc_obj->doc_object_service,
|
||||||
&doc->basedoc.window->base.IHTMLWindow2_iface, 0);
|
&doc->basedoc.window->base.IHTMLWindow2_iface, 0);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
#include "mshtml_private.h"
|
#include "mshtml_private.h"
|
||||||
|
#include "binding.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
||||||
|
@ -384,10 +385,69 @@ static HRESULT exec_get_zoom_range(HTMLDocument *This, DWORD nCmdexecopt, VARIAN
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
task_t header;
|
||||||
|
HTMLOuterWindow *window;
|
||||||
|
}refresh_task_t;
|
||||||
|
|
||||||
|
static void refresh_proc(task_t *_task)
|
||||||
|
{
|
||||||
|
refresh_task_t *task = (refresh_task_t*)_task;
|
||||||
|
HTMLOuterWindow *window = task->window;
|
||||||
|
|
||||||
|
TRACE("%p\n", window);
|
||||||
|
|
||||||
|
window->readystate = READYSTATE_UNINITIALIZED;
|
||||||
|
|
||||||
|
if(window->doc_obj && window->doc_obj->client_cmdtrg) {
|
||||||
|
VARIANT var;
|
||||||
|
|
||||||
|
V_VT(&var) = VT_I4;
|
||||||
|
V_I4(&var) = 0;
|
||||||
|
IOleCommandTarget_Exec(window->doc_obj->client_cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
load_uri(task->window, task->window->uri, BINDING_REFRESH);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void refresh_destr(task_t *_task)
|
||||||
|
{
|
||||||
|
refresh_task_t *task = (refresh_task_t*)_task;
|
||||||
|
|
||||||
|
IHTMLWindow2_Release(&task->window->base.IHTMLWindow2_iface);
|
||||||
|
heap_free(task);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT exec_refresh(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
static HRESULT exec_refresh(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||||
{
|
{
|
||||||
FIXME("(%p)->(%d %p %p)\n", This, nCmdexecopt, pvaIn, pvaOut);
|
refresh_task_t *task;
|
||||||
return E_NOTIMPL;
|
HRESULT hres;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%d %s %p)\n", This, nCmdexecopt, debugstr_variant(pvaIn), pvaOut);
|
||||||
|
|
||||||
|
if(This->doc_obj->client) {
|
||||||
|
IOleCommandTarget *olecmd;
|
||||||
|
|
||||||
|
hres = IOleClientSite_QueryInterface(This->doc_obj->client, &IID_IOleCommandTarget, (void**)&olecmd);
|
||||||
|
if(SUCCEEDED(hres)) {
|
||||||
|
hres = IOleCommandTarget_Exec(olecmd, &CGID_DocHostCommandHandler, 2300, nCmdexecopt, pvaIn, pvaOut);
|
||||||
|
IOleCommandTarget_Release(olecmd);
|
||||||
|
if(SUCCEEDED(hres))
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!This->window)
|
||||||
|
return E_UNEXPECTED;
|
||||||
|
|
||||||
|
task = heap_alloc(sizeof(*task));
|
||||||
|
if(!task)
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
IHTMLWindow2_AddRef(&This->window->base.IHTMLWindow2_iface);
|
||||||
|
task->window = This->window;
|
||||||
|
|
||||||
|
return push_task(&task->header, refresh_proc, refresh_destr, This->window->task_magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT exec_stop(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
static HRESULT exec_stop(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||||
|
|
|
@ -130,12 +130,13 @@ void set_current_mon(HTMLOuterWindow *This, IMoniker *mon, DWORD flags)
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
if(This->mon) {
|
if(This->mon) {
|
||||||
if(This->doc_obj && !(flags & BINDING_REPLACE))
|
if(This->doc_obj && !(flags & (BINDING_REPLACE|BINDING_REFRESH)))
|
||||||
notify_travellog_update(This->doc_obj);
|
notify_travellog_update(This->doc_obj);
|
||||||
IMoniker_Release(This->mon);
|
IMoniker_Release(This->mon);
|
||||||
This->mon = NULL;
|
This->mon = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
This->load_flags = flags;
|
||||||
if(!mon)
|
if(!mon)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue