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
85527dbd
Commit
85527dbd
authored
Oct 24, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IDOMEvent:get_eventPhase implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
caa3c432
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
5 deletions
+26
-5
htmlevent.c
dlls/mshtml/htmlevent.c
+11
-5
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-0
events.c
dlls/mshtml/tests/events.c
+6
-0
mshtml.idl
include/mshtml.idl
+8
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
85527dbd
...
@@ -938,8 +938,11 @@ static HRESULT WINAPI DOMEvent_get_defaultPrevented(IDOMEvent *iface, VARIANT_BO
...
@@ -938,8 +938,11 @@ static HRESULT WINAPI DOMEvent_get_defaultPrevented(IDOMEvent *iface, VARIANT_BO
static
HRESULT
WINAPI
DOMEvent_get_eventPhase
(
IDOMEvent
*
iface
,
USHORT
*
p
)
static
HRESULT
WINAPI
DOMEvent_get_eventPhase
(
IDOMEvent
*
iface
,
USHORT
*
p
)
{
{
DOMEvent
*
This
=
impl_from_IDOMEvent
(
iface
);
DOMEvent
*
This
=
impl_from_IDOMEvent
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
This
->
phase
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
DOMEvent_get_target
(
IDOMEvent
*
iface
,
IEventTarget
**
p
)
static
HRESULT
WINAPI
DOMEvent_get_target
(
IDOMEvent
*
iface
,
IEventTarget
**
p
)
...
@@ -1434,10 +1437,13 @@ void dispatch_event(EventTarget *event_target, DOMEvent *event)
...
@@ -1434,10 +1437,13 @@ void dispatch_event(EventTarget *event_target, DOMEvent *event)
event
->
target
=
event_target
;
event
->
target
=
event_target
;
IDispatchEx_AddRef
(
&
event_target
->
dispex
.
IDispatchEx_iface
);
IDispatchEx_AddRef
(
&
event_target
->
dispex
.
IDispatchEx_iface
);
for
(
i
=
0
;
i
<
chain_cnt
;
i
++
)
{
event
->
phase
=
DEP_AT_TARGET
;
call_event_handlers
(
target_chain
[
0
],
event
);
if
(
event_flags
&
EVENT_BUBBLES
)
{
event
->
phase
=
DEP_BUBBLING_PHASE
;
for
(
i
=
1
;
!
event
->
stop_propagation
&&
i
<
chain_cnt
;
i
++
)
call_event_handlers
(
target_chain
[
i
],
event
);
call_event_handlers
(
target_chain
[
i
],
event
);
if
(
!
(
event_flags
&
EVENT_BUBBLES
)
||
event
->
stop_propagation
)
break
;
}
}
if
(
target_vtbl
&&
target_vtbl
->
set_current_event
)
{
if
(
target_vtbl
&&
target_vtbl
->
set_current_event
)
{
...
...
dlls/mshtml/htmlevent.h
View file @
85527dbd
...
@@ -66,6 +66,7 @@ typedef struct {
...
@@ -66,6 +66,7 @@ typedef struct {
EventTarget
*
target
;
EventTarget
*
target
;
BOOL
prevent_default
;
BOOL
prevent_default
;
BOOL
stop_propagation
;
BOOL
stop_propagation
;
USHORT
phase
;
IHTMLEventObj
*
event_obj
;
IHTMLEventObj
*
event_obj
;
BOOL
no_event_obj
;
BOOL
no_event_obj
;
...
...
dlls/mshtml/tests/events.c
View file @
85527dbd
...
@@ -2534,6 +2534,7 @@ static void test_create_event(IHTMLDocument2 *doc)
...
@@ -2534,6 +2534,7 @@ static void test_create_event(IHTMLDocument2 *doc)
{
{
IDocumentEvent
*
doc_event
;
IDocumentEvent
*
doc_event
;
IDOMEvent
*
event
;
IDOMEvent
*
event
;
USHORT
phase
;
BSTR
str
;
BSTR
str
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -2547,6 +2548,11 @@ static void test_create_event(IHTMLDocument2 *doc)
...
@@ -2547,6 +2548,11 @@ static void test_create_event(IHTMLDocument2 *doc)
SysFreeString
(
str
);
SysFreeString
(
str
);
ok
(
hres
==
S_OK
,
"createEvent failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"createEvent failed: %08x
\n
"
,
hres
);
phase
=
0xdead
;
hres
=
IDOMEvent_get_eventPhase
(
event
,
&
phase
);
ok
(
hres
==
S_OK
,
"get_eventPhase failed: %08x
\n
"
,
hres
);
ok
(
!
phase
,
"phase = %u
\n
"
,
phase
);
hres
=
IDOMEvent_preventDefault
(
event
);
hres
=
IDOMEvent_preventDefault
(
event
);
ok
(
hres
==
S_OK
,
"preventDefault failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"preventDefault failed: %08x
\n
"
,
hres
);
...
...
include/mshtml.idl
View file @
85527dbd
...
@@ -20031,6 +20031,14 @@ interface IEventTarget : IDispatch
...
@@ -20031,6 +20031,14 @@ interface IEventTarget : IDispatch
[
out
,
retval
]
VARIANT_BOOL
*
pfResult
)
;
[
out
,
retval
]
VARIANT_BOOL
*
pfResult
)
;
}
}
typedef
enum
_DOM_EVENT_PHASE
{
DEP_CAPTURING_PHASE
=
1
,
DEP_AT_TARGET
=
2
,
DEP_BUBBLING_PHASE
=
3
,
DOM_EVENT_PHASE_Max
=
0
x7fffffff
}
DOM_EVENT_PHASE
;
/*****************************************************************************
/*****************************************************************************
*
IDOMEvent
interface
*
IDOMEvent
interface
*/
*/
...
...
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