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
05dc7eac
Commit
05dc7eac
authored
Sep 13, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDocument4::fireEvent implementation.
parent
fae1fff8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
9 deletions
+37
-9
htmldoc3.c
dlls/mshtml/htmldoc3.c
+4
-2
htmlevent.c
dlls/mshtml/htmlevent.c
+4
-7
events.html
dlls/mshtml/tests/events.html
+29
-0
No files found.
dlls/mshtml/htmldoc3.c
View file @
05dc7eac
...
@@ -777,8 +777,10 @@ static HRESULT WINAPI HTMLDocument4_fireEvent(IHTMLDocument4 *iface, BSTR bstrEv
...
@@ -777,8 +777,10 @@ static HRESULT WINAPI HTMLDocument4_fireEvent(IHTMLDocument4 *iface, BSTR bstrEv
VARIANT
*
pvarEventObject
,
VARIANT_BOOL
*
pfCanceled
)
VARIANT
*
pvarEventObject
,
VARIANT_BOOL
*
pfCanceled
)
{
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument4
(
iface
);
HTMLDocument
*
This
=
impl_from_IHTMLDocument4
(
iface
);
FIXME
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
bstrEventName
),
pvarEventObject
,
pfCanceled
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
bstrEventName
),
pvarEventObject
,
pfCanceled
);
return
dispatch_event
(
&
This
->
doc_node
->
node
,
bstrEventName
,
pvarEventObject
,
pfCanceled
);
}
}
static
HRESULT
WINAPI
HTMLDocument4_createRenderStyle
(
IHTMLDocument4
*
iface
,
BSTR
v
,
static
HRESULT
WINAPI
HTMLDocument4_createRenderStyle
(
IHTMLDocument4
*
iface
,
BSTR
v
,
...
...
dlls/mshtml/htmlevent.c
View file @
05dc7eac
...
@@ -364,13 +364,10 @@ static HRESULT WINAPI HTMLEventObj_get_srcElement(IHTMLEventObj *iface, IHTMLEle
...
@@ -364,13 +364,10 @@ static HRESULT WINAPI HTMLEventObj_get_srcElement(IHTMLEventObj *iface, IHTMLEle
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
target
)
{
*
p
=
NULL
;
*
p
=
NULL
;
if
(
This
->
target
)
return
S_OK
;
IHTMLDOMNode_QueryInterface
(
&
This
->
target
->
IHTMLDOMNode_iface
,
&
IID_IHTMLElement
,
(
void
**
)
p
);
}
return
S_OK
;
return
IHTMLDOMNode_QueryInterface
(
&
This
->
target
->
IHTMLDOMNode_iface
,
&
IID_IHTMLElement
,
(
void
**
)
p
);
}
}
static
HRESULT
WINAPI
HTMLEventObj_get_altKey
(
IHTMLEventObj
*
iface
,
VARIANT_BOOL
*
p
)
static
HRESULT
WINAPI
HTMLEventObj_get_altKey
(
IHTMLEventObj
*
iface
,
VARIANT_BOOL
*
p
)
...
...
dlls/mshtml/tests/events.html
View file @
05dc7eac
...
@@ -20,6 +20,16 @@ function ondataavailable_test() {
...
@@ -20,6 +20,16 @@ function ondataavailable_test() {
ok
(
evobj
.
type
===
"dataavailable"
,
"evobj.type = "
+
evobj
.
type
);
ok
(
evobj
.
type
===
"dataavailable"
,
"evobj.type = "
+
evobj
.
type
);
}
}
function
ondataavailableDocHandler
()
{
b
=
true
;
ok
(
window
.
event
===
evobj
,
"window.event != evobj"
);
ok
(
evobj
.
srcElement
===
null
,
"evobj.srcElement = "
+
evobj
.
srcElement
);
ok
(
evobj
.
fromElement
===
null
,
"evobj.srcElement = "
+
evobj
.
fromElement
);
ok
(
evobj
.
toElement
===
null
,
"evobj.srcElement = "
+
evobj
.
toElement
);
ok
(
evobj
.
type
===
"dataavailable"
,
"evobj.type = "
+
evobj
.
type
);
}
div
.
attachEvent
(
"ondataavailable"
,
ondataavailableHandler
);
div
.
attachEvent
(
"ondataavailable"
,
ondataavailableHandler
);
evobj
=
document
.
createEventObject
();
evobj
=
document
.
createEventObject
();
...
@@ -33,6 +43,25 @@ function ondataavailable_test() {
...
@@ -33,6 +43,25 @@ function ondataavailable_test() {
ok
(
evobj
.
srcElement
===
div
,
"evobj.srcElement = "
+
evobj
.
srcElement
);
ok
(
evobj
.
srcElement
===
div
,
"evobj.srcElement = "
+
evobj
.
srcElement
);
ok
(
evobj
.
type
===
"dataavailable"
,
"evobj.type = "
+
evobj
.
type
);
ok
(
evobj
.
type
===
"dataavailable"
,
"evobj.type = "
+
evobj
.
type
);
div
.
detachEvent
(
"ondataavailable"
,
ondataavailableHandler
);
b
=
false
;
div
.
fireEvent
(
"ondataavailable"
,
evobj
);
ok
(
!
b
,
"ondataavailable handler called?"
);
ok
(
evobj
.
srcElement
===
div
,
"evobj.srcElement = "
+
evobj
.
srcElement
);
ok
(
evobj
.
type
===
"dataavailable"
,
"evobj.type = "
+
evobj
.
type
);
document
.
attachEvent
(
"ondataavailable"
,
ondataavailableDocHandler
);
evobj
=
document
.
createEventObject
();
document
.
fireEvent
(
"ondataavailable"
,
evobj
);
ok
(
b
,
"ondataavailable handler not called?"
);
ok
(
evobj
.
srcElement
===
null
,
"evobj.srcElement = "
+
evobj
.
srcElement
);
ok
(
evobj
.
type
===
"dataavailable"
,
"evobj.type = "
+
evobj
.
type
);
}
}
function
runTests
()
{
function
runTests
()
{
...
...
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