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
35a6c314
Commit
35a6c314
authored
Oct 02, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Oct 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Traverse EventTarget listeners.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
30d88426
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
0 deletions
+15
-0
htmlevent.c
dlls/mshtml/htmlevent.c
+11
-0
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-0
htmlnode.c
dlls/mshtml/htmlnode.c
+1
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-0
xmlhttprequest.c
dlls/mshtml/xmlhttprequest.c
+1
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
35a6c314
...
...
@@ -4587,6 +4587,17 @@ void EventTarget_Init(EventTarget *event_target, dispex_static_data_t *dispex_da
wine_rb_init
(
&
event_target
->
handler_map
,
event_id_cmp
);
}
void
traverse_event_target
(
EventTarget
*
event_target
,
nsCycleCollectionTraversalCallback
*
cb
)
{
listener_container_t
*
iter
;
event_listener_t
*
listener
;
RB_FOR_EACH_ENTRY
(
iter
,
&
event_target
->
handler_map
,
listener_container_t
,
entry
)
LIST_FOR_EACH_ENTRY
(
listener
,
&
iter
->
listeners
,
event_listener_t
,
entry
)
if
(
listener
->
function
)
note_cc_edge
((
nsISupports
*
)
listener
->
function
,
"EventTarget.listener"
,
cb
);
}
void
release_event_target
(
EventTarget
*
event_target
)
{
listener_container_t
*
iter
,
*
iter2
;
...
...
dlls/mshtml/htmlevent.h
View file @
35a6c314
...
...
@@ -97,6 +97,7 @@ typedef struct DOMEvent {
const
WCHAR
*
get_event_name
(
eventid_t
);
void
check_event_attr
(
HTMLDocumentNode
*
,
nsIDOMElement
*
);
void
traverse_event_target
(
EventTarget
*
,
nsCycleCollectionTraversalCallback
*
);
void
release_event_target
(
EventTarget
*
);
HRESULT
set_event_handler
(
EventTarget
*
,
eventid_t
,
VARIANT
*
);
HRESULT
get_event_handler
(
EventTarget
*
,
eventid_t
,
VARIANT
*
);
...
...
dlls/mshtml/htmlnode.c
View file @
35a6c314
...
...
@@ -1425,6 +1425,7 @@ void HTMLDOMNode_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback
{
HTMLDOMNode
*
This
=
HTMLDOMNode_from_DispatchEx
(
dispex
);
traverse_event_target
(
&
This
->
event_target
,
cb
);
if
(
This
->
nsnode
)
note_cc_edge
((
nsISupports
*
)
This
->
nsnode
,
"nsnode"
,
cb
);
if
(
This
->
doc
&&
&
This
->
doc
->
node
!=
This
)
...
...
dlls/mshtml/htmlwindow.c
View file @
35a6c314
...
...
@@ -3922,6 +3922,7 @@ static void HTMLWindow_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCa
HTMLInnerWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
HTMLOuterWindow
*
child
;
traverse_event_target
(
&
This
->
event_target
,
cb
);
LIST_FOR_EACH_ENTRY
(
child
,
&
This
->
children
,
HTMLOuterWindow
,
sibling_entry
)
note_cc_edge
((
nsISupports
*
)
&
child
->
base
.
IHTMLWindow2_iface
,
"child"
,
cb
);
if
(
This
->
doc
)
...
...
dlls/mshtml/xmlhttprequest.c
View file @
35a6c314
...
...
@@ -1514,6 +1514,7 @@ static void HTMLXMLHttpRequest_traverse(DispatchEx *dispex, nsCycleCollectionTra
note_cc_edge
((
nsISupports
*
)
&
This
->
pending_progress_event
->
IDOMEvent_iface
,
"pending_progress_event"
,
cb
);
if
(
This
->
nsxhr
)
note_cc_edge
((
nsISupports
*
)
This
->
nsxhr
,
"nsxhr"
,
cb
);
traverse_event_target
(
&
This
->
event_target
,
cb
);
}
static
void
HTMLXMLHttpRequest_unlink
(
DispatchEx
*
dispex
)
...
...
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