Commit 8507db18 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Avoid asynchronous parse_complete call.

parent d607976a
......@@ -312,10 +312,8 @@ static void call_explorer_69(HTMLDocumentObj *doc)
FIXME("handle result\n");
}
static void parse_complete_proc(task_t *task)
static void parse_complete(HTMLDocumentObj *doc)
{
HTMLDocumentObj *doc = ((docobj_task_t*)task)->doc;
TRACE("(%p)\n", doc);
if(doc->usermode == EDITMODE)
......@@ -328,35 +326,24 @@ static void parse_complete_proc(task_t *task)
call_explorer_69(doc);
/* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
set_ready_state(doc->basedoc.window, READYSTATE_INTERACTIVE);
}
static void handle_end_load(HTMLDocumentNode *This)
{
docobj_task_t *task;
TRACE("\n");
if(!This->basedoc.doc_obj)
return;
if(This != This->basedoc.doc_obj->basedoc.doc_node) {
set_ready_state(This->basedoc.window, READYSTATE_INTERACTIVE);
return;
if(This == This->basedoc.doc_obj->basedoc.doc_node) {
/*
* This should be done in the worker thread that parses HTML,
* but we don't have such thread (Gecko parses HTML for us).
*/
parse_complete(This->basedoc.doc_obj);
}
task = heap_alloc(sizeof(docobj_task_t));
if(!task)
return;
task->doc = This->basedoc.doc_obj;
/*
* 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->header, &parse_complete_proc, This->basedoc.doc_obj->basedoc.task_magic);
set_ready_state(This->basedoc.window, READYSTATE_INTERACTIVE);
}
static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface)
......
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