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
71cae1fc
Commit
71cae1fc
authored
May 04, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
May 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLEventObj::get_returnValue implementation.
parent
985d8afc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
htmlevent.c
dlls/mshtml/htmlevent.c
+4
-3
events.c
dlls/mshtml/tests/events.c
+11
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
71cae1fc
...
...
@@ -265,6 +265,7 @@ typedef struct {
HTMLDOMNode
*
target
;
const
event_info_t
*
type
;
nsIDOMEvent
*
nsevent
;
VARIANT
return_value
;
BOOL
prevent_default
;
BOOL
cancel_bubble
;
}
HTMLEventObj
;
...
...
@@ -469,6 +470,7 @@ static HRESULT WINAPI HTMLEventObj_put_returnValue(IHTMLEventObj *iface, VARIANT
return
DISP_E_BADVARTYPE
;
}
This
->
return_value
=
v
;
if
(
!
V_BOOL
(
&
v
))
This
->
prevent_default
=
TRUE
;
return
S_OK
;
...
...
@@ -478,10 +480,9 @@ static HRESULT WINAPI HTMLEventObj_get_returnValue(IHTMLEventObj *iface, VARIANT
{
HTMLEventObj
*
This
=
impl_from_IHTMLEventObj
(
iface
);
FIXM
E
(
"(%p)->(%p)
\n
"
,
This
,
p
);
TRAC
E
(
"(%p)->(%p)
\n
"
,
This
,
p
);
V_VT
(
p
)
=
VT_EMPTY
;
return
S_OK
;
return
VariantCopy
(
p
,
&
This
->
return_value
);
}
static
HRESULT
WINAPI
HTMLEventObj_put_cancelBubble
(
IHTMLEventObj
*
iface
,
VARIANT_BOOL
v
)
...
...
dlls/mshtml/tests/events.c
View file @
71cae1fc
...
...
@@ -1057,6 +1057,7 @@ static HRESULT WINAPI submit_onclick_setret(IDispatchEx *iface, DISPID id, LCID
VARIANT
*
pvarRes
,
EXCEPINFO
*
pei
,
IServiceProvider
*
pspCaller
)
{
IHTMLEventObj
*
event
;
VARIANT
v
;
HRESULT
hres
;
CHECK_EXPECT
(
submit_onclick_setret
);
...
...
@@ -1068,10 +1069,20 @@ static HRESULT WINAPI submit_onclick_setret(IDispatchEx *iface, DISPID id, LCID
ok
(
hres
==
S_OK
,
"get_event failed: %08x
\n
"
,
hres
);
ok
(
event
!=
NULL
,
"event == NULL
\n
"
);
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLEventObj_get_returnValue
(
event
,
&
v
);
ok
(
hres
==
S_OK
,
"get_returnValue failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"V_VT(returnValue) = %d
\n
"
,
V_VT
(
&
v
));
hres
=
IHTMLEventObj_put_returnValue
(
event
,
onclick_event_retval
);
ok
(
hres
==
S_OK
,
"put_returnValue failed: %08x
\n
"
,
hres
);
IHTMLEventObj_Release
(
event
);
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLEventObj_get_returnValue
(
event
,
&
v
);
ok
(
hres
==
S_OK
,
"get_returnValue failed: %08x
\n
"
,
hres
);
ok
(
VarCmp
(
&
v
,
&
onclick_event_retval
,
0
,
0
)
==
VARCMP_EQ
,
"unexpected returnValue
\n
"
);
*
pvarRes
=
onclick_retval
;
return
S_OK
;
}
...
...
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