mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
shdocvw: Separate document state from control state.
This commit is contained in:
parent
fab9304721
commit
4ecf80fd0b
@ -159,16 +159,23 @@ static void advise_prop_notif(DocHost *This, BOOL set)
|
||||
This->is_prop_notif = set;
|
||||
}
|
||||
|
||||
void set_doc_state(DocHost *This, READYSTATE doc_state)
|
||||
{
|
||||
This->doc_state = doc_state;
|
||||
if(doc_state > This->ready_state)
|
||||
This->ready_state = doc_state;
|
||||
}
|
||||
|
||||
static void update_ready_state(DocHost *This, READYSTATE ready_state)
|
||||
{
|
||||
if(ready_state > READYSTATE_LOADING && This->ready_state <= READYSTATE_LOADING) {
|
||||
if(ready_state > READYSTATE_LOADING && This->doc_state <= READYSTATE_LOADING)
|
||||
notif_complete(This, DISPID_NAVIGATECOMPLETE2);
|
||||
This->ready_state = ready_state;
|
||||
}
|
||||
|
||||
if(ready_state == READYSTATE_COMPLETE && This->ready_state < READYSTATE_COMPLETE) {
|
||||
This->ready_state = READYSTATE_COMPLETE;
|
||||
if(ready_state == READYSTATE_COMPLETE && This->doc_state < READYSTATE_COMPLETE) {
|
||||
set_doc_state(This, READYSTATE_COMPLETE);
|
||||
notif_complete(This, DISPID_DOCUMENTCOMPLETE);
|
||||
}else {
|
||||
set_doc_state(This, ready_state);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ static HRESULT navigate_bsc(DocHost *This, BindStatusCallback *bsc, IMoniker *mo
|
||||
VARIANT_BOOL cancel = VARIANT_FALSE;
|
||||
HRESULT hres;
|
||||
|
||||
This->ready_state = READYSTATE_LOADING;
|
||||
set_doc_state(This, READYSTATE_LOADING);
|
||||
|
||||
on_before_navigate2(This, bsc->url, bsc->post_data, bsc->post_data_len, bsc->headers, &cancel);
|
||||
if(cancel) {
|
||||
|
@ -104,6 +104,7 @@ struct DocHost {
|
||||
VARIANT_BOOL busy;
|
||||
|
||||
READYSTATE ready_state;
|
||||
READYSTATE doc_state;
|
||||
DWORD prop_notif_cookie;
|
||||
BOOL is_prop_notif;
|
||||
|
||||
@ -223,6 +224,7 @@ HRESULT dochost_object_available(DocHost*,IUnknown*);
|
||||
void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*);
|
||||
HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*);
|
||||
HRESULT go_home(DocHost*);
|
||||
void set_doc_state(DocHost*,READYSTATE);
|
||||
|
||||
#define WM_DOCHOSTTASK (WM_USER+0x300)
|
||||
void push_dochost_task(DocHost*,task_header_t*,task_proc_t,BOOL);
|
||||
|
Loading…
Reference in New Issue
Block a user