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
ab210dd7
Commit
ab210dd7
authored
Feb 15, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IDOMEvent::stopImmediatePropagation implementaition.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e95db4c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
htmlevent.c
dlls/mshtml/htmlevent.c
+8
-3
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-0
events.js
dlls/mshtml/tests/events.js
+20
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
ab210dd7
...
...
@@ -1051,8 +1051,12 @@ static HRESULT WINAPI DOMEvent_stopPropagation(IDOMEvent *iface)
static
HRESULT
WINAPI
DOMEvent_stopImmediatePropagation
(
IDOMEvent
*
iface
)
{
DOMEvent
*
This
=
impl_from_IDOMEvent
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p)
\n
"
,
This
);
This
->
stop_immediate_propagation
=
This
->
stop_propagation
=
TRUE
;
nsIDOMEvent_StopImmediatePropagation
(
This
->
nsevent
);
return
S_OK
;
}
static
HRESULT
WINAPI
DOMEvent_get_isTrusted
(
IDOMEvent
*
iface
,
VARIANT_BOOL
*
p
)
...
...
@@ -2210,7 +2214,8 @@ static void call_event_handlers(EventTarget *event_target, DOMEvent *event, disp
}
}
for
(
listener
=
listeners
;
listener
<
listeners
+
listeners_cnt
;
listener
++
)
{
for
(
listener
=
listeners
;
!
event
->
stop_immediate_propagation
&&
listener
<
listeners
+
listeners_cnt
;
listener
++
)
{
if
(
listener
->
type
!=
LISTENER_TYPE_ATTACHED
)
{
DISPID
named_arg
=
DISPID_THIS
;
VARIANTARG
args
[
2
];
...
...
dlls/mshtml/htmlevent.h
View file @
ab210dd7
...
...
@@ -79,6 +79,7 @@ typedef struct {
BOOL
cancelable
;
BOOL
prevent_default
;
BOOL
stop_propagation
;
BOOL
stop_immediate_propagation
;
DOM_EVENT_PHASE
phase
;
IHTMLEventObj
*
event_obj
;
...
...
dlls/mshtml/tests/events.js
View file @
ab210dd7
...
...
@@ -251,9 +251,19 @@ function test_stop_propagation() {
ok
(
e
.
defaultPrevented
===
false
,
"defaultPrevented = "
+
e
.
defaultPrevented
);
}
function
stop_immediate_propagation
(
e
)
{
calls
+=
"immediateStop,"
;
e
.
stopImmediatePropagation
();
ok
(
e
.
bubbles
===
true
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
cancelable
===
true
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
defaultPrevented
===
false
,
"defaultPrevented = "
+
e
.
defaultPrevented
);
}
div1
.
addEventListener
(
"click"
,
stop_immediate_propagation
,
true
);
div1
.
addEventListener
(
"click"
,
stop_propagation
,
true
);
div1
.
addEventListener
(
"click"
,
record_call
(
"div1.click(capture)"
),
true
);
div2
.
addEventListener
(
"click"
,
stop_immediate_propagation
,
true
);
div2
.
addEventListener
(
"click"
,
stop_propagation
,
true
);
div2
.
addEventListener
(
"click"
,
record_call
(
"div2.click(capture)"
),
true
);
...
...
@@ -265,11 +275,21 @@ function test_stop_propagation() {
calls
=
""
;
div2
.
click
();
ok
(
calls
===
"immediateStop,"
,
"calls = "
+
calls
);
div1
.
removeEventListener
(
"click"
,
stop_immediate_propagation
,
true
);
calls
=
""
;
div2
.
click
();
ok
(
calls
===
"stop,div1.click(capture),"
,
"calls = "
+
calls
);
div1
.
removeEventListener
(
"click"
,
stop_propagation
,
true
);
calls
=
""
;
div2
.
click
();
ok
(
calls
===
"div1.click(capture),immediateStop,"
,
"calls = "
+
calls
);
div2
.
removeEventListener
(
"click"
,
stop_immediate_propagation
,
true
);
calls
=
""
;
div2
.
click
();
ok
(
calls
===
"div1.click(capture),stop,div2.click(capture),stop,div2.click(bubble),"
,
"calls = "
+
calls
);
...
...
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