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
169fde0d
Commit
169fde0d
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 IDOMKeyboardEvent to scripts.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4947c70f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
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
+20
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
169fde0d
...
...
@@ -1924,6 +1924,19 @@ static dispex_static_data_t DOMMouseEvent_dispex = {
DOMMouseEvent_iface_tids
};
static
const
tid_t
DOMKeyboardEvent_iface_tids
[]
=
{
IDOMEvent_tid
,
IDOMUIEvent_tid
,
IDOMKeyboardEvent_tid
,
0
};
static
dispex_static_data_t
DOMKeyboardEvent_dispex
=
{
NULL
,
DispDOMKeyboardEvent_tid
,
DOMKeyboardEvent_iface_tids
};
static
DOMEvent
*
alloc_event
(
nsIDOMEvent
*
nsevent
,
eventid_t
event_id
)
{
dispex_static_data_t
*
dispex_data
=
&
DOMEvent_dispex
;
...
...
@@ -1972,7 +1985,9 @@ static DOMEvent *alloc_event(nsIDOMEvent *nsevent, eventid_t event_id)
event
->
mouse_event
=
NULL
;
nsres
=
nsIDOMEvent_QueryInterface
(
nsevent
,
&
IID_nsIDOMKeyEvent
,
(
void
**
)
&
event
->
keyboard_event
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_SUCCEEDED
(
nsres
))
dispex_data
=
&
DOMKeyboardEvent_dispex
;
else
event
->
keyboard_event
=
NULL
;
init_dispex
(
&
event
->
dispex
,
(
IUnknown
*
)
&
event
->
IDOMEvent_iface
,
dispex_data
);
...
...
dlls/mshtml/mshtml_private.h
View file @
169fde0d
...
...
@@ -81,6 +81,7 @@ typedef struct EventTarget EventTarget;
XDIID(DispCPlugins) \
XDIID(DispDOMChildrenCollection) \
XDIID(DispDOMEvent) \
XDIID(DispDOMKeyboardEvent) \
XDIID(DispDOMMouseEvent) \
XDIID(DispDOMUIEvent) \
XDIID(DispHTMLAnchorElement) \
...
...
@@ -130,6 +131,7 @@ typedef struct EventTarget EventTarget;
XDIID(HTMLDocumentEvents) \
XDIID(HTMLElementEvents2) \
XIID(IDOMEvent) \
XIID(IDOMKeyboardEvent) \
XIID(IDOMMouseEvent) \
XIID(IDOMUIEvent) \
XIID(IDocumentEvent) \
...
...
dlls/mshtml/tests/events.js
View file @
169fde0d
...
...
@@ -684,6 +684,25 @@ function test_ui_event() {
next_test
();
}
function
test_keyboard_event
()
{
var
e
;
e
=
document
.
createEvent
(
"KeyboardEvent"
);
e
.
initEvent
(
"test"
,
true
,
true
);
ok
(
e
.
key
===
""
,
"key = "
+
e
.
key
);
ok
(
e
.
keyCode
===
0
,
"keyCode = "
+
e
.
keyCode
);
ok
(
e
.
charCode
===
0
,
"charCode = "
+
e
.
charCode
);
ok
(
e
.
repeat
===
false
,
"repeat = "
+
e
.
repeat
);
ok
(
e
.
ctrlKey
===
false
,
"ctrlKey = "
+
e
.
ctrlKey
);
ok
(
e
.
altKey
===
false
,
"altKey = "
+
e
.
altKey
);
ok
(
e
.
shiftKey
===
false
,
"shiftKey = "
+
e
.
shiftKey
);
ok
(
e
.
metaKey
===
false
,
"metaKey = "
+
e
.
metaKey
);
ok
(
e
.
detail
===
0
,
"detail = "
+
e
.
detail
);
next_test
();
}
var
tests
=
[
test_content_loaded
,
test_add_remove_listener
,
...
...
@@ -698,6 +717,7 @@ var tests = [
test_recursive_dispatch
,
test_ui_event
,
test_mouse_event
,
test_keyboard_event
,
test_time_stamp
,
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