Commit 4ecf80fd authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Separate document state from control state.

parent fab93047
...@@ -159,16 +159,23 @@ static void advise_prop_notif(DocHost *This, BOOL set) ...@@ -159,16 +159,23 @@ static void advise_prop_notif(DocHost *This, BOOL set)
This->is_prop_notif = 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) 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); notif_complete(This, DISPID_NAVIGATECOMPLETE2);
This->ready_state = ready_state;
}
if(ready_state == READYSTATE_COMPLETE && This->ready_state < READYSTATE_COMPLETE) { if(ready_state == READYSTATE_COMPLETE && This->doc_state < READYSTATE_COMPLETE) {
This->ready_state = READYSTATE_COMPLETE; set_doc_state(This, READYSTATE_COMPLETE);
notif_complete(This, DISPID_DOCUMENTCOMPLETE); 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 ...@@ -549,7 +549,7 @@ static HRESULT navigate_bsc(DocHost *This, BindStatusCallback *bsc, IMoniker *mo
VARIANT_BOOL cancel = VARIANT_FALSE; VARIANT_BOOL cancel = VARIANT_FALSE;
HRESULT hres; 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); on_before_navigate2(This, bsc->url, bsc->post_data, bsc->post_data_len, bsc->headers, &cancel);
if(cancel) { if(cancel) {
......
...@@ -104,6 +104,7 @@ struct DocHost { ...@@ -104,6 +104,7 @@ struct DocHost {
VARIANT_BOOL busy; VARIANT_BOOL busy;
READYSTATE ready_state; READYSTATE ready_state;
READYSTATE doc_state;
DWORD prop_notif_cookie; DWORD prop_notif_cookie;
BOOL is_prop_notif; BOOL is_prop_notif;
...@@ -223,6 +224,7 @@ HRESULT dochost_object_available(DocHost*,IUnknown*); ...@@ -223,6 +224,7 @@ HRESULT dochost_object_available(DocHost*,IUnknown*);
void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*); void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*);
HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*); HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*);
HRESULT go_home(DocHost*); HRESULT go_home(DocHost*);
void set_doc_state(DocHost*,READYSTATE);
#define WM_DOCHOSTTASK (WM_USER+0x300) #define WM_DOCHOSTTASK (WM_USER+0x300)
void push_dochost_task(DocHost*,task_header_t*,task_proc_t,BOOL); void push_dochost_task(DocHost*,task_header_t*,task_proc_t,BOOL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment