mshtml: Use IUri in use_gecko_script.
This commit is contained in:
parent
d7f7f33e7d
commit
1190c8cbd6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue