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
62000c28
Commit
62000c28
authored
Jan 29, 2024
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Jan 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement Exec for CGID_ScriptSite's CMDID_SCRIPTSITE_SECURITY_WINDOW.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
a0624a7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
3 deletions
+42
-3
script.c
dlls/mshtml/script.c
+27
-2
script.c
dlls/mshtml/tests/script.c
+15
-1
No files found.
dlls/mshtml/script.c
View file @
62000c28
...
...
@@ -730,9 +730,34 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
{
ScriptHost
*
This
=
impl_from_IOleCommandTarget
(
iface
);
FIXM
E
(
"(%p)->(%s %ld %ld %s %p)
\n
"
,
This
,
debugstr_guid
(
pguidCmdGroup
),
nCmdID
,
nCmdexecopt
,
wine_dbgstr_variant
(
pvaIn
),
pvaOut
);
TRAC
E
(
"(%p)->(%s %ld %ld %s %p)
\n
"
,
This
,
debugstr_guid
(
pguidCmdGroup
),
nCmdID
,
nCmdexecopt
,
wine_dbgstr_variant
(
pvaIn
),
pvaOut
);
return
E_NOTIMPL
;
if
(
!
pguidCmdGroup
)
{
FIXME
(
"Unsupported pguidCmdGroup %s
\n
"
,
debugstr_guid
(
pguidCmdGroup
));
return
OLECMDERR_E_UNKNOWNGROUP
;
}
if
(
IsEqualGUID
(
&
CGID_ScriptSite
,
pguidCmdGroup
))
{
switch
(
nCmdID
)
{
case
CMDID_SCRIPTSITE_SECURITY_WINDOW
:
if
(
!
This
->
window
||
!
This
->
window
->
base
.
outer_window
)
{
FIXME
(
"No window
\n
"
);
return
E_FAIL
;
}
V_VT
(
pvaOut
)
=
VT_DISPATCH
;
V_DISPATCH
(
pvaOut
)
=
(
IDispatch
*
)
&
This
->
window
->
base
.
outer_window
->
base
.
IHTMLWindow2_iface
;
IDispatch_AddRef
(
V_DISPATCH
(
pvaOut
));
break
;
default:
FIXME
(
"Unsupported nCmdID %ld of CGID_ScriptSite group
\n
"
,
nCmdID
);
return
OLECMDERR_E_NOTSUPPORTED
;
}
return
S_OK
;
}
FIXME
(
"Unsupported pguidCmdGroup %s
\n
"
,
debugstr_guid
(
pguidCmdGroup
));
return
OLECMDERR_E_UNKNOWNGROUP
;
}
static
const
IOleCommandTargetVtbl
OleCommandTargetVtbl
=
{
...
...
dlls/mshtml/tests/script.c
View file @
62000c28
...
...
@@ -3079,11 +3079,12 @@ static void test_ui(void)
static
void
test_sp
(
void
)
{
IServiceProvider
*
sp
,
*
doc_sp
,
*
doc_obj_sp
,
*
window_sp
;
IHTMLWindow2
*
window
,
*
cmdtarget_window
;
IOleCommandTarget
*
cmdtarget
;
IHTMLWindow2
*
window
;
IHTMLDocument2
*
doc
;
IUnknown
*
unk
;
HRESULT
hres
;
VARIANT
var
;
hres
=
IDispatchEx_QueryInterface
(
window_dispex
,
&
IID_IHTMLWindow2
,
(
void
**
)
&
window
);
ok
(
hres
==
S_OK
,
"QueryInterface(IHTMLWindow2) failed: %08lx
\n
"
,
hres
);
...
...
@@ -3161,6 +3162,19 @@ static void test_sp(void)
IUnknown_Release
(
unk
);
}
V_VT
(
&
var
)
=
VT_EMPTY
;
hres
=
IOleCommandTarget_Exec
(
cmdtarget
,
&
CGID_ScriptSite
,
CMDID_SCRIPTSITE_SECURITY_WINDOW
,
0
,
NULL
,
&
var
);
ok
(
hres
==
S_OK
,
"Exec failed: %08lx
\n
"
,
hres
);
ok
(
V_VT
(
&
var
)
==
VT_DISPATCH
,
"V_VT(CMDID_SCRIPTSITE_SECURITY_WINDOW) = %d
\n
"
,
V_VT
(
&
var
));
ok
(
V_DISPATCH
(
&
var
)
!=
NULL
,
"V_DISPATCH(CMDID_SCRIPTSITE_SECURITY_WINDOW) = NULL
\n
"
);
hres
=
IDispatch_QueryInterface
(
V_DISPATCH
(
&
var
),
&
IID_IHTMLWindow2
,
(
void
**
)
&
cmdtarget_window
);
ok
(
hres
==
S_OK
,
"QueryInterface(IHTMLWindow2) failed: %08lx
\n
"
,
hres
);
ok
(
cmdtarget_window
!=
NULL
,
"cmdtarget_window is NULL
\n
"
);
ok
(
window
==
cmdtarget_window
,
"window != cmdtarget_window
\n
"
);
IHTMLWindow2_Release
(
cmdtarget_window
);
VariantClear
(
&
var
);
IOleCommandTarget_Release
(
cmdtarget
);
IServiceProvider_Release
(
window_sp
);
IServiceProvider_Release
(
doc_obj_sp
);
...
...
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