mshtml: Start binding asynchronously.
This commit is contained in:
parent
48b445b80d
commit
124cb44903
|
@ -386,9 +386,12 @@ typedef struct task_t {
|
|||
enum {
|
||||
TASK_SETDOWNLOADSTATE,
|
||||
TASK_PARSECOMPLETE,
|
||||
TASK_SETPROGRESS
|
||||
TASK_SETPROGRESS,
|
||||
TASK_START_BINDING
|
||||
} task_id;
|
||||
|
||||
BSCallback *bscallback;
|
||||
|
||||
struct task_t *next;
|
||||
} task_t;
|
||||
|
||||
|
|
|
@ -605,6 +605,7 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
|
|||
PRBool is_doc_uri;
|
||||
LPCWSTR wine_url;
|
||||
nsresult nsres;
|
||||
task_t *task;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p %p)\n", This, aListener, aContext);
|
||||
|
@ -718,8 +719,14 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
|
|||
bscallback->nscontext = aContext;
|
||||
}
|
||||
|
||||
start_binding(bscallback);
|
||||
IBindStatusCallback_Release(STATUSCLB(bscallback));
|
||||
task = mshtml_alloc(sizeof(task_t));
|
||||
|
||||
task->doc = bscallback->doc;
|
||||
task->task_id = TASK_START_BINDING;
|
||||
task->next = NULL;
|
||||
task->bscallback = bscallback;
|
||||
|
||||
push_task(task);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -217,6 +217,12 @@ static void set_progress(HTMLDocument *doc)
|
|||
}
|
||||
}
|
||||
|
||||
static void task_start_binding(BSCallback *bscallback)
|
||||
{
|
||||
start_binding(bscallback);
|
||||
IBindStatusCallback_Release(STATUSCLB(bscallback));
|
||||
}
|
||||
|
||||
static void process_task(task_t *task)
|
||||
{
|
||||
switch(task->task_id) {
|
||||
|
@ -226,6 +232,8 @@ static void process_task(task_t *task)
|
|||
return set_parsecomplete(task->doc);
|
||||
case TASK_SETPROGRESS:
|
||||
return set_progress(task->doc);
|
||||
case TASK_START_BINDING:
|
||||
return task_start_binding(task->bscallback);
|
||||
default:
|
||||
ERR("Wrong task_id %d\n", task->task_id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue