mshtml: Pass document as HTMLDocumentObj to update_doc.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-11-22 16:15:48 +01:00 committed by Alexandre Julliard
parent 4a13190da4
commit 3dd152dc59
6 changed files with 33 additions and 33 deletions

View File

@ -517,7 +517,7 @@ static HRESULT exec_delete(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VA
if(This->doc_obj->nscontainer)
do_ns_editor_command(This->doc_obj->nscontainer, NSCMD_DELETECHARFORWARD);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -526,7 +526,7 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
TRACE("(%p)->(%p %p)\n", This, in, out);
if(!This->doc_obj->nscontainer) {
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return E_FAIL;
}
@ -544,7 +544,7 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
set_ns_fontname(This, stra);
heap_free(stra);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
}
if(out) {
@ -598,7 +598,7 @@ static HRESULT exec_forecolor(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
FIXME("unsupported forecolor %s\n", debugstr_variant(in));
}
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
}
if(out) {
@ -637,7 +637,7 @@ static HRESULT exec_fontsize(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
FIXME("unsupported fontsize %s\n", debugstr_variant(in));
}
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
}
return S_OK;
@ -660,7 +660,7 @@ static HRESULT exec_bold(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARI
if(This->doc_obj->nscontainer)
do_ns_command(This, NSCMD_BOLD, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -674,7 +674,7 @@ static HRESULT exec_italic(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VA
if(This->doc_obj->nscontainer)
do_ns_command(This, NSCMD_ITALIC, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -713,7 +713,7 @@ static HRESULT exec_justifycenter(HTMLDocument *This, DWORD cmdexecopt, VARIANT
FIXME("unsupported args\n");
set_ns_align(This, NSALIGN_CENTER);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -725,7 +725,7 @@ static HRESULT exec_justifyleft(HTMLDocument *This, DWORD cmdexecopt, VARIANT *i
FIXME("unsupported args\n");
set_ns_align(This, NSALIGN_LEFT);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -737,7 +737,7 @@ static HRESULT exec_justifyright(HTMLDocument *This, DWORD cmdexecopt, VARIANT *
FIXME("unsupported args\n");
set_ns_align(This, NSALIGN_RIGHT);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -749,7 +749,7 @@ static HRESULT exec_underline(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
FIXME("unsupported args\n");
do_ns_command(This, NSCMD_UNDERLINE, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -761,7 +761,7 @@ static HRESULT exec_horizontalline(HTMLDocument *This, DWORD cmdexecopt, VARIANT
FIXME("unsupported args\n");
do_ns_command(This, NSCMD_INSERTHR, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -773,7 +773,7 @@ static HRESULT exec_orderlist(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
FIXME("unsupported args\n");
do_ns_command(This, NSCMD_OL, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -785,7 +785,7 @@ static HRESULT exec_unorderlist(HTMLDocument *This, DWORD cmdexecopt, VARIANT *i
FIXME("unsupported args\n");
do_ns_command(This, NSCMD_UL, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -797,7 +797,7 @@ static HRESULT exec_indent(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VA
FIXME("unsupported args\n");
do_ns_command(This, NSCMD_INDENT, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -809,7 +809,7 @@ static HRESULT exec_outdent(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, V
FIXME("unsupported args\n");
do_ns_command(This, NSCMD_OUTDENT, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}
@ -824,7 +824,7 @@ static HRESULT exec_composesettings(HTMLDocument *This, DWORD cmdexecopt, VARIAN
TRACE("(%p)->(%x %s)\n", This, cmdexecopt, debugstr_w(V_BSTR(in)));
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
ptr = V_BSTR(in);
if(*ptr == '1')
@ -886,7 +886,7 @@ static HRESULT exec_composesettings(HTMLDocument *This, DWORD cmdexecopt, VARIAN
HRESULT editor_exec_copy(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
{
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
if(!This->doc_obj->nscontainer)
return E_FAIL;
@ -897,7 +897,7 @@ HRESULT editor_exec_copy(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARI
HRESULT editor_exec_cut(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
{
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
if(!This->doc_obj->nscontainer)
return E_FAIL;
@ -908,7 +908,7 @@ HRESULT editor_exec_cut(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIA
HRESULT editor_exec_paste(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
{
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
if(!This->doc_obj->nscontainer)
return E_FAIL;
@ -1218,7 +1218,7 @@ const cmdtable_t editmode_cmds[] = {
void init_editor(HTMLDocument *This)
{
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
set_ns_fontname(This, "Times New Roman");
}
@ -1287,7 +1287,7 @@ HRESULT setup_edit_mode(HTMLDocumentObj *doc)
debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS));
}
update_doc(&doc->basedoc, UPDATE_UI);
update_doc(doc, UPDATE_UI);
if(doc->basedoc.window->mon) {
/* FIXME: We should find nicer way to do this */

View File

@ -1099,7 +1099,7 @@ void do_ns_command(HTMLDocument*,const char*,nsICommandParams*) DECLSPEC_HIDDEN;
#define UPDATE_UI 0x0001
#define UPDATE_TITLE 0x0002
void update_doc(HTMLDocument*,DWORD) DECLSPEC_HIDDEN;
void update_doc(HTMLDocumentObj*,DWORD) DECLSPEC_HIDDEN;
void update_title(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void set_document_navigation(HTMLDocumentObj*,BOOL) DECLSPEC_HIDDEN;

View File

@ -181,7 +181,7 @@ static nsresult NSAPI handle_keypress(nsIDOMEventListener *iface,
TRACE("(%p)->(%p)\n", doc, event);
update_doc(&doc_obj->basedoc, UPDATE_UI);
update_doc(doc_obj, UPDATE_UI);
if(doc_obj->usermode == EDITMODE)
handle_edit_event(&doc_obj->basedoc, event);

View File

@ -396,7 +396,7 @@ static HRESULT exec_select_all(HTMLDocument *This, DWORD nCmdexecopt, VARIANT *i
if(This->doc_obj->nscontainer)
do_ns_command(This, NSCMD_SELECTALL, NULL);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
return S_OK;
}

View File

@ -320,9 +320,9 @@ void prepare_for_binding(HTMLDocument *This, IMoniker *mon, DWORD flags)
}
if(This->window->mon) {
update_doc(This, UPDATE_TITLE|UPDATE_UI);
update_doc(This->doc_obj, UPDATE_TITLE|UPDATE_UI);
}else {
update_doc(This, UPDATE_TITLE);
update_doc(This->doc_obj, UPDATE_TITLE);
set_current_mon(This->window, mon, flags);
}

View File

@ -77,12 +77,12 @@ static void activate_gecko(NSContainer *This)
nsIBaseWindow_SetEnabled(This->window, TRUE);
}
void update_doc(HTMLDocument *This, DWORD flags)
void update_doc(HTMLDocumentObj *This, DWORD flags)
{
if(!This->doc_obj->update && This->doc_obj->hwnd)
SetTimer(This->doc_obj->hwnd, TIMER_ID, 100, NULL);
if(!This->update && This->hwnd)
SetTimer(This->hwnd, TIMER_ID, 100, NULL);
This->doc_obj->update |= flags;
This->update |= flags;
}
void update_title(HTMLDocumentObj *This)
@ -551,7 +551,7 @@ static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
if(FAILED(hres))
return hres;
}
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
ShowWindow(This->doc_obj->hwnd, SW_SHOW);
}else {
ShowWindow(This->doc_obj->hwnd, SW_HIDE);
@ -624,7 +624,7 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
nsIWebBrowserFocus_Activate(This->doc_obj->nscontainer->focus);
notif_focus(This->doc_obj);
update_doc(This, UPDATE_UI);
update_doc(This->doc_obj, UPDATE_UI);
hres = IOleInPlaceSite_OnUIActivate(This->doc_obj->ipsite);
if(SUCCEEDED(hres)) {