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
96958385
Commit
96958385
authored
Oct 18, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store event target as EventTarget in HTMLEventObj.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ec5d0d44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
htmlevent.c
dlls/mshtml/htmlevent.c
+8
-8
No files found.
dlls/mshtml/htmlevent.c
View file @
96958385
...
...
@@ -220,7 +220,7 @@ struct HTMLEventObj {
LONG
ref
;
HTMLDOMNode
*
target
;
EventTarget
*
target
;
const
event_info_t
*
type
;
nsIDOMEvent
*
nsevent
;
VARIANT
return_value
;
...
...
@@ -274,7 +274,7 @@ static ULONG WINAPI HTMLEventObj_Release(IHTMLEventObj *iface)
if
(
!
ref
)
{
if
(
This
->
target
)
I
HTMLDOMNode_Release
(
&
This
->
target
->
IHTMLDOMNode
_iface
);
I
DispatchEx_Release
(
&
This
->
target
->
dispex
.
IDispatchEx
_iface
);
if
(
This
->
nsevent
)
nsIDOMEvent_Release
(
This
->
nsevent
);
release_dispex
(
&
This
->
dispex
);
...
...
@@ -323,7 +323,7 @@ static HRESULT WINAPI HTMLEventObj_get_srcElement(IHTMLEventObj *iface, IHTMLEle
*
p
=
NULL
;
if
(
This
->
target
)
I
HTMLDOMNode_QueryInterface
(
&
This
->
target
->
IHTMLDOMNode
_iface
,
&
IID_IHTMLElement
,
(
void
**
)
p
);
I
DispatchEx_QueryInterface
(
&
This
->
target
->
dispex
.
IDispatchEx
_iface
,
&
IID_IHTMLElement
,
(
void
**
)
p
);
return
S_OK
;
}
...
...
@@ -803,7 +803,7 @@ static HTMLEventObj *create_event(void)
return
ret
;
}
static
HRESULT
set_event_info
(
HTMLEventObj
*
event
,
HTMLDOMNode
*
target
,
eventid_t
eid
,
nsIDOMEvent
*
nsevent
)
static
HRESULT
set_event_info
(
HTMLEventObj
*
event
,
EventTarget
*
target
,
eventid_t
eid
,
HTMLDocumentNode
*
doc
,
nsIDOMEvent
*
nsevent
)
{
event
->
type
=
event_info
+
eid
;
event
->
nsevent
=
nsevent
;
...
...
@@ -815,7 +815,7 @@ static HRESULT set_event_info(HTMLEventObj *event, HTMLDOMNode *target, eventid_
nsresult
nsres
;
nsAString_InitDepend
(
&
type_str
,
event_types
[
event_info
[
eid
].
type
]);
nsres
=
nsIDOMHTMLDocument_CreateEvent
(
target
->
doc
->
nsdoc
,
&
type_str
,
&
event
->
nsevent
);
nsres
=
nsIDOMHTMLDocument_CreateEvent
(
doc
->
nsdoc
,
&
type_str
,
&
event
->
nsevent
);
nsAString_Finish
(
&
type_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not create event: %08x
\n
"
,
nsres
);
...
...
@@ -825,7 +825,7 @@ static HRESULT set_event_info(HTMLEventObj *event, HTMLDOMNode *target, eventid_
event
->
target
=
target
;
if
(
target
)
I
HTMLDOMNode_AddRef
(
&
target
->
IHTMLDOMNode
_iface
);
I
DispatchEx_AddRef
(
&
target
->
dispex
.
IDispatchEx
_iface
);
return
S_OK
;
}
...
...
@@ -1175,7 +1175,7 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, HTMLDOMNod
if
(
!
event_obj
)
return
;
hres
=
set_event_info
(
event_obj
,
target
,
eid
,
nsevent
);
hres
=
set_event_info
(
event_obj
,
&
target
->
event_target
,
eid
,
doc
,
nsevent
);
if
(
FAILED
(
hres
))
{
IHTMLEventObj_Release
(
&
event_obj
->
IHTMLEventObj_iface
);
return
;
...
...
@@ -1225,7 +1225,7 @@ HRESULT dispatch_event(HTMLDOMNode *node, const WCHAR *event_name, VARIANT *even
}
if
(
event_obj
)
{
hres
=
set_event_info
(
event_obj
,
node
,
eid
,
NULL
);
hres
=
set_event_info
(
event_obj
,
&
node
->
event_target
,
eid
,
node
->
doc
,
NULL
);
if
(
SUCCEEDED
(
hres
))
fire_event_obj
(
node
->
doc
,
eid
,
event_obj
,
node
);
...
...
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