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
a5923a6e
Commit
a5923a6e
authored
Oct 01, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IInternetHostSecurity::ProcessUrlAction implementation.
parent
7f11de86
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
2 deletions
+30
-2
htmldoc.c
dlls/mshtml/htmldoc.c
+10
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
secmgr.c
dlls/mshtml/secmgr.c
+10
-2
script.c
dlls/mshtml/tests/script.c
+8
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
a5923a6e
...
@@ -1772,6 +1772,9 @@ void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
...
@@ -1772,6 +1772,9 @@ void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
{
{
HTMLDocumentNode
*
This
=
HTMLDOCNODE_NODE_THIS
(
iface
);
HTMLDocumentNode
*
This
=
HTMLDOCNODE_NODE_THIS
(
iface
);
if
(
This
->
secmgr
)
IInternetSecurityManager_Release
(
This
->
secmgr
);
detach_selection
(
This
);
detach_selection
(
This
);
detach_ranges
(
This
);
detach_ranges
(
This
);
release_nodes
(
This
);
release_nodes
(
This
);
...
@@ -1805,6 +1808,7 @@ static dispex_static_data_t HTMLDocumentNode_dispex = {
...
@@ -1805,6 +1808,7 @@ static dispex_static_data_t HTMLDocumentNode_dispex = {
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
nsdoc
,
HTMLDocumentObj
*
doc_obj
,
HTMLWindow
*
window
,
HTMLDocumentNode
**
ret
)
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
nsdoc
,
HTMLDocumentObj
*
doc_obj
,
HTMLWindow
*
window
,
HTMLDocumentNode
**
ret
)
{
{
HTMLDocumentNode
*
doc
;
HTMLDocumentNode
*
doc
;
HRESULT
hres
;
doc
=
heap_alloc_zero
(
sizeof
(
HTMLDocumentNode
));
doc
=
heap_alloc_zero
(
sizeof
(
HTMLDocumentNode
));
if
(
!
doc
)
if
(
!
doc
)
...
@@ -1829,6 +1833,12 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
...
@@ -1829,6 +1833,12 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
HTMLDOMNode_Init
(
doc
,
&
doc
->
node
,
(
nsIDOMNode
*
)
nsdoc
);
HTMLDOMNode_Init
(
doc
,
&
doc
->
node
,
(
nsIDOMNode
*
)
nsdoc
);
doc
->
node
.
vtbl
=
&
HTMLDocumentNodeImplVtbl
;
doc
->
node
.
vtbl
=
&
HTMLDocumentNodeImplVtbl
;
hres
=
CoInternetCreateSecurityManager
(
NULL
,
&
doc
->
secmgr
,
0
);
if
(
FAILED
(
hres
))
{
htmldoc_release
(
&
doc
->
basedoc
);
return
hres
;
}
*
ret
=
doc
;
*
ret
=
doc
;
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/mshtml/mshtml_private.h
View file @
a5923a6e
...
@@ -471,6 +471,8 @@ struct HTMLDocumentNode {
...
@@ -471,6 +471,8 @@ struct HTMLDocumentNode {
HTMLDOMNode
*
nodes
;
HTMLDOMNode
*
nodes
;
IInternetSecurityManager
*
secmgr
;
struct
list
selection_list
;
struct
list
selection_list
;
struct
list
range_list
;
struct
list
range_list
;
};
};
...
...
dlls/mshtml/secmgr.c
View file @
a5923a6e
...
@@ -34,6 +34,8 @@
...
@@ -34,6 +34,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
static
const
WCHAR
about_blankW
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
0
};
#define HOSTSECMGR_THIS(iface) DEFINE_THIS(HTMLDocumentNode, IInternetHostSecurityManager, iface)
#define HOSTSECMGR_THIS(iface) DEFINE_THIS(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
)
...
@@ -66,8 +68,14 @@ static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHost
...
@@ -66,8 +68,14 @@ static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHost
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
=
HOSTSECMGR_THIS
(
iface
);
FIXME
(
"%p)->(%d %p %d %p %d %x %x)
\n
"
,
This
,
dwAction
,
pPolicy
,
cbPolicy
,
pContext
,
cbContext
,
dwFlags
,
dwReserved
);
const
WCHAR
*
url
;
return
E_NOTIMPL
;
TRACE
(
"%p)->(%d %p %d %p %d %x %x)
\n
"
,
This
,
dwAction
,
pPolicy
,
cbPolicy
,
pContext
,
cbContext
,
dwFlags
,
dwReserved
);
url
=
This
->
basedoc
.
doc_obj
->
url
?
This
->
basedoc
.
doc_obj
->
url
:
about_blankW
;
return
IInternetSecurityManager_ProcessUrlAction
(
This
->
secmgr
,
url
,
dwAction
,
pPolicy
,
cbPolicy
,
pContext
,
cbContext
,
dwFlags
,
dwReserved
);
}
}
static
HRESULT
WINAPI
InternetHostSecurityManager_QueryCustomPolicy
(
IInternetHostSecurityManager
*
iface
,
REFGUID
guidKey
,
static
HRESULT
WINAPI
InternetHostSecurityManager_QueryCustomPolicy
(
IInternetHostSecurityManager
*
iface
,
REFGUID
guidKey
,
...
...
dlls/mshtml/tests/script.c
View file @
a5923a6e
...
@@ -117,6 +117,8 @@ DEFINE_EXPECT(script_testprop_i);
...
@@ -117,6 +117,8 @@ DEFINE_EXPECT(script_testprop_i);
static
const
GUID
CLSID_TestScript
=
static
const
GUID
CLSID_TestScript
=
{
0x178fc163
,
0xf585
,
0x4e24
,{
0x9c
,
0x13
,
0x4b
,
0xb7
,
0xfa
,
0xf8
,
0x07
,
0x46
}};
{
0x178fc163
,
0xf585
,
0x4e24
,{
0x9c
,
0x13
,
0x4b
,
0xb7
,
0xfa
,
0xf8
,
0x07
,
0x46
}};
static
const
GUID
CLSID_TestActiveX
=
{
0x178fc163
,
0xf585
,
0x4e24
,{
0x9c
,
0x13
,
0x4b
,
0xb7
,
0xfa
,
0xf8
,
0x06
,
0x46
}};
static
IHTMLDocument2
*
notif_doc
;
static
IHTMLDocument2
*
notif_doc
;
static
IDispatchEx
*
window_dispex
;
static
IDispatchEx
*
window_dispex
;
...
@@ -575,6 +577,7 @@ static void test_security(void)
...
@@ -575,6 +577,7 @@ static void test_security(void)
{
{
IInternetHostSecurityManager
*
sec_mgr
;
IInternetHostSecurityManager
*
sec_mgr
;
IServiceProvider
*
sp
;
IServiceProvider
*
sp
;
DWORD
policy
;
HRESULT
hres
;
HRESULT
hres
;
hres
=
IActiveScriptSite_QueryInterface
(
site
,
&
IID_IServiceProvider
,
(
void
**
)
&
sp
);
hres
=
IActiveScriptSite_QueryInterface
(
site
,
&
IID_IServiceProvider
,
(
void
**
)
&
sp
);
...
@@ -585,6 +588,11 @@ static void test_security(void)
...
@@ -585,6 +588,11 @@ static void test_security(void)
IServiceProvider_Release
(
sp
);
IServiceProvider_Release
(
sp
);
ok
(
hres
==
S_OK
,
"QueryService failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"QueryService failed: %08x
\n
"
,
hres
);
hres
=
IInternetHostSecurityManager_ProcessUrlAction
(
sec_mgr
,
URLACTION_ACTIVEX_RUN
,
(
BYTE
*
)
&
policy
,
sizeof
(
policy
),
(
BYTE
*
)
&
CLSID_TestActiveX
,
sizeof
(
CLSID
),
0
,
0
);
ok
(
hres
==
S_OK
,
"ProcessUrlAction failed: %08x
\n
"
,
hres
);
ok
(
policy
==
URLPOLICY_ALLOW
,
"policy = %x
\n
"
,
policy
);
IInternetHostSecurityManager_Release
(
sec_mgr
);
IInternetHostSecurityManager_Release
(
sec_mgr
);
}
}
...
...
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