Commit 1190c8cb authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use IUri in use_gecko_script.

parent d7f7f33e
......@@ -32,6 +32,9 @@
#include "shlguid.h"
#include "idispids.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
#include "wine/debug.h"
#include "mshtml_private.h"
......@@ -50,11 +53,9 @@ typedef struct {
static BOOL use_gecko_script(HTMLWindow *window)
{
DWORD zone;
DWORD zone, scheme;
HRESULT hres;
static const WCHAR aboutW[] = {'a','b','o','u','t',':'};
hres = IInternetSecurityManager_MapUrlToZone(window->secmgr, window->url, &zone, 0);
if(FAILED(hres)) {
WARN("Could not map %s to zone: %08x\n", debugstr_w(window->url), hres);
......@@ -62,8 +63,11 @@ static BOOL use_gecko_script(HTMLWindow *window)
}
TRACE("zone %d\n", zone);
return zone != URLZONE_LOCAL_MACHINE && zone != URLZONE_TRUSTED
&& strncmpiW(aboutW, window->url, sizeof(aboutW)/sizeof(WCHAR));
if(zone == URLZONE_LOCAL_MACHINE || zone == URLZONE_TRUSTED || !window->uri)
return FALSE;
hres = IUri_GetScheme(window->uri, &scheme);
return FAILED(hres) || scheme != URL_SCHEME_ABOUT;
}
void set_current_mon(HTMLWindow *This, IMoniker *mon)
......
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