mshtml: Moved TASK_PARSECOMPLETE to nsIMutationObserver::EndLoad.

This commit is contained in:
Jacek Caban 2009-08-11 19:14:17 +02:00 committed by Alexandre Julliard
parent 862bd3c61e
commit dbe0de7337
3 changed files with 16 additions and 30 deletions

View File

@ -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,

View File

@ -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;
}

View File

@ -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;