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
325f8c81
Commit
325f8c81
authored
Apr 11, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Return self as a parent of global top window.
parent
706d9df8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
htmlwindow.c
dlls/mshtml/htmlwindow.c
+5
-5
dom.c
dlls/mshtml/tests/dom.c
+9
-2
No files found.
dlls/mshtml/htmlwindow.c
View file @
325f8c81
...
...
@@ -779,14 +779,14 @@ static HRESULT WINAPI HTMLWindow2_get_name(IHTMLWindow2 *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLWindow2_get_parent
(
IHTMLWindow2
*
iface
,
IHTMLWindow2
**
p
)
{
HTMLWindow
*
This
=
impl_from_IHTMLWindow2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
parent
)
{
*
p
=
&
This
->
parent
->
IHTMLWindow2_iface
;
IHTMLWindow2_AddRef
(
*
p
);
}
else
*
p
=
NULL
;
if
(
!
This
->
parent
)
return
IHTMLWindow2_get_self
(
&
This
->
IHTMLWindow2_iface
,
p
);
*
p
=
&
This
->
parent
->
IHTMLWindow2_iface
;
IHTMLWindow2_AddRef
(
*
p
);
return
S_OK
;
}
...
...
dlls/mshtml/tests/dom.c
View file @
325f8c81
...
...
@@ -4479,7 +4479,7 @@ static void test_body_funs(IHTMLBodyElement *body)
static
void
test_window
(
IHTMLDocument2
*
doc
)
{
IHTMLWindow2
*
window
,
*
window2
,
*
self
;
IHTMLWindow2
*
window
,
*
window2
,
*
self
,
*
parent
;
IHTMLDocument2
*
doc2
=
NULL
;
IDispatch
*
disp
;
IUnknown
*
unk
;
...
...
@@ -4528,7 +4528,6 @@ static void test_window(IHTMLDocument2 *doc)
ok
(
self
==
window2
,
"self != window2
\n
"
);
IHTMLWindow2_Release
(
window2
);
IHTMLWindow2_Release
(
self
);
disp
=
NULL
;
hres
=
IHTMLDocument2_get_Script
(
doc
,
&
disp
);
...
...
@@ -4551,6 +4550,14 @@ static void test_window(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_opener failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"V_VT(opener) = %d
\n
"
,
V_VT
(
&
v
));
parent
=
NULL
;
hres
=
IHTMLWindow2_get_parent
(
window
,
&
parent
);
ok
(
hres
==
S_OK
,
"get_parent failed: %08x
\n
"
,
hres
);
ok
(
parent
!=
NULL
,
"parent == NULL
\n
"
);
ok
(
parent
==
self
,
"parent != window
\n
"
);
IHTMLWindow2_Release
(
parent
);
IHTMLWindow2_Release
(
self
);
test_window_name
(
window
,
NULL
);
set_window_name
(
window
,
"test"
);
test_window_length
(
window
,
0
);
...
...
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