Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e5214b24
Commit
e5214b24
authored
Jan 03, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use ifaces instead of vtbl pointers in HTMLDocumentNode.
parent
6b793e94
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
49 deletions
+49
-49
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-9
mutation.c
dlls/mshtml/mutation.c
+28
-24
npplugin.c
dlls/mshtml/npplugin.c
+2
-2
pluginhost.c
dlls/mshtml/pluginhost.c
+2
-2
script.c
dlls/mshtml/script.c
+2
-1
secmgr.c
dlls/mshtml/secmgr.c
+11
-10
No files found.
dlls/mshtml/htmldoc.c
View file @
e5214b24
...
@@ -1886,7 +1886,7 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
...
@@ -1886,7 +1886,7 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
if
(
IsEqualGUID
(
&
IID_IInternetHostSecurityManager
,
riid
))
{
if
(
IsEqualGUID
(
&
IID_IInternetHostSecurityManager
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetHostSecurityManager %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IInternetHostSecurityManager %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HOSTSECMGR
(
This
)
;
*
ppv
=
&
This
->
IInternetHostSecurityManager_iface
;
}
else
{
}
else
{
return
HTMLDOMNode_QI
(
&
This
->
node
,
riid
,
ppv
);
return
HTMLDOMNode_QI
(
&
This
->
node
,
riid
,
ppv
);
}
}
...
...
dlls/mshtml/mshtml_private.h
View file @
e5214b24
...
@@ -597,10 +597,10 @@ struct HTMLDocumentNode {
...
@@ -597,10 +597,10 @@ struct HTMLDocumentNode {
HTMLDOMNode
node
;
HTMLDOMNode
node
;
HTMLDocument
basedoc
;
HTMLDocument
basedoc
;
const
IInternetHostSecurityManagerVtbl
*
lpIInternetHostSecurityManagerVtbl
;
IInternetHostSecurityManager
IInternetHostSecurityManager_iface
;
const
nsIDocumentObserverVtbl
*
lpIDocumentObserverVtbl
;
nsIDocumentObserver
nsIDocumentObserver_iface
;
const
nsIRunnableVtbl
*
lpIRunnableVtbl
;
nsIRunnable
nsIRunnable_iface
;
LONG
ref
;
LONG
ref
;
...
@@ -629,10 +629,6 @@ struct HTMLDocumentNode {
...
@@ -629,10 +629,6 @@ struct HTMLDocumentNode {
#define NSEVENTLIST(x) ((nsIDOMEventListener*) &(x)->lpDOMEventListenerVtbl)
#define NSEVENTLIST(x) ((nsIDOMEventListener*) &(x)->lpDOMEventListenerVtbl)
#define NSDOCOBS(x) ((nsIDocumentObserver*) &(x)->lpIDocumentObserverVtbl)
#define NSRUNNABLE(x) ((nsIRunnable*) &(x)->lpIRunnableVtbl)
#define HTTPNEG(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl)
#define HTTPNEG(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl)
#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl)
#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl)
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl);
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl);
...
@@ -643,8 +639,6 @@ struct HTMLDocumentNode {
...
@@ -643,8 +639,6 @@ struct HTMLDocumentNode {
#define HTMLIMGFACTORY(x) ((IHTMLImageElementFactory*) &(x)->lpHTMLImageElementFactoryVtbl)
#define HTMLIMGFACTORY(x) ((IHTMLImageElementFactory*) &(x)->lpHTMLImageElementFactoryVtbl)
#define HTMLLOCATION(x) ((IHTMLLocation*) &(x)->lpHTMLLocationVtbl)
#define HTMLLOCATION(x) ((IHTMLLocation*) &(x)->lpHTMLLocationVtbl)
#define HOSTSECMGR(x) ((IInternetHostSecurityManager*) &(x)->lpIInternetHostSecurityManagerVtbl)
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
HRESULT
HTMLDocument_Create
(
IUnknown
*
,
REFIID
,
void
**
);
HRESULT
HTMLDocument_Create
(
IUnknown
*
,
REFIID
,
void
**
);
...
...
dlls/mshtml/mutation.c
View file @
e5214b24
...
@@ -193,23 +193,26 @@ static void add_script_runner(HTMLDocumentNode *This)
...
@@ -193,23 +193,26 @@ static void add_script_runner(HTMLDocumentNode *This)
return
;
return
;
}
}
nsIDOMNSDocument_WineAddScriptRunner
(
nsdoc
,
NSRUNNABLE
(
This
)
);
nsIDOMNSDocument_WineAddScriptRunner
(
nsdoc
,
&
This
->
nsIRunnable_iface
);
nsIDOMNSDocument_Release
(
nsdoc
);
nsIDOMNSDocument_Release
(
nsdoc
);
}
}
#define NSRUNNABLE_THIS(iface) DEFINE_THIS(HTMLDocumentNode, IRunnable, iface)
static
inline
HTMLDocumentNode
*
impl_from_nsIRunnable
(
nsIRunnable
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLDocumentNode
,
nsIRunnable_iface
);
}
static
nsresult
NSAPI
nsRunnable_QueryInterface
(
nsIRunnable
*
iface
,
static
nsresult
NSAPI
nsRunnable_QueryInterface
(
nsIRunnable
*
iface
,
nsIIDRef
riid
,
void
**
result
)
nsIIDRef
riid
,
void
**
result
)
{
{
HTMLDocumentNode
*
This
=
NSRUNNABLE_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIRunnable
(
iface
);
if
(
IsEqualGUID
(
riid
,
&
IID_nsISupports
))
{
if
(
IsEqualGUID
(
riid
,
&
IID_nsISupports
))
{
TRACE
(
"(%p)->(IID_nsISupports %p)
\n
"
,
This
,
result
);
TRACE
(
"(%p)->(IID_nsISupports %p)
\n
"
,
This
,
result
);
*
result
=
NSRUNNABLE
(
This
)
;
*
result
=
&
This
->
nsIRunnable_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_nsIRunnable
))
{
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_nsIRunnable
))
{
TRACE
(
"(%p)->(IID_nsIRunnable %p)
\n
"
,
This
,
result
);
TRACE
(
"(%p)->(IID_nsIRunnable %p)
\n
"
,
This
,
result
);
*
result
=
NSRUNNABLE
(
This
)
;
*
result
=
&
This
->
nsIRunnable_iface
;
}
else
{
}
else
{
*
result
=
NULL
;
*
result
=
NULL
;
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
result
);
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
result
);
...
@@ -222,13 +225,13 @@ static nsresult NSAPI nsRunnable_QueryInterface(nsIRunnable *iface,
...
@@ -222,13 +225,13 @@ static nsresult NSAPI nsRunnable_QueryInterface(nsIRunnable *iface,
static
nsrefcnt
NSAPI
nsRunnable_AddRef
(
nsIRunnable
*
iface
)
static
nsrefcnt
NSAPI
nsRunnable_AddRef
(
nsIRunnable
*
iface
)
{
{
HTMLDocumentNode
*
This
=
NSRUNNABLE_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIRunnable
(
iface
);
return
htmldoc_addref
(
&
This
->
basedoc
);
return
htmldoc_addref
(
&
This
->
basedoc
);
}
}
static
nsrefcnt
NSAPI
nsRunnable_Release
(
nsIRunnable
*
iface
)
static
nsrefcnt
NSAPI
nsRunnable_Release
(
nsIRunnable
*
iface
)
{
{
HTMLDocumentNode
*
This
=
NSRUNNABLE_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIRunnable
(
iface
);
return
htmldoc_release
(
&
This
->
basedoc
);
return
htmldoc_release
(
&
This
->
basedoc
);
}
}
...
@@ -349,7 +352,7 @@ static void handle_end_load(HTMLDocumentNode *This)
...
@@ -349,7 +352,7 @@ static void handle_end_load(HTMLDocumentNode *This)
static
nsresult
NSAPI
nsRunnable_Run
(
nsIRunnable
*
iface
)
static
nsresult
NSAPI
nsRunnable_Run
(
nsIRunnable
*
iface
)
{
{
HTMLDocumentNode
*
This
=
NSRUNNABLE_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIRunnable
(
iface
);
nsresult
nsres
;
nsresult
nsres
;
TRACE
(
"(%p)
\n
"
,
This
);
TRACE
(
"(%p)
\n
"
,
This
);
...
@@ -436,8 +439,6 @@ static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface)
...
@@ -436,8 +439,6 @@ static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface)
return
S_OK
;
return
S_OK
;
}
}
#undef NSRUNNABLE_THIS
static
const
nsIRunnableVtbl
nsRunnableVtbl
=
{
static
const
nsIRunnableVtbl
nsRunnableVtbl
=
{
nsRunnable_QueryInterface
,
nsRunnable_QueryInterface
,
nsRunnable_AddRef
,
nsRunnable_AddRef
,
...
@@ -445,22 +446,25 @@ static const nsIRunnableVtbl nsRunnableVtbl = {
...
@@ -445,22 +446,25 @@ static const nsIRunnableVtbl nsRunnableVtbl = {
nsRunnable_Run
nsRunnable_Run
};
};
#define NSDOCOBS_THIS(iface) DEFINE_THIS(HTMLDocumentNode, IDocumentObserver, iface)
static
inline
HTMLDocumentNode
*
impl_from_nsIDocumentObserver
(
nsIDocumentObserver
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLDocumentNode
,
nsIDocumentObserver_iface
);
}
static
nsresult
NSAPI
nsDocumentObserver_QueryInterface
(
nsIDocumentObserver
*
iface
,
static
nsresult
NSAPI
nsDocumentObserver_QueryInterface
(
nsIDocumentObserver
*
iface
,
nsIIDRef
riid
,
void
**
result
)
nsIIDRef
riid
,
void
**
result
)
{
{
HTMLDocumentNode
*
This
=
NSDOCOBS_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIDocumentObserver
(
iface
);
if
(
IsEqualGUID
(
&
IID_nsISupports
,
riid
))
{
if
(
IsEqualGUID
(
&
IID_nsISupports
,
riid
))
{
TRACE
(
"(%p)->(IID_nsISupports, %p)
\n
"
,
This
,
result
);
TRACE
(
"(%p)->(IID_nsISupports, %p)
\n
"
,
This
,
result
);
*
result
=
NSDOCOBS
(
This
)
;
*
result
=
&
This
->
nsIDocumentObserver_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_nsIMutationObserver
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_nsIMutationObserver
,
riid
))
{
TRACE
(
"(%p)->(IID_nsIMutationObserver %p)
\n
"
,
This
,
result
);
TRACE
(
"(%p)->(IID_nsIMutationObserver %p)
\n
"
,
This
,
result
);
*
result
=
NSDOCOBS
(
This
)
;
*
result
=
&
This
->
nsIDocumentObserver_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_nsIDocumentObserver
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_nsIDocumentObserver
,
riid
))
{
TRACE
(
"(%p)->(IID_nsIDocumentObserver %p)
\n
"
,
This
,
result
);
TRACE
(
"(%p)->(IID_nsIDocumentObserver %p)
\n
"
,
This
,
result
);
*
result
=
NSDOCOBS
(
This
)
;
*
result
=
&
This
->
nsIDocumentObserver_iface
;
}
else
{
}
else
{
*
result
=
NULL
;
*
result
=
NULL
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
result
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
result
);
...
@@ -473,13 +477,13 @@ static nsresult NSAPI nsDocumentObserver_QueryInterface(nsIDocumentObserver *ifa
...
@@ -473,13 +477,13 @@ static nsresult NSAPI nsDocumentObserver_QueryInterface(nsIDocumentObserver *ifa
static
nsrefcnt
NSAPI
nsDocumentObserver_AddRef
(
nsIDocumentObserver
*
iface
)
static
nsrefcnt
NSAPI
nsDocumentObserver_AddRef
(
nsIDocumentObserver
*
iface
)
{
{
HTMLDocumentNode
*
This
=
NSDOCOBS_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIDocumentObserver
(
iface
);
return
htmldoc_addref
(
&
This
->
basedoc
);
return
htmldoc_addref
(
&
This
->
basedoc
);
}
}
static
nsrefcnt
NSAPI
nsDocumentObserver_Release
(
nsIDocumentObserver
*
iface
)
static
nsrefcnt
NSAPI
nsDocumentObserver_Release
(
nsIDocumentObserver
*
iface
)
{
{
HTMLDocumentNode
*
This
=
NSDOCOBS_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIDocumentObserver
(
iface
);
return
htmldoc_release
(
&
This
->
basedoc
);
return
htmldoc_release
(
&
This
->
basedoc
);
}
}
...
@@ -543,7 +547,7 @@ static void NSAPI nsDocumentObserver_BeginLoad(nsIDocumentObserver *iface, nsIDo
...
@@ -543,7 +547,7 @@ static void NSAPI nsDocumentObserver_BeginLoad(nsIDocumentObserver *iface, nsIDo
static
void
NSAPI
nsDocumentObserver_EndLoad
(
nsIDocumentObserver
*
iface
,
nsIDocument
*
aDocument
)
static
void
NSAPI
nsDocumentObserver_EndLoad
(
nsIDocumentObserver
*
iface
,
nsIDocument
*
aDocument
)
{
{
HTMLDocumentNode
*
This
=
NSDOCOBS_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIDocumentObserver
(
iface
);
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
...
@@ -597,7 +601,7 @@ static void NSAPI nsDocumentObserver_StyleRuleRemoved(nsIDocumentObserver *iface
...
@@ -597,7 +601,7 @@ static void NSAPI nsDocumentObserver_StyleRuleRemoved(nsIDocumentObserver *iface
static
void
NSAPI
nsDocumentObserver_BindToDocument
(
nsIDocumentObserver
*
iface
,
nsIDocument
*
aDocument
,
static
void
NSAPI
nsDocumentObserver_BindToDocument
(
nsIDocumentObserver
*
iface
,
nsIDocument
*
aDocument
,
nsIContent
*
aContent
)
nsIContent
*
aContent
)
{
{
HTMLDocumentNode
*
This
=
NSDOCOBS_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIDocumentObserver
(
iface
);
nsIDOMHTMLIFrameElement
*
nsiframe
;
nsIDOMHTMLIFrameElement
*
nsiframe
;
nsIDOMHTMLFrameElement
*
nsframe
;
nsIDOMHTMLFrameElement
*
nsframe
;
nsIDOMComment
*
nscomment
;
nsIDOMComment
*
nscomment
;
...
@@ -640,7 +644,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
...
@@ -640,7 +644,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
static
void
NSAPI
nsDocumentObserver_DoneAddingChildren
(
nsIDocumentObserver
*
iface
,
nsIContent
*
aContent
,
static
void
NSAPI
nsDocumentObserver_DoneAddingChildren
(
nsIDocumentObserver
*
iface
,
nsIContent
*
aContent
,
PRBool
aHaveNotified
)
PRBool
aHaveNotified
)
{
{
HTMLDocumentNode
*
This
=
NSDOCOBS_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_nsIDocumentObserver
(
iface
);
nsIDOMHTMLScriptElement
*
nsscript
;
nsIDOMHTMLScriptElement
*
nsscript
;
nsresult
nsres
;
nsresult
nsres
;
...
@@ -691,8 +695,8 @@ void init_mutation(HTMLDocumentNode *doc)
...
@@ -691,8 +695,8 @@ void init_mutation(HTMLDocumentNode *doc)
nsIDOMNSDocument
*
nsdoc
;
nsIDOMNSDocument
*
nsdoc
;
nsresult
nsres
;
nsresult
nsres
;
doc
->
lpIDocumentObserverVtbl
=
&
nsDocumentObserverVtbl
;
doc
->
nsIDocumentObserver_iface
.
lpVtbl
=
&
nsDocumentObserverVtbl
;
doc
->
lpIRunnableVtbl
=
&
nsRunnableVtbl
;
doc
->
nsIRunnable_iface
.
lpVtbl
=
&
nsRunnableVtbl
;
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
doc
->
nsdoc
,
&
IID_nsIDOMNSDocument
,
(
void
**
)
&
nsdoc
);
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
doc
->
nsdoc
,
&
IID_nsIDOMNSDocument
,
(
void
**
)
&
nsdoc
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
...
@@ -700,7 +704,7 @@ void init_mutation(HTMLDocumentNode *doc)
...
@@ -700,7 +704,7 @@ void init_mutation(HTMLDocumentNode *doc)
return
;
return
;
}
}
nsIDOMNSDocument_WineAddObserver
(
nsdoc
,
NSDOCOBS
(
doc
)
);
nsIDOMNSDocument_WineAddObserver
(
nsdoc
,
&
doc
->
nsIDocumentObserver_iface
);
nsIDOMNSDocument_Release
(
nsdoc
);
nsIDOMNSDocument_Release
(
nsdoc
);
}
}
...
@@ -715,6 +719,6 @@ void release_mutation(HTMLDocumentNode *doc)
...
@@ -715,6 +719,6 @@ void release_mutation(HTMLDocumentNode *doc)
return
;
return
;
}
}
nsIDOMNSDocument_WineRemoveObserver
(
nsdoc
,
NSDOCOBS
(
doc
)
);
nsIDOMNSDocument_WineRemoveObserver
(
nsdoc
,
&
doc
->
nsIDocumentObserver_iface
);
nsIDOMNSDocument_Release
(
nsdoc
);
nsIDOMNSDocument_Release
(
nsdoc
);
}
}
dlls/mshtml/npplugin.c
View file @
e5214b24
...
@@ -219,8 +219,8 @@ static IUnknown *create_activex_object(HTMLWindow *window, nsIDOMElement *nselem
...
@@ -219,8 +219,8 @@ static IUnknown *create_activex_object(HTMLWindow *window, nsIDOMElement *nselem
TRACE
(
"clsid %s
\n
"
,
debugstr_guid
(
clsid
));
TRACE
(
"clsid %s
\n
"
,
debugstr_guid
(
clsid
));
policy
=
0
;
policy
=
0
;
hres
=
IInternetHostSecurityManager_ProcessUrlAction
(
HOSTSECMGR
(
window
->
doc
),
URLACTION_ACTIVEX_RUN
,
hres
=
IInternetHostSecurityManager_ProcessUrlAction
(
&
window
->
doc
->
IInternetHostSecurityManager_iface
,
(
BYTE
*
)
&
policy
,
sizeof
(
policy
),
(
BYTE
*
)
clsid
,
sizeof
(
GUID
),
0
,
0
);
URLACTION_ACTIVEX_RUN
,
(
BYTE
*
)
&
policy
,
sizeof
(
policy
),
(
BYTE
*
)
clsid
,
sizeof
(
GUID
),
0
,
0
);
if
(
FAILED
(
hres
)
||
policy
!=
URLPOLICY_ALLOW
)
{
if
(
FAILED
(
hres
)
||
policy
!=
URLPOLICY_ALLOW
)
{
WARN
(
"ProcessUrlAction returned %08x %x
\n
"
,
hres
,
policy
);
WARN
(
"ProcessUrlAction returned %08x %x
\n
"
,
hres
,
policy
);
return
NULL
;
return
NULL
;
...
...
dlls/mshtml/pluginhost.c
View file @
e5214b24
...
@@ -51,7 +51,7 @@ static BOOL check_load_safety(PluginHost *host)
...
@@ -51,7 +51,7 @@ static BOOL check_load_safety(PluginHost *host)
cs
.
pUnk
=
host
->
plugin_unk
;
cs
.
pUnk
=
host
->
plugin_unk
;
cs
.
dwFlags
=
CONFIRMSAFETYACTION_LOADOBJECT
;
cs
.
dwFlags
=
CONFIRMSAFETYACTION_LOADOBJECT
;
hres
=
IInternetHostSecurityManager_QueryCustomPolicy
(
HOSTSECMGR
(
host
->
doc
)
,
hres
=
IInternetHostSecurityManager_QueryCustomPolicy
(
&
host
->
doc
->
IInternetHostSecurityManager_iface
,
&
GUID_CUSTOM_CONFIRMOBJECTSAFETY
,
&
ppolicy
,
&
policy_size
,
(
BYTE
*
)
&
cs
,
sizeof
(
cs
),
0
);
&
GUID_CUSTOM_CONFIRMOBJECTSAFETY
,
&
ppolicy
,
&
policy_size
,
(
BYTE
*
)
&
cs
,
sizeof
(
cs
),
0
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
FALSE
;
return
FALSE
;
...
@@ -75,7 +75,7 @@ static BOOL check_script_safety(PluginHost *host)
...
@@ -75,7 +75,7 @@ static BOOL check_script_safety(PluginHost *host)
cs
.
pUnk
=
host
->
plugin_unk
;
cs
.
pUnk
=
host
->
plugin_unk
;
cs
.
dwFlags
=
0
;
cs
.
dwFlags
=
0
;
hres
=
IInternetHostSecurityManager_QueryCustomPolicy
(
HOSTSECMGR
(
host
->
doc
)
,
hres
=
IInternetHostSecurityManager_QueryCustomPolicy
(
&
host
->
doc
->
IInternetHostSecurityManager_iface
,
&
GUID_CUSTOM_CONFIRMOBJECTSAFETY
,
&
ppolicy
,
&
policy_size
,
(
BYTE
*
)
&
cs
,
sizeof
(
cs
),
0
);
&
GUID_CUSTOM_CONFIRMOBJECTSAFETY
,
&
ppolicy
,
&
policy_size
,
(
BYTE
*
)
&
cs
,
sizeof
(
cs
),
0
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
FALSE
;
return
FALSE
;
...
...
dlls/mshtml/script.c
View file @
e5214b24
...
@@ -576,7 +576,8 @@ static HRESULT WINAPI ASServiceProvider_QueryService(IServiceProvider *iface, RE
...
@@ -576,7 +576,8 @@ static HRESULT WINAPI ASServiceProvider_QueryService(IServiceProvider *iface, RE
if
(
!
This
->
window
||
!
This
->
window
->
doc
)
if
(
!
This
->
window
||
!
This
->
window
->
doc
)
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
return
IInternetHostSecurityManager_QueryInterface
(
HOSTSECMGR
(
This
->
window
->
doc
),
riid
,
ppv
);
return
IInternetHostSecurityManager_QueryInterface
(
&
This
->
window
->
doc
->
IInternetHostSecurityManager_iface
,
riid
,
ppv
);
}
}
FIXME
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_guid
(
guidService
),
debugstr_guid
(
riid
),
ppv
);
FIXME
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_guid
(
guidService
),
debugstr_guid
(
riid
),
ppv
);
...
...
dlls/mshtml/secmgr.c
View file @
e5214b24
...
@@ -42,30 +42,33 @@ static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k'
...
@@ -42,30 +42,33 @@ static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k'
const
GUID
GUID_CUSTOM_CONFIRMOBJECTSAFETY
=
const
GUID
GUID_CUSTOM_CONFIRMOBJECTSAFETY
=
{
0x10200490
,
0xfa38
,
0x11d0
,{
0xac
,
0x0e
,
0x00
,
0xa0
,
0xc9
,
0xf
,
0xff
,
0xc0
}};
{
0x10200490
,
0xfa38
,
0x11d0
,{
0xac
,
0x0e
,
0x00
,
0xa0
,
0xc9
,
0xf
,
0xff
,
0xc0
}};
#define HOSTSECMGR_THIS(iface) DEFINE_THIS(HTMLDocumentNode, IInternetHostSecurityManager, iface)
static
inline
HTMLDocumentNode
*
impl_from_IInternetHostSecurityManager
(
IInternetHostSecurityManager
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLDocumentNode
,
IInternetHostSecurityManager_iface
);
}
static
HRESULT
WINAPI
InternetHostSecurityManager_QueryInterface
(
IInternetHostSecurityManager
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
InternetHostSecurityManager_QueryInterface
(
IInternetHostSecurityManager
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
{
HTMLDocumentNode
*
This
=
HOSTSECMGR_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_IInternetHostSecurityManager
(
iface
);
return
IHTMLDOMNode_QueryInterface
(
&
This
->
node
.
IHTMLDOMNode_iface
,
riid
,
ppv
);
return
IHTMLDOMNode_QueryInterface
(
&
This
->
node
.
IHTMLDOMNode_iface
,
riid
,
ppv
);
}
}
static
ULONG
WINAPI
InternetHostSecurityManager_AddRef
(
IInternetHostSecurityManager
*
iface
)
static
ULONG
WINAPI
InternetHostSecurityManager_AddRef
(
IInternetHostSecurityManager
*
iface
)
{
{
HTMLDocumentNode
*
This
=
HOSTSECMGR_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_IInternetHostSecurityManager
(
iface
);
return
IHTMLDOMNode_AddRef
(
&
This
->
node
.
IHTMLDOMNode_iface
);
return
IHTMLDOMNode_AddRef
(
&
This
->
node
.
IHTMLDOMNode_iface
);
}
}
static
ULONG
WINAPI
InternetHostSecurityManager_Release
(
IInternetHostSecurityManager
*
iface
)
static
ULONG
WINAPI
InternetHostSecurityManager_Release
(
IInternetHostSecurityManager
*
iface
)
{
{
HTMLDocumentNode
*
This
=
HOSTSECMGR_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_IInternetHostSecurityManager
(
iface
);
return
IHTMLDOMNode_Release
(
&
This
->
node
.
IHTMLDOMNode_iface
);
return
IHTMLDOMNode_Release
(
&
This
->
node
.
IHTMLDOMNode_iface
);
}
}
static
HRESULT
WINAPI
InternetHostSecurityManager_GetSecurityId
(
IInternetHostSecurityManager
*
iface
,
BYTE
*
pbSecurityId
,
static
HRESULT
WINAPI
InternetHostSecurityManager_GetSecurityId
(
IInternetHostSecurityManager
*
iface
,
BYTE
*
pbSecurityId
,
DWORD
*
pcbSecurityId
,
DWORD_PTR
dwReserved
)
DWORD
*
pcbSecurityId
,
DWORD_PTR
dwReserved
)
{
{
HTMLDocumentNode
*
This
=
HOSTSECMGR_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_IInternetHostSecurityManager
(
iface
);
FIXME
(
"(%p)->(%p %p %lx)
\n
"
,
This
,
pbSecurityId
,
pcbSecurityId
,
dwReserved
);
FIXME
(
"(%p)->(%p %p %lx)
\n
"
,
This
,
pbSecurityId
,
pcbSecurityId
,
dwReserved
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
...
@@ -73,7 +76,7 @@ static HRESULT WINAPI InternetHostSecurityManager_GetSecurityId(IInternetHostSec
...
@@ -73,7 +76,7 @@ static HRESULT WINAPI InternetHostSecurityManager_GetSecurityId(IInternetHostSec
static
HRESULT
WINAPI
InternetHostSecurityManager_ProcessUrlAction
(
IInternetHostSecurityManager
*
iface
,
DWORD
dwAction
,
static
HRESULT
WINAPI
InternetHostSecurityManager_ProcessUrlAction
(
IInternetHostSecurityManager
*
iface
,
DWORD
dwAction
,
BYTE
*
pPolicy
,
DWORD
cbPolicy
,
BYTE
*
pContext
,
DWORD
cbContext
,
DWORD
dwFlags
,
DWORD
dwReserved
)
BYTE
*
pPolicy
,
DWORD
cbPolicy
,
BYTE
*
pContext
,
DWORD
cbContext
,
DWORD
dwFlags
,
DWORD
dwReserved
)
{
{
HTMLDocumentNode
*
This
=
HOSTSECMGR_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_IInternetHostSecurityManager
(
iface
);
const
WCHAR
*
url
;
const
WCHAR
*
url
;
TRACE
(
"(%p)->(%d %p %d %p %d %x %x)
\n
"
,
This
,
dwAction
,
pPolicy
,
cbPolicy
,
pContext
,
cbContext
,
dwFlags
,
dwReserved
);
TRACE
(
"(%p)->(%d %p %d %p %d %x %x)
\n
"
,
This
,
dwAction
,
pPolicy
,
cbPolicy
,
pContext
,
cbContext
,
dwFlags
,
dwReserved
);
...
@@ -176,7 +179,7 @@ static HRESULT confirm_safety(HTMLDocumentNode *This, const WCHAR *url, struct C
...
@@ -176,7 +179,7 @@ static HRESULT confirm_safety(HTMLDocumentNode *This, const WCHAR *url, struct C
static
HRESULT
WINAPI
InternetHostSecurityManager_QueryCustomPolicy
(
IInternetHostSecurityManager
*
iface
,
REFGUID
guidKey
,
static
HRESULT
WINAPI
InternetHostSecurityManager_QueryCustomPolicy
(
IInternetHostSecurityManager
*
iface
,
REFGUID
guidKey
,
BYTE
**
ppPolicy
,
DWORD
*
pcbPolicy
,
BYTE
*
pContext
,
DWORD
cbContext
,
DWORD
dwReserved
)
BYTE
**
ppPolicy
,
DWORD
*
pcbPolicy
,
BYTE
*
pContext
,
DWORD
cbContext
,
DWORD
dwReserved
)
{
{
HTMLDocumentNode
*
This
=
HOSTSECMGR_THIS
(
iface
);
HTMLDocumentNode
*
This
=
impl_from_IInternetHostSecurityManager
(
iface
);
const
WCHAR
*
url
;
const
WCHAR
*
url
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -227,8 +230,6 @@ static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHos
...
@@ -227,8 +230,6 @@ static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHos
return
hres
;
return
hres
;
}
}
#undef HOSTSECMGR_THIS
static
const
IInternetHostSecurityManagerVtbl
InternetHostSecurityManagerVtbl
=
{
static
const
IInternetHostSecurityManagerVtbl
InternetHostSecurityManagerVtbl
=
{
InternetHostSecurityManager_QueryInterface
,
InternetHostSecurityManager_QueryInterface
,
InternetHostSecurityManager_AddRef
,
InternetHostSecurityManager_AddRef
,
...
@@ -240,5 +241,5 @@ static const IInternetHostSecurityManagerVtbl InternetHostSecurityManagerVtbl =
...
@@ -240,5 +241,5 @@ static const IInternetHostSecurityManagerVtbl InternetHostSecurityManagerVtbl =
void
HTMLDocumentNode_SecMgr_Init
(
HTMLDocumentNode
*
This
)
void
HTMLDocumentNode_SecMgr_Init
(
HTMLDocumentNode
*
This
)
{
{
This
->
lpIInternetHostSecurityManager
Vtbl
=
&
InternetHostSecurityManagerVtbl
;
This
->
IInternetHostSecurityManager_iface
.
lp
Vtbl
=
&
InternetHostSecurityManagerVtbl
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment