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
3f63a296
Commit
3f63a296
authored
Nov 16, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Nov 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLWindow2::get_top.
parent
38d44e0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
8 deletions
+37
-8
htmlwindow.c
dlls/mshtml/htmlwindow.c
+10
-3
dom.c
dlls/mshtml/tests/dom.c
+27
-5
No files found.
dlls/mshtml/htmlwindow.c
View file @
3f63a296
...
@@ -730,9 +730,16 @@ static HRESULT WINAPI HTMLWindow2_get_self(IHTMLWindow2 *iface, IHTMLWindow2 **p
...
@@ -730,9 +730,16 @@ static HRESULT WINAPI HTMLWindow2_get_self(IHTMLWindow2 *iface, IHTMLWindow2 **p
static
HRESULT
WINAPI
HTMLWindow2_get_top
(
IHTMLWindow2
*
iface
,
IHTMLWindow2
**
p
)
static
HRESULT
WINAPI
HTMLWindow2_get_top
(
IHTMLWindow2
*
iface
,
IHTMLWindow2
**
p
)
{
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
),
*
curr
;
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
curr
=
This
;
while
(
curr
->
parent
)
curr
=
curr
->
parent
;
*
p
=
HTMLWINDOW2
(
curr
);
IHTMLWindow2_AddRef
(
*
p
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLWindow2_get_window
(
IHTMLWindow2
*
iface
,
IHTMLWindow2
**
p
)
static
HRESULT
WINAPI
HTMLWindow2_get_window
(
IHTMLWindow2
*
iface
,
IHTMLWindow2
**
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
3f63a296
...
@@ -5601,8 +5601,8 @@ static void test_cond_comment(IHTMLDocument2 *doc)
...
@@ -5601,8 +5601,8 @@ static void test_cond_comment(IHTMLDocument2 *doc)
static
void
test_frame
(
IDispatch
*
disp
,
const
char
*
exp_id
)
static
void
test_frame
(
IDispatch
*
disp
,
const
char
*
exp_id
)
{
{
IHTMLWindow2
*
frame2
,
*
parent
;
IHTMLWindow2
*
frame2
,
*
parent
,
*
top
;
IHTMLDocument2
*
parent_doc
;
IHTMLDocument2
*
parent_doc
,
*
top_doc
;
IHTMLWindow4
*
frame
;
IHTMLWindow4
*
frame
;
IHTMLFrameBase
*
frame_elem
;
IHTMLFrameBase
*
frame_elem
;
IHTMLElement
*
html_elem
;
IHTMLElement
*
html_elem
;
...
@@ -5639,21 +5639,43 @@ static void test_frame(IDispatch *disp, const char *exp_id)
...
@@ -5639,21 +5639,43 @@ static void test_frame(IDispatch *disp, const char *exp_id)
hres
=
IHTMLWindow2_get_parent
(
frame2
,
&
parent
);
hres
=
IHTMLWindow2_get_parent
(
frame2
,
&
parent
);
ok
(
hres
==
S_OK
,
"IHTMLWindow2_get_parent failed: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"IHTMLWindow2_get_parent failed: 0x%08x
\n
"
,
hres
);
IHTMLWindow2_Release
(
frame2
);
if
(
FAILED
(
hres
)){
if
(
FAILED
(
hres
))
IHTMLWindow2_Release
(
frame2
);
return
;
return
;
}
hres
=
IHTMLWindow2_get_document
(
parent
,
&
parent_doc
);
hres
=
IHTMLWindow2_get_document
(
parent
,
&
parent_doc
);
ok
(
hres
==
S_OK
,
"IHTMLWindow2_get_document failed: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"IHTMLWindow2_get_document failed: 0x%08x
\n
"
,
hres
);
IHTMLWindow2_Release
(
parent
);
IHTMLWindow2_Release
(
parent
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
)){
IHTMLWindow2_Release
(
frame2
);
return
;
return
;
}
hres
=
IHTMLDocument2_get_title
(
parent_doc
,
&
bstr
);
hres
=
IHTMLDocument2_get_title
(
parent_doc
,
&
bstr
);
ok
(
hres
==
S_OK
,
"IHTMLDocument2_get_title failed: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"IHTMLDocument2_get_title failed: 0x%08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
bstr
,
"frameset test"
),
"Did not get the right parent. Expected
\"
frameset test
\"
, found %s
\n
"
,
wine_dbgstr_w
(
bstr
));
ok
(
!
strcmp_wa
(
bstr
,
"frameset test"
),
"Did not get the right parent. Expected
\"
frameset test
\"
, found %s
\n
"
,
wine_dbgstr_w
(
bstr
));
IHTMLDocument2_Release
(
parent_doc
);
IHTMLDocument2_Release
(
parent_doc
);
SysFreeString
(
bstr
);
SysFreeString
(
bstr
);
/* test get_top */
hres
=
IHTMLWindow2_get_top
(
frame2
,
&
top
);
ok
(
hres
==
S_OK
,
"IHTMLWindow2_get_top failed: 0x%08x
\n
"
,
hres
);
IHTMLWindow2_Release
(
frame2
);
if
(
FAILED
(
hres
))
return
;
hres
=
IHTMLWindow2_get_document
(
top
,
&
top_doc
);
ok
(
hres
==
S_OK
,
"IHTMLWindow2_get_document failed: 0x%08x
\n
"
,
hres
);
IHTMLWindow2_Release
(
top
);
if
(
FAILED
(
hres
))
return
;
hres
=
IHTMLDocument2_get_title
(
top_doc
,
&
bstr
);
ok
(
hres
==
S_OK
,
"IHTMLDocument2_get_title failed: 0x%08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
bstr
,
"frameset test"
),
"Did not get the right parent. Expected
\"
frameset test
\"
, found %s
\n
"
,
wine_dbgstr_w
(
bstr
));
IHTMLDocument2_Release
(
top_doc
);
SysFreeString
(
bstr
);
}
}
static
void
test_frameset
(
IHTMLDocument2
*
doc
)
static
void
test_frameset
(
IHTMLDocument2
*
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