mshtml: Moved script mode out of get_script_host to allow exec_script calls in Gecko script mode.
This commit is contained in:
parent
402c875699
commit
ddf46bbe9f
|
@ -795,11 +795,6 @@ static ScriptHost *get_script_host(HTMLWindow *window, const GUID *guid)
|
||||||
{
|
{
|
||||||
ScriptHost *iter;
|
ScriptHost *iter;
|
||||||
|
|
||||||
if(IsEqualGUID(&CLSID_JScript, guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) {
|
|
||||||
TRACE("Ignoring JScript\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY(iter, &window->script_hosts, ScriptHost, entry) {
|
LIST_FOR_EACH_ENTRY(iter, &window->script_hosts, ScriptHost, entry) {
|
||||||
if(IsEqualGUID(guid, &iter->guid))
|
if(IsEqualGUID(guid, &iter->guid))
|
||||||
return iter;
|
return iter;
|
||||||
|
@ -818,6 +813,11 @@ void doc_insert_script(HTMLWindow *window, nsIDOMHTMLScriptElement *nsscript)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(IsEqualGUID(&CLSID_JScript, &guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) {
|
||||||
|
TRACE("Ignoring JScript\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
script_host = get_script_host(window, &guid);
|
script_host = get_script_host(window, &guid);
|
||||||
if(!script_host)
|
if(!script_host)
|
||||||
return;
|
return;
|
||||||
|
@ -859,6 +859,11 @@ IDispatch *script_parse_event(HTMLWindow *window, LPCWSTR text)
|
||||||
ptr = text;
|
ptr = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(IsEqualGUID(&CLSID_JScript, &guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) {
|
||||||
|
TRACE("Ignoring JScript\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
script_host = get_script_host(window, &guid);
|
script_host = get_script_host(window, &guid);
|
||||||
if(!script_host || !script_host->parse_proc)
|
if(!script_host || !script_host->parse_proc)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue