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
4f358c40
Commit
4f358c40
authored
Apr 22, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IDOMEvent::isTrusted implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8dd582eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
htmlevent.c
dlls/mshtml/htmlevent.c
+7
-2
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-0
events.js
dlls/mshtml/tests/events.js
+4
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
4f358c40
...
...
@@ -1058,8 +1058,11 @@ static HRESULT WINAPI DOMEvent_stopImmediatePropagation(IDOMEvent *iface)
static
HRESULT
WINAPI
DOMEvent_get_isTrusted
(
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
->
trusted
);
return
S_OK
;
}
static
HRESULT
WINAPI
DOMEvent_put_cancelBubble
(
IDOMEvent
*
iface
,
VARIANT_BOOL
v
)
...
...
@@ -2294,6 +2297,7 @@ HRESULT create_event_from_nsevent(nsIDOMEvent *nsevent, compat_mode_t compat_mod
if
(
!
event
)
return
E_OUTOFMEMORY
;
event
->
trusted
=
TRUE
;
*
ret_event
=
event
;
return
S_OK
;
}
...
...
@@ -2342,6 +2346,7 @@ HRESULT create_document_event(HTMLDocumentNode *doc, eventid_t event_id, DOMEven
return
E_OUTOFMEMORY
;
event
->
event_id
=
event_id
;
event
->
trusted
=
TRUE
;
*
ret_event
=
event
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlevent.h
View file @
4f358c40
...
...
@@ -86,6 +86,7 @@ typedef struct DOMEvent {
BOOL
prevent_default
;
BOOL
stop_propagation
;
BOOL
stop_immediate_propagation
;
BOOL
trusted
;
DOM_EVENT_PHASE
phase
;
IHTMLEventObj
*
event_obj
;
...
...
dlls/mshtml/tests/events.js
View file @
4f358c40
...
...
@@ -316,6 +316,7 @@ sync_test("prevent_default", function() {
a
.
addEventListener
(
"click"
,
function
(
e
)
{
calls
+=
"a,"
;
ok
(
e
.
defaultPrevented
===
true
,
"e.defaultPrevented = "
+
e
.
defaultPrevented
);
ok
(
e
.
isTrusted
===
true
,
"isTrusted = "
+
e
.
isTrusted
);
},
true
);
calls
=
""
;
...
...
@@ -386,12 +387,14 @@ sync_test("init_event", function() {
ok
(
e
.
type
===
""
,
"type = "
+
e
.
type
);
ok
(
e
.
cancelable
===
false
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
bubbles
===
false
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
isTrusted
===
false
,
"isTrusted = "
+
e
.
isTrusted
);
e
.
initEvent
(
"test"
,
true
,
false
);
ok
(
e
.
type
===
"test"
,
"type = "
+
e
.
type
);
ok
(
e
.
cancelable
===
false
,
"cancelable = "
+
e
.
cancelable
);
ok
(
e
.
bubbles
===
true
,
"bubbles = "
+
e
.
bubbles
);
ok
(
e
.
defaultPrevented
===
false
,
"defaultPrevented = "
+
e
.
defaultPrevented
);
ok
(
e
.
isTrusted
===
false
,
"isTrusted = "
+
e
.
isTrusted
);
e
.
preventDefault
();
ok
(
e
.
defaultPrevented
===
false
,
"defaultPrevented = "
+
e
.
defaultPrevented
);
...
...
@@ -406,6 +409,7 @@ sync_test("init_event", function() {
elem
.
addEventListener
(
"NewTest"
,
function
(
event
)
{
ok
(
e
===
event
,
"e != event"
);
ok
(
e
.
isTrusted
===
false
,
"isTrusted = "
+
e
.
isTrusted
);
e
.
preventDefault
();
ok
(
e
.
defaultPrevented
===
true
,
"defaultPrevented = "
+
e
.
defaultPrevented
);
...
...
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