mshtml: Access document object via browser object in IBindCallbackRedirect::Redirect.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
aa96a8de36
commit
70a964d4f9
|
@ -590,22 +590,22 @@ static ULONG WINAPI BindCallbackRedirect_Release(IBindCallbackRedirect *iface)
|
||||||
static HRESULT WINAPI BindCallbackRedirect_Redirect(IBindCallbackRedirect *iface, const WCHAR *url, VARIANT_BOOL *vbCancel)
|
static HRESULT WINAPI BindCallbackRedirect_Redirect(IBindCallbackRedirect *iface, const WCHAR *url, VARIANT_BOOL *vbCancel)
|
||||||
{
|
{
|
||||||
BSCallback *This = impl_from_IBindCallbackRedirect(iface);
|
BSCallback *This = impl_from_IBindCallbackRedirect(iface);
|
||||||
HTMLDocumentObj *doc_obj;
|
GeckoBrowser *browser;
|
||||||
BOOL cancel = FALSE;
|
BOOL cancel = FALSE;
|
||||||
BSTR frame_name = NULL;
|
BSTR frame_name = NULL;
|
||||||
HRESULT hres = S_OK;
|
HRESULT hres = S_OK;
|
||||||
|
|
||||||
TRACE("(%p)->(%s %p)\n", This, debugstr_w(url), vbCancel);
|
TRACE("(%p)->(%s %p)\n", This, debugstr_w(url), vbCancel);
|
||||||
|
|
||||||
if(This->window && This->window->base.outer_window && (doc_obj = This->window->base.outer_window->doc_obj)
|
if(This->window && This->window->base.outer_window && (browser = This->window->base.outer_window->browser)
|
||||||
&& doc_obj->doc_object_service) {
|
&& browser->doc->doc_object_service) {
|
||||||
if(This->window->base.outer_window != doc_obj->basedoc.window) {
|
if(is_main_content_window(This->window->base.outer_window)) {
|
||||||
hres = IHTMLWindow2_get_name(&This->window->base.IHTMLWindow2_iface, &frame_name);
|
hres = IHTMLWindow2_get_name(&This->window->base.IHTMLWindow2_iface, &frame_name);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
hres = IDocObjectService_FireBeforeNavigate2(doc_obj->doc_object_service, NULL, url, 0x40,
|
hres = IDocObjectService_FireBeforeNavigate2(browser->doc->doc_object_service, NULL, url, 0x40,
|
||||||
frame_name, NULL, 0, NULL, TRUE, &cancel);
|
frame_name, NULL, 0, NULL, TRUE, &cancel);
|
||||||
SysFreeString(frame_name);
|
SysFreeString(frame_name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue