Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
22cfd585
Commit
22cfd585
authored
Oct 19, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Pass DOMEvent to call_event_handlers.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8def42e7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
htmlevent.c
dlls/mshtml/htmlevent.c
+4
-3
htmlevent.h
dlls/mshtml/htmlevent.h
+2
-1
xmlhttprequest.c
dlls/mshtml/xmlhttprequest.c
+8
-2
No files found.
dlls/mshtml/htmlevent.c
View file @
22cfd585
...
...
@@ -1073,7 +1073,7 @@ static DOMEvent *alloc_event(nsIDOMEvent *nsevent)
return
event
;
}
static
HRESULT
create_event_from_nsevent
(
nsIDOMEvent
*
nsevent
,
DOMEvent
**
ret_event
)
HRESULT
create_event_from_nsevent
(
nsIDOMEvent
*
nsevent
,
DOMEvent
**
ret_event
)
{
DOMEvent
*
event
;
nsAString
nsstr
;
...
...
@@ -1244,8 +1244,9 @@ static BOOL is_cp_event(cp_static_data_t *data, DISPID dispid)
return
FALSE
;
}
void
call_event_handlers
(
HTMLEventObj
*
event_obj
,
EventTarget
*
event_target
,
eventid_t
eid
)
void
call_event_handlers
(
HTMLEventObj
*
event_obj
,
EventTarget
*
event_target
,
DOMEvent
*
event
)
{
const
eventid_t
eid
=
event
->
event_id
;
handler_vector_t
*
handler_vector
=
get_handler_vector
(
event_target
,
eid
,
FALSE
);
const
BOOL
cancelable
=
event_info
[
eid
].
flags
&
EVENT_CANCELABLE
;
ConnectionPointContainer
*
cp_container
=
NULL
;
...
...
@@ -1418,7 +1419,7 @@ static void fire_event_obj(EventTarget *event_target, DOMEvent *event, HTMLEvent
IDispatchEx_AddRef
(
&
event_target
->
dispex
.
IDispatchEx_iface
);
for
(
i
=
0
;
i
<
chain_cnt
;
i
++
)
{
call_event_handlers
(
event_obj
,
target_chain
[
i
],
event
->
event_id
);
call_event_handlers
(
event_obj
,
target_chain
[
i
],
event
);
if
(
!
(
event_flags
&
EVENT_BUBBLES
)
||
(
event_obj
&&
event_obj
->
cancel_bubble
))
break
;
}
...
...
dlls/mshtml/htmlevent.h
View file @
22cfd585
...
...
@@ -83,9 +83,10 @@ void bind_target_event(HTMLDocumentNode*,EventTarget*,const WCHAR*,IDispatch*) D
HRESULT
ensure_doc_nsevent_handler
(
HTMLDocumentNode
*
,
eventid_t
)
DECLSPEC_HIDDEN
;
typedef
struct
HTMLEventObj
HTMLEventObj
;
void
call_event_handlers
(
HTMLEventObj
*
,
EventTarget
*
,
eventid_t
);
void
call_event_handlers
(
HTMLEventObj
*
,
EventTarget
*
,
DOMEvent
*
);
HRESULT
create_document_event_str
(
HTMLDocumentNode
*
,
const
WCHAR
*
,
IDOMEvent
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_event_from_nsevent
(
nsIDOMEvent
*
,
DOMEvent
**
)
DECLSPEC_HIDDEN
;
void
init_nsevents
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
release_nsevents
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/xmlhttprequest.c
View file @
22cfd585
...
...
@@ -181,16 +181,22 @@ static nsrefcnt NSAPI XMLHttpReqEventListener_Release(nsIDOMEventListener *iface
return
ref
;
}
static
nsresult
NSAPI
XMLHttpReqEventListener_HandleEvent
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
static
nsresult
NSAPI
XMLHttpReqEventListener_HandleEvent
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
ns
event
)
{
XMLHttpReqEventListener
*
This
=
impl_from_nsIDOMEventListener
(
iface
);
DOMEvent
*
event
;
HRESULT
hres
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
xhr
)
return
NS_OK
;
call_event_handlers
(
NULL
,
&
This
->
xhr
->
event_target
,
EVENTID_READYSTATECHANGE
);
hres
=
create_event_from_nsevent
(
nsevent
,
&
event
);
if
(
SUCCEEDED
(
hres
)
){
call_event_handlers
(
NULL
,
&
This
->
xhr
->
event_target
,
event
);
IDOMEvent_Release
(
&
event
->
IDOMEvent_iface
);
}
return
NS_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