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