mshtml: Access document object via browser object in IOmHistory::get_length.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-03-14 14:12:55 +01:00 committed by Alexandre Julliard
parent d95da5f249
commit d8cff0dc6f
1 changed files with 7 additions and 7 deletions

View File

@ -666,16 +666,16 @@ 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);
GeckoBrowser *browser = NULL;
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);
}
if(This->window && This->window->base.outer_window)
browser = This->window->base.outer_window->browser;
*p = browser->doc->travel_log
? ITravelLog_CountEntries(browser->doc->travel_log, browser->doc->browser_service)
: 0;
return S_OK;
}