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
20159346
Commit
20159346
authored
Feb 06, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Expose IHTMLUIEvent to scripts.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
18ae7c7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
3 deletions
+54
-3
htmlevent.c
dlls/mshtml/htmlevent.c
+16
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
events.js
dlls/mshtml/tests/events.js
+36
-2
No files found.
dlls/mshtml/htmlevent.c
View file @
20159346
...
...
@@ -1647,8 +1647,21 @@ static dispex_static_data_t DOMEvent_dispex = {
DOMEvent_iface_tids
};
static
const
tid_t
DOMUIEvent_iface_tids
[]
=
{
IDOMEvent_tid
,
IDOMUIEvent_tid
,
0
};
static
dispex_static_data_t
DOMUIEvent_dispex
=
{
NULL
,
DispDOMUIEvent_tid
,
DOMUIEvent_iface_tids
};
static
const
tid_t
DOMMouseEvent_iface_tids
[]
=
{
IDOMEvent_tid
,
IDOMUIEvent_tid
,
IDOMMouseEvent_tid
,
0
};
...
...
@@ -1694,7 +1707,9 @@ static DOMEvent *alloc_event(nsIDOMEvent *nsevent, eventid_t event_id)
-
time_epoch
;
nsres
=
nsIDOMEvent_QueryInterface
(
nsevent
,
&
IID_nsIDOMUIEvent
,
(
void
**
)
&
event
->
ui_event
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_SUCCEEDED
(
nsres
))
dispex_data
=
&
DOMUIEvent_dispex
;
else
event
->
ui_event
=
NULL
;
nsres
=
nsIDOMEvent_QueryInterface
(
nsevent
,
&
IID_nsIDOMMouseEvent
,
(
void
**
)
&
event
->
mouse_event
);
...
...
dlls/mshtml/mshtml_private.h
View file @
20159346
...
...
@@ -82,6 +82,7 @@ typedef struct EventTarget EventTarget;
XDIID(DispDOMChildrenCollection) \
XDIID(DispDOMEvent) \
XDIID(DispDOMMouseEvent) \
XDIID(DispDOMUIEvent) \
XDIID(DispHTMLAnchorElement) \
XDIID(DispHTMLAreaElement) \
XDIID(DispHTMLAttributeCollection) \
...
...
@@ -130,6 +131,7 @@ typedef struct EventTarget EventTarget;
XDIID(HTMLElementEvents2) \
XIID(IDOMEvent) \
XIID(IDOMMouseEvent) \
XIID(IDOMUIEvent) \
XIID(IDocumentEvent) \
XIID(IDocumentSelector) \
XIID(IElementSelector) \
...
...
dlls/mshtml/tests/events.js
View file @
20159346
...
...
@@ -610,6 +610,7 @@ function test_mouse_event() {
ok
(
e
.
type
===
"test"
,
"type = "
+
e
.
type
);
ok
(
e
.
cancelable
===
true
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
bubbles
===
true
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
detail
===
1
,
"detail = "
+
e
.
detail
);
ok
(
e
.
screenX
===
2
,
"screenX = "
+
e
.
screenX
);
ok
(
e
.
screenY
===
3
,
"screenY = "
+
e
.
screenY
);
ok
(
e
.
clientX
===
4
,
"clientX = "
+
e
.
clientX
);
...
...
@@ -624,6 +625,7 @@ function test_mouse_event() {
ok
(
e
.
type
===
"test"
,
"type = "
+
e
.
type
);
ok
(
e
.
cancelable
===
false
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
bubbles
===
false
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
detail
===
9
,
"detail = "
+
e
.
detail
);
ok
(
e
.
screenX
===
8
,
"screenX = "
+
e
.
screenX
);
ok
(
e
.
screenY
===
7
,
"screenY = "
+
e
.
screenY
);
ok
(
e
.
clientX
===
6
,
"clientX = "
+
e
.
clientX
);
...
...
@@ -638,6 +640,7 @@ function test_mouse_event() {
ok
(
e
.
type
===
"testevent"
,
"type = "
+
e
.
type
);
ok
(
e
.
cancelable
===
true
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
bubbles
===
true
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
detail
===
9
,
"detail = "
+
e
.
detail
);
ok
(
e
.
screenX
===
8
,
"screenX = "
+
e
.
screenX
);
ok
(
e
.
screenY
===
7
,
"screenY = "
+
e
.
screenY
);
ok
(
e
.
clientX
===
6
,
"clientX = "
+
e
.
clientX
);
...
...
@@ -648,6 +651,36 @@ function test_mouse_event() {
ok
(
e
.
metaKey
===
true
,
"metaKey = "
+
e
.
metaKey
);
ok
(
e
.
button
===
127
,
"button = "
+
e
.
button
);
e
.
initUIEvent
(
"testevent"
,
true
,
true
,
window
,
6
);
ok
(
e
.
type
===
"testevent"
,
"type = "
+
e
.
type
);
ok
(
e
.
cancelable
===
true
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
bubbles
===
true
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
detail
===
6
,
"detail = "
+
e
.
detail
);
ok
(
e
.
screenX
===
8
,
"screenX = "
+
e
.
screenX
);
ok
(
e
.
screenY
===
7
,
"screenY = "
+
e
.
screenY
);
ok
(
e
.
clientX
===
6
,
"clientX = "
+
e
.
clientX
);
ok
(
e
.
clientY
===
5
,
"clientY = "
+
e
.
clientY
);
ok
(
e
.
ctrlKey
===
true
,
"ctrlKey = "
+
e
.
ctrlKey
);
ok
(
e
.
altKey
===
true
,
"altKey = "
+
e
.
altKey
);
ok
(
e
.
shiftKey
===
true
,
"shiftKey = "
+
e
.
shiftKey
);
ok
(
e
.
metaKey
===
true
,
"metaKey = "
+
e
.
metaKey
);
ok
(
e
.
button
===
127
,
"button = "
+
e
.
button
);
next_test
();
}
function
test_ui_event
()
{
var
e
;
e
=
document
.
createEvent
(
"UIEvent"
);
ok
(
e
.
detail
===
0
,
"detail = "
+
e
.
detail
);
e
.
initUIEvent
(
"test"
,
true
,
true
,
window
,
3
);
ok
(
e
.
type
===
"test"
,
"type = "
+
e
.
type
);
ok
(
e
.
cancelable
===
true
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
bubbles
===
true
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
detail
===
3
,
"detail = "
+
e
.
detail
);
next_test
();
}
...
...
@@ -663,7 +696,8 @@ var tests = [
test_current_target
,
test_dispatch_event
,
test_recursive_dispatch
,
test_ui_event
,
test_mouse_event
,
test_time_stamp
,
test_listener_order
,
test_mouse_event
test_listener_order
];
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