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
4678a859
Commit
4678a859
authored
Dec 01, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IDOMEvent::get_bubbles implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1508eb48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
htmlevent.c
dlls/mshtml/htmlevent.c
+8
-6
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-0
events.c
dlls/mshtml/tests/events.c
+6
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
4678a859
...
...
@@ -976,8 +976,11 @@ static HRESULT WINAPI DOMEvent_Invoke(IDOMEvent *iface, DISPID dispIdMember,
static
HRESULT
WINAPI
DOMEvent_get_bubbles
(
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
->
bubbles
);
return
S_OK
;
}
static
HRESULT
WINAPI
DOMEvent_get_cancelable
(
IDOMEvent
*
iface
,
VARIANT_BOOL
*
p
)
...
...
@@ -1164,6 +1167,7 @@ static DOMEvent *alloc_event(nsIDOMEvent *nsevent, eventid_t event_id)
IDOMEvent_Release
(
&
event
->
IDOMEvent_iface
);
return
NULL
;
}
event
->
bubbles
=
(
event_info
[
event_id
].
flags
&
EVENT_BUBBLES
)
!=
0
;
}
nsIDOMEvent_AddRef
(
event
->
nsevent
=
nsevent
);
return
event
;
...
...
@@ -1523,7 +1527,6 @@ void dispatch_event(EventTarget *event_target, DOMEvent *event)
HTMLEventObj
*
event_obj_ref
=
NULL
;
IHTMLEventObj
*
prev_event
=
NULL
;
EventTarget
*
iter
;
DWORD
event_flags
;
HRESULT
hres
;
if
(
event
->
event_id
==
EVENTID_LAST
)
{
...
...
@@ -1533,7 +1536,6 @@ void dispatch_event(EventTarget *event_target, DOMEvent *event)
TRACE
(
"(%p) %s
\n
"
,
event_target
,
debugstr_w
(
event
->
type
));
event_flags
=
event_info
[
event
->
event_id
].
flags
;
iter
=
event_target
;
IDispatchEx_AddRef
(
&
event_target
->
dispex
.
IDispatchEx_iface
);
...
...
@@ -1587,7 +1589,7 @@ void dispatch_event(EventTarget *event_target, DOMEvent *event)
call_event_handlers
(
target_chain
[
0
],
event
);
}
if
(
event
_flags
&
EVENT_BUBBLES
)
{
if
(
event
->
bubbles
)
{
event
->
phase
=
DEP_BUBBLING_PHASE
;
for
(
i
=
1
;
!
event
->
stop_propagation
&&
i
<
chain_cnt
;
i
++
)
call_event_handlers
(
target_chain
[
i
],
event
);
...
...
@@ -1599,7 +1601,7 @@ void dispatch_event(EventTarget *event_target, DOMEvent *event)
IHTMLEventObj_Release
(
prev_event
);
}
if
(
event
_flags
&
EVENT_HASDEFAULTHANDLERS
)
{
if
(
event
->
event_id
!=
EVENTID_LAST
&&
(
event_info
[
event
->
event_id
].
flags
&
EVENT_HASDEFAULTHANDLERS
)
)
{
for
(
i
=
0
;
!
event
->
prevent_default
&&
i
<
chain_cnt
;
i
++
)
{
BOOL
prevent_default
=
FALSE
;
vtbl
=
dispex_get_vtbl
(
&
target_chain
[
i
]
->
dispex
);
...
...
dlls/mshtml/htmlevent.h
View file @
4678a859
...
...
@@ -66,6 +66,7 @@ typedef struct {
eventid_t
event_id
;
WCHAR
*
type
;
EventTarget
*
target
;
BOOL
bubbles
;
BOOL
prevent_default
;
BOOL
stop_propagation
;
DOM_EVENT_PHASE
phase
;
...
...
dlls/mshtml/tests/events.c
View file @
4678a859
...
...
@@ -2668,6 +2668,7 @@ static void test_create_event(IHTMLDocument2 *doc)
{
IDocumentEvent
*
doc_event
;
IDOMEvent
*
event
;
VARIANT_BOOL
b
;
USHORT
phase
;
BSTR
str
;
HRESULT
hres
;
...
...
@@ -2698,6 +2699,11 @@ static void test_create_event(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
ok
(
!
str
,
"type = %s
\n
"
,
wine_dbgstr_w
(
str
));
b
=
0xdead
;
hres
=
IDOMEvent_get_bubbles
(
event
,
&
b
);
ok
(
hres
==
S_OK
,
"get_bubbles failed: %08x
\n
"
,
hres
);
ok
(
!
b
,
"bubbles = %x
\n
"
,
b
);
IDOMEvent_Release
(
event
);
IDocumentEvent_Release
(
doc_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