mshtml: Move readystate to HTMLDocumentObj.

This commit is contained in:
Jacek Caban 2009-09-16 22:12:41 +02:00 committed by Alexandre Julliard
parent 56b69dff4a
commit 05d199474b
6 changed files with 11 additions and 11 deletions

View File

@ -150,7 +150,7 @@ static DWORD query_ns_edit_status(HTMLDocument *This, const char *nscmd)
nsICommandParams *nsparam;
PRBool b = FALSE;
if(This->doc_obj->usermode != EDITMODE || This->readystate < READYSTATE_INTERACTIVE)
if(This->doc_obj->usermode != EDITMODE || This->doc_obj->readystate < READYSTATE_INTERACTIVE)
return OLECMDF_SUPPORTED;
if(This->doc_obj->nscontainer && nscmd) {
@ -185,7 +185,7 @@ static DWORD query_align_status(HTMLDocument *This, const char *align_str)
nsICommandParams *nsparam;
char *align = NULL;
if(This->doc_obj->usermode != EDITMODE || This->readystate < READYSTATE_INTERACTIVE)
if(This->doc_obj->usermode != EDITMODE || This->doc_obj->readystate < READYSTATE_INTERACTIVE)
return OLECMDF_SUPPORTED;
if(This->doc_obj->nscontainer) {
@ -715,7 +715,7 @@ static HRESULT query_justify(HTMLDocument *This, OLECMD *cmd)
case IDM_JUSTIFYLEFT:
TRACE("(%p) IDM_JUSTIFYLEFT\n", This);
/* FIXME: We should set OLECMDF_LATCHED only if it's set explicitly. */
if(This->doc_obj->usermode != EDITMODE || This->readystate < READYSTATE_INTERACTIVE)
if(This->doc_obj->usermode != EDITMODE || This->doc_obj->readystate < READYSTATE_INTERACTIVE)
cmd->cmdf = OLECMDF_SUPPORTED;
else
cmd->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;

View File

@ -454,7 +454,7 @@ static HRESULT WINAPI HTMLDocument_get_readyState(IHTMLDocument2 *iface, BSTR *p
if(!p)
return E_POINTER;
*p = SysAllocString(readystate_str[This->readystate]);
*p = SysAllocString(readystate_str[This->doc_obj->readystate]);
return S_OK;
}
@ -1512,7 +1512,7 @@ static HRESULT WINAPI DocDispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMemb
return E_INVALIDARG;
V_VT(pVarResult) = VT_I4;
V_I4(pVarResult) = This->readystate;
V_I4(pVarResult) = This->doc_obj->readystate;
return S_OK;
}
@ -1737,7 +1737,6 @@ static void init_doc(HTMLDocument *doc, const htmldoc_vtbl_t *vtbl)
doc->lpHTMLDocument2Vtbl = &HTMLDocumentVtbl;
doc->lpIDispatchExVtbl = &DocDispatchExVtbl;
doc->lpSupportErrorInfoVtbl = &SupportErrorInfoVtbl;
doc->readystate = READYSTATE_UNINITIALIZED;
HTMLDocument_HTMLDocument3_Init(doc);
HTMLDocument_HTMLDocument5_Init(doc);
@ -1941,6 +1940,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
doc->nscontainer = NSContainer_Create(doc, NULL);
list_init(&doc->bindings);
doc->usermode = UNKNOWN_USERMODE;
doc->readystate = READYSTATE_UNINITIALIZED;
if(doc->nscontainer) {
nsresult nsres;

View File

@ -284,7 +284,6 @@ struct HTMLDocument {
HTMLWindow *window;
nsIDOMHTMLDocument *nsdoc;
READYSTATE readystate;
LPWSTR mime;
DWORD update;
@ -350,6 +349,7 @@ struct HTMLDocumentObj {
BOOL focus;
USERMODE usermode;
READYSTATE readystate;
/* FIXME: probably should be in document node object */
nsChannelBSC *bscallback;

View File

@ -555,7 +555,7 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if(This->doc_obj->frame)
IOleInPlaceFrame_SetStatusText(This->doc_obj->frame, NULL);
This->readystate = READYSTATE_UNINITIALIZED;
This->doc_obj->readystate = READYSTATE_UNINITIALIZED;
if(This->doc_obj->client) {
IOleCommandTarget *cmdtrg;

View File

@ -113,7 +113,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
}
}
This->readystate = READYSTATE_LOADING;
This->doc_obj->readystate = READYSTATE_LOADING;
call_property_onchanged(&This->cp_propnotif, DISPID_READYSTATE);
update_doc(This, UPDATE_TITLE);

View File

@ -263,7 +263,7 @@ static void set_parsecomplete(HTMLDocument *doc)
/* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
doc->readystate = READYSTATE_INTERACTIVE;
doc->doc_obj->readystate = READYSTATE_INTERACTIVE;
call_property_onchanged(&doc->cp_propnotif, DISPID_READYSTATE);
if(doc->doc_obj->client)
@ -289,7 +289,7 @@ static void set_parsecomplete(HTMLDocument *doc)
IOleCommandTarget_Release(olecmd);
}
doc->readystate = READYSTATE_COMPLETE;
doc->doc_obj->readystate = READYSTATE_COMPLETE;
call_property_onchanged(&doc->cp_propnotif, DISPID_READYSTATE);
if(doc->doc_obj->frame) {