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
bbffabf1
Commit
bbffabf1
authored
Nov 02, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IDOMEvent::get_defaultPrevented implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0bff85cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
htmlevent.c
dlls/mshtml/htmlevent.c
+5
-2
events.js
dlls/mshtml/tests/events.js
+26
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
bbffabf1
...
...
@@ -995,8 +995,11 @@ static HRESULT WINAPI DOMEvent_get_currentTarget(IDOMEvent *iface, IEventTarget
static
HRESULT
WINAPI
DOMEvent_get_defaultPrevented
(
IDOMEvent
*
iface
,
VARIANT_BOOL
*
p
)
{
DOMEvent
*
This
=
impl_from_IDOMEvent
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
variant_bool
(
This
->
prevent_default
);
return
S_OK
;
}
static
HRESULT
WINAPI
DOMEvent_get_eventPhase
(
IDOMEvent
*
iface
,
USHORT
*
p
)
...
...
dlls/mshtml/tests/events.js
View file @
bbffabf1
...
...
@@ -267,6 +267,31 @@ function test_stop_propagation() {
next_test
();
}
function
test_prevent_default
()
{
document
.
body
.
innerHTML
=
'<div><a href="about:blank"></a></div>'
;
var
div
=
document
.
body
.
firstChild
;
var
a
=
div
.
firstChild
;
var
calls
;
div
.
addEventListener
(
"click"
,
function
(
e
)
{
calls
+=
"div,"
;
ok
(
e
.
defaultPrevented
===
false
,
"e.defaultPrevented = "
+
e
.
defaultPrevented
);
e
.
preventDefault
();
ok
(
e
.
defaultPrevented
===
true
,
"e.defaultPrevented = "
+
e
.
defaultPrevented
);
},
true
);
a
.
addEventListener
(
"click"
,
function
(
e
)
{
calls
+=
"a,"
;
ok
(
e
.
defaultPrevented
===
true
,
"e.defaultPrevented = "
+
e
.
defaultPrevented
);
},
true
);
calls
=
""
;
a
.
click
();
ok
(
calls
===
"div,a,"
,
"calls = "
+
calls
);
next_test
();
}
var
tests
=
[
test_content_loaded
,
test_add_remove_listener
,
...
...
@@ -274,5 +299,6 @@ var tests = [
test_remove_listener_in_listener
,
test_event_phase
,
test_stop_propagation
,
test_prevent_default
,
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