Commit dbe0de73 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Moved TASK_PARSECOMPLETE to nsIMutationObserver::EndLoad.

parent 862bd3c6
......@@ -461,6 +461,22 @@ static void NSAPI nsDocumentObserver_BeginLoad(nsIDocumentObserver *iface, nsIDo
static void NSAPI nsDocumentObserver_EndLoad(nsIDocumentObserver *iface, nsIDocument *aDocument)
{
NSContainer *This = NSDOCOBS_THIS(iface);
task_t *task;
TRACE("\n");
task = heap_alloc(sizeof(task_t));
task->doc = This->doc;
task->task_id = TASK_PARSECOMPLETE;
task->next = NULL;
/*
* This should be done in the worker thread that parses HTML,
* but we don't have such thread (Gecko parses HTML for us).
*/
push_task(task);
}
static void NSAPI nsDocumentObserver_ContentStatesChanged(nsIDocumentObserver *iface, nsIDocument *aDocument,
......
......@@ -978,23 +978,6 @@ static HRESULT nsChannelBSC_stop_binding(BSCallback *bsc, HRESULT result)
}
}
if(FAILED(result))
return S_OK;
if(This->bsc.doc && This->bsc.doc->bscallback == This && !This->bsc.doc->nscontainer) {
task_t *task = heap_alloc(sizeof(task_t));
task->doc = This->bsc.doc;
task->task_id = TASK_PARSECOMPLETE;
task->next = NULL;
/*
* This should be done in the worker thread that parses HTML,
* but we don't have such thread.
*/
push_task(task);
}
return S_OK;
}
......
......@@ -131,7 +131,6 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
{
NSContainer *This = NSEVENTLIST_THIS(iface)->This;
nsIDOMHTMLElement *nsbody = NULL;
task_t *task;
TRACE("(%p)\n", This);
......@@ -149,18 +148,6 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
if(This->doc->usermode == EDITMODE)
handle_edit_load(This->doc);
task = heap_alloc(sizeof(task_t));
task->doc = This->doc;
task->task_id = TASK_PARSECOMPLETE;
task->next = NULL;
/*
* This should be done in the worker thread that parses HTML,
* but we don't have such thread (Gecko parses HTML for us).
*/
push_task(task);
if(!This->doc->nsdoc) {
ERR("NULL nsdoc\n");
return NS_ERROR_FAILURE;
......
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