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
c1079f25
Commit
c1079f25
authored
May 20, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
May 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use bind_event in set_event_handler.
parent
7950f780
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
htmlevent.c
dlls/mshtml/htmlevent.c
+7
-6
htmlevent.h
dlls/mshtml/htmlevent.h
+2
-2
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-1
No files found.
dlls/mshtml/htmlevent.c
View file @
c1079f25
...
...
@@ -1399,7 +1399,7 @@ static void remove_event_handler(EventTarget *event_target, eventid_t eid)
}
}
static
HRESULT
set_event_handler_disp
(
EventTarget
*
event_target
,
HTMLDocumentNode
*
doc
,
eventid_t
eid
,
IDispatch
*
disp
)
static
HRESULT
set_event_handler_disp
(
EventTarget
*
event_target
,
eventid_t
eid
,
IDispatch
*
disp
)
{
event_target_t
*
data
;
...
...
@@ -1417,10 +1417,11 @@ static HRESULT set_event_handler_disp(EventTarget *event_target, HTMLDocumentNod
data
->
event_table
[
eid
]
->
handler_prop
=
disp
;
IDispatch_AddRef
(
disp
);
return
ensure_doc_nsevent_handler
(
doc
,
eid
);
bind_event
(
event_target
,
eid
);
return
S_OK
;
}
HRESULT
set_event_handler
(
EventTarget
*
event_target
,
HTMLDocumentNode
*
doc
,
eventid_t
eid
,
VARIANT
*
var
)
HRESULT
set_event_handler
(
EventTarget
*
event_target
,
eventid_t
eid
,
VARIANT
*
var
)
{
switch
(
V_VT
(
var
))
{
case
VT_NULL
:
...
...
@@ -1428,7 +1429,7 @@ HRESULT set_event_handler(EventTarget *event_target, HTMLDocumentNode *doc, even
return
S_OK
;
case
VT_DISPATCH
:
return
set_event_handler_disp
(
event_target
,
doc
,
eid
,
V_DISPATCH
(
var
));
return
set_event_handler_disp
(
event_target
,
eid
,
V_DISPATCH
(
var
));
case
VT_BSTR
:
{
VARIANT
*
v
;
...
...
@@ -1562,7 +1563,7 @@ void bind_target_event(HTMLDocumentNode *doc, EventTarget *event_target, const W
return
;
}
set_event_handler_disp
(
event_target
,
doc
,
eid
,
disp
);
set_event_handler_disp
(
event_target
,
eid
,
disp
);
}
void
update_doc_cp_events
(
HTMLDocumentNode
*
doc
,
cp_static_data_t
*
cp
)
...
...
@@ -1597,7 +1598,7 @@ void check_event_attr(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem)
if
(
disp
)
{
hres
=
get_node
(
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
,
&
node
);
if
(
SUCCEEDED
(
hres
))
{
set_event_handler_disp
(
&
node
->
event_target
,
node
->
doc
,
i
,
disp
);
set_event_handler_disp
(
&
node
->
event_target
,
i
,
disp
);
node_release
(
node
);
}
IDispatch_Release
(
disp
);
...
...
dlls/mshtml/htmlevent.h
View file @
c1079f25
...
...
@@ -54,7 +54,7 @@ eventid_t str_to_eid(LPCWSTR) DECLSPEC_HIDDEN;
void
check_event_attr
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
)
DECLSPEC_HIDDEN
;
void
release_event_target
(
event_target_t
*
)
DECLSPEC_HIDDEN
;
void
fire_event
(
HTMLDocumentNode
*
,
eventid_t
,
BOOL
,
nsIDOMNode
*
,
nsIDOMEvent
*
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_event_handler
(
EventTarget
*
,
HTMLDocumentNode
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_event_handler
(
EventTarget
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_event_handler
(
EventTarget
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
attach_event
(
EventTarget
*
,
BSTR
,
IDispatch
*
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
detach_event
(
EventTarget
*
,
BSTR
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
...
...
@@ -74,7 +74,7 @@ void detach_nsevent(HTMLDocumentNode*,const WCHAR*) DECLSPEC_HIDDEN;
static
inline
HRESULT
set_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
set_event_handler
(
&
node
->
event_target
,
node
->
doc
,
eid
,
var
);
return
set_event_handler
(
&
node
->
event_target
,
eid
,
var
);
}
static
inline
HRESULT
get_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
...
...
dlls/mshtml/htmlwindow.c
View file @
c1079f25
...
...
@@ -95,7 +95,7 @@ static inline HRESULT set_window_event(HTMLWindow *window, eventid_t eid, VARIAN
return
E_FAIL
;
}
return
set_event_handler
(
&
window
->
inner_window
->
event_target
,
window
->
inner_window
->
doc
,
eid
,
var
);
return
set_event_handler
(
&
window
->
inner_window
->
event_target
,
eid
,
var
);
}
static
inline
HRESULT
get_window_event
(
HTMLWindow
*
window
,
eventid_t
eid
,
VARIANT
*
var
)
...
...
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