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
07954f36
Commit
07954f36
authored
Jan 24, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IDOMEvent::get_srcElement implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6f7532cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
htmlevent.c
dlls/mshtml/htmlevent.c
+14
-6
events.js
dlls/mshtml/tests/events.js
+3
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
07954f36
...
...
@@ -396,10 +396,12 @@ static HRESULT WINAPI HTMLEventObj_get_srcElement(IHTMLEventObj *iface, IHTMLEle
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
NULL
;
if
(
This
->
event
&&
This
->
event
->
target
)
IDispatchEx_QueryInterface
(
&
This
->
event
->
target
->
dispex
.
IDispatchEx_iface
,
&
IID_IHTMLElement
,
(
void
**
)
p
);
return
S_OK
;
if
(
!
This
->
event
)
{
*
p
=
NULL
;
return
S_OK
;
}
return
IDOMEvent_get_srcElement
(
&
This
->
event
->
IDOMEvent_iface
,
p
);
}
static
HRESULT
WINAPI
HTMLEventObj_get_altKey
(
IHTMLEventObj
*
iface
,
VARIANT_BOOL
*
p
)
...
...
@@ -1167,8 +1169,14 @@ static HRESULT WINAPI DOMEvent_get_cancelBubble(IDOMEvent *iface, VARIANT_BOOL *
static
HRESULT
WINAPI
DOMEvent_get_srcElement
(
IDOMEvent
*
iface
,
IHTMLElement
**
p
)
{
DOMEvent
*
This
=
impl_from_IDOMEvent
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
target
)
IDispatchEx_QueryInterface
(
&
This
->
target
->
dispex
.
IDispatchEx_iface
,
&
IID_IHTMLElement
,
(
void
**
)
p
);
else
*
p
=
NULL
;
return
S_OK
;
}
static
const
IDOMEventVtbl
DOMEventVtbl
=
{
...
...
dlls/mshtml/tests/events.js
View file @
07954f36
...
...
@@ -469,6 +469,7 @@ function test_dispatch_event() {
return
function
(
event
)
{
ok
(
event
===
e
,
"event != e"
);
ok
(
event
.
target
===
child
,
"target != child"
);
ok
(
event
.
srcElement
===
child
,
"srcElement != child"
);
calls
+=
msg
+
","
;
};
}
...
...
@@ -485,12 +486,14 @@ function test_dispatch_event() {
e
=
document
.
createEvent
(
"Event"
);
e
.
initEvent
(
"click"
,
true
,
true
);
ok
(
e
.
target
===
null
,
"e.target != null"
);
ok
(
e
.
srcElement
===
null
,
"e.srcElement != null"
);
calls
=
""
;
child
.
dispatchEvent
(
e
);
ok
(
calls
===
"parent.click(capture),child.click(capture),child.click(bubble),"
+
"parent.click(bubble),"
,
"calls = "
+
calls
);
ok
(
e
.
target
===
child
,
"e.target != child"
);
ok
(
e
.
srcElement
===
child
,
"e.srcElement != child"
);
ok
(
e
.
currentTarget
===
null
,
"e.currentTarget != null"
);
e
=
document
.
createEvent
(
"Event"
);
...
...
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