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
d6bb86e8
Commit
d6bb86e8
authored
Mar 11, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLFrameBase2::onload property implementation.
parent
9c45b34c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
8 deletions
+74
-8
htmlframebase.c
dlls/mshtml/htmlframebase.c
+9
-4
events.c
dlls/mshtml/tests/events.c
+65
-4
No files found.
dlls/mshtml/htmlframebase.c
View file @
d6bb86e8
...
...
@@ -28,6 +28,7 @@
#include "mshtml_private.h"
#include "binding.h"
#include "htmlevent.h"
#include "wine/debug.h"
...
...
@@ -593,15 +594,19 @@ static HRESULT WINAPI HTMLFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface, I
static
HRESULT
WINAPI
HTMLFrameBase2_put_onload
(
IHTMLFrameBase2
*
iface
,
VARIANT
v
)
{
HTMLFrameBase
*
This
=
impl_from_IHTMLFrameBase2
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
set_node_event
(
&
This
->
element
.
node
,
EVENTID_LOAD
,
&
v
);
}
static
HRESULT
WINAPI
HTMLFrameBase2_get_onload
(
IHTMLFrameBase2
*
iface
,
VARIANT
*
p
)
{
HTMLFrameBase
*
This
=
impl_from_IHTMLFrameBase2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_node_event
(
&
This
->
element
.
node
,
EVENTID_LOAD
,
p
);
}
static
HRESULT
WINAPI
HTMLFrameBase2_put_onreadystatechange
(
IHTMLFrameBase2
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/events.c
View file @
d6bb86e8
...
...
@@ -83,6 +83,7 @@ DEFINE_EXPECT(submit_onclick_attached);
DEFINE_EXPECT
(
submit_onclick_attached_check_cancel
);
DEFINE_EXPECT
(
submit_onclick_setret
);
DEFINE_EXPECT
(
elem2_cp_onclick
);
DEFINE_EXPECT
(
iframe_onload
);
static
HWND
container_hwnd
=
NULL
;
static
IHTMLWindow2
*
window
;
...
...
@@ -243,6 +244,18 @@ static IHTMLElement3 *_get_elem3_iface(unsigned line, IUnknown *unk)
return
elem3
;
}
#define get_iframe_iface(u) _get_iframe_iface(__LINE__,u)
static
IHTMLIFrameElement
*
_get_iframe_iface
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLIFrameElement
*
iframe
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLIFrameElement
,
(
void
**
)
&
iframe
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"QueryInterface(IID_IHTMLIFrameElement) failed: %08x
\n
"
,
hres
);
return
iframe
;
}
#define doc_get_body(d) _doc_get_body(__LINE__,d)
static
IHTMLElement
*
_doc_get_body
(
unsigned
line
,
IHTMLDocument2
*
doc
)
{
...
...
@@ -993,6 +1006,17 @@ static HRESULT WINAPI submit_onclick(IDispatchEx *iface, DISPID id, LCID lcid, W
EVENT_HANDLER_FUNC_OBJ
(
submit_onclick
);
static
HRESULT
WINAPI
iframe_onload
(
IDispatchEx
*
iface
,
DISPID
id
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pdp
,
VARIANT
*
pvarRes
,
EXCEPINFO
*
pei
,
IServiceProvider
*
pspCaller
)
{
CHECK_EXPECT
(
iframe_onload
);
test_event_args
(
&
DIID_DispHTMLIFrame
,
id
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
test_event_src
(
"IFRAME"
);
return
S_OK
;
}
EVENT_HANDLER_FUNC_OBJ
(
iframe_onload
);
static
HRESULT
WINAPI
submit_onclick_attached
(
IDispatchEx
*
iface
,
DISPID
id
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pdp
,
VARIANT
*
pvarRes
,
EXCEPINFO
*
pei
,
IServiceProvider
*
pspCaller
)
{
...
...
@@ -2058,6 +2082,8 @@ static void test_submit(IHTMLDocument2 *doc)
CHECK_CALLED
(
submit_onclick_attached_check_cancel
);
CHECK_CALLED
(
submit_onclick_attached
);
if
(
1
)
pump_msgs
(
NULL
);
IHTMLElement_Release
(
submit
);
}
...
...
@@ -2144,16 +2170,21 @@ static IHTMLDocument2* get_iframe_doc(IHTMLIFrameElement *iframe)
static
void
test_iframe_connections
(
IHTMLDocument2
*
doc
)
{
HRESULT
hres
;
IHTMLFrameBase2
*
frame_base2
;
IHTMLIFrameElement
*
iframe
;
IHTMLDocument2
*
iframes_doc
;
DWORD
cookie
;
IConnectionPoint
*
cp
;
IHTMLElement
*
element
=
find_element_by_id
(
doc
,
"ifr"
);
IHTMLElement
*
element
;
VARIANT
v
;
BSTR
str
;
HRESULT
hres
;
trace
(
"iframe tests...
\n
"
);
hres
=
IHTMLElement_QueryInterface
(
element
,
&
IID_IHTMLIFrameElement
,
(
void
**
)
&
iframe
);
element
=
find_element_by_id
(
doc
,
"ifr"
);
iframe
=
get_iframe_iface
((
IUnknown
*
)
element
);
IHTMLElement_Release
(
element
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IHTMLIFrameElement) failed: %08x
\n
"
,
hres
);
iframes_doc
=
get_iframe_doc
(
iframe
);
IHTMLIFrameElement_Release
(
iframe
);
...
...
@@ -2165,6 +2196,36 @@ static void test_iframe_connections(IHTMLDocument2 *doc)
IConnectionPoint_Release
(
cp
);
ok
(
hres
==
CONNECT_E_NOCONNECTION
,
"Unadvise returned %08x, expected CONNECT_E_NOCONNECTION
\n
"
,
hres
);
unregister_cp
((
IUnknown
*
)
iframes_doc
,
&
IID_IDispatch
,
cookie
);
hres
=
IHTMLIFrameElement_QueryInterface
(
iframe
,
&
IID_IHTMLFrameBase2
,
(
void
**
)
&
frame_base2
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLFrameBase2 iface: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_DISPATCH
;
V_DISPATCH
(
&
v
)
=
(
IDispatch
*
)
&
iframe_onload_obj
;
hres
=
IHTMLFrameBase2_put_onload
(
frame_base2
,
v
);
ok
(
hres
==
S_OK
,
"put_onload failed: %08x
\n
"
,
hres
);
IHTMLFrameBase2_Release
(
frame_base2
);
str
=
a2bstr
(
"about:blank"
);
hres
=
IHTMLDocument2_put_URL
(
iframes_doc
,
str
);
ok
(
hres
==
S_OK
,
"put_URL failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
SET_EXPECT
(
iframe_onload
);
pump_msgs
(
&
called_iframe_onload
);
CHECK_CALLED
(
iframe_onload
);
str
=
a2bstr
(
"about:test"
);
hres
=
IHTMLDocument2_put_URL
(
iframes_doc
,
str
);
ok
(
hres
==
S_OK
,
"put_URL failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
SET_EXPECT
(
iframe_onload
);
pump_msgs
(
&
called_iframe_onload
);
CHECK_CALLED
(
iframe_onload
);
IHTMLDocument2_Release
(
iframes_doc
);
}
...
...
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