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
607a8d01
Commit
607a8d01
authored
Feb 17, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added get_event_dispex_ref helper that avoids using attr_name.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9f0be726
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
htmlevent.c
dlls/mshtml/htmlevent.c
+12
-3
No files found.
dlls/mshtml/htmlevent.c
View file @
607a8d01
...
...
@@ -1396,13 +1396,22 @@ void detach_events(HTMLDocumentNode *doc)
release_nsevents
(
doc
);
}
static
HRESULT
get_event_dispex_ref
(
EventTarget
*
event_target
,
eventid_t
eid
,
BOOL
alloc
,
VARIANT
**
ret
)
{
WCHAR
buf
[
64
];
buf
[
0
]
=
'o'
;
buf
[
1
]
=
'n'
;
strcpyW
(
buf
+
2
,
event_info
[
eid
].
name
);
return
dispex_get_dprop_ref
(
&
event_target
->
dispex
,
buf
,
alloc
,
ret
);
}
static
void
remove_event_handler
(
EventTarget
*
event_target
,
eventid_t
eid
)
{
handler_vector_t
*
handler_vector
;
VARIANT
*
store
;
HRESULT
hres
;
hres
=
dispex_get_dprop_ref
(
&
event_target
->
dispex
,
event_info
[
eid
].
attr_name
,
FALSE
,
&
store
);
hres
=
get_event_dispex_ref
(
event_target
,
eid
,
FALSE
,
&
store
);
if
(
SUCCEEDED
(
hres
))
VariantClear
(
store
);
...
...
@@ -1458,7 +1467,7 @@ HRESULT set_event_handler(EventTarget *event_target, eventid_t eid, VARIANT *var
*/
remove_event_handler
(
event_target
,
eid
);
hres
=
dispex_get_dprop_ref
(
&
event_target
->
dispex
,
event_info
[
eid
].
attr_name
,
TRUE
,
&
v
);
hres
=
get_event_dispex_ref
(
event_target
,
eid
,
TRUE
,
&
v
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1485,7 +1494,7 @@ HRESULT get_event_handler(EventTarget *event_target, eventid_t eid, VARIANT *var
VARIANT
*
v
;
HRESULT
hres
;
hres
=
dispex_get_dprop_ref
(
&
event_target
->
dispex
,
event_info
[
eid
].
attr_name
,
FALSE
,
&
v
);
hres
=
get_event_dispex_ref
(
event_target
,
eid
,
FALSE
,
&
v
);
if
(
SUCCEEDED
(
hres
)
&&
V_VT
(
v
)
!=
VT_EMPTY
)
{
V_VT
(
var
)
=
VT_EMPTY
;
return
VariantCopy
(
var
,
v
);
...
...
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