mshtml: Moved TASK_PARSECOMPLETE to nsIMutationObserver::EndLoad.
This commit is contained in:
parent
862bd3c61e
commit
dbe0de7337
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue