diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 6060a8dca94..f161de4eef2 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -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, diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index eee0b34f417..fb743f49add 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -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; } diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index 1933c5788cd..0ba11d2c361 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -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;