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
679ddf24
Commit
679ddf24
authored
Jan 28, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added support for _self target in IHTMLWindow2::open.
parent
fdda480d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
3 deletions
+40
-3
htmlwindow.c
dlls/mshtml/htmlwindow.c
+19
-0
nav_test.html
dlls/mshtml/tests/nav_test.html
+21
-3
No files found.
dlls/mshtml/htmlwindow.c
View file @
679ddf24
...
...
@@ -932,6 +932,8 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
IUri
*
uri
;
HRESULT
hres
;
static
const
WCHAR
_selfW
[]
=
{
'_'
,
's'
,
'e'
,
'l'
,
'f'
,
0
};
TRACE
(
"(%p)->(%s %s %s %x %p)
\n
"
,
This
,
debugstr_w
(
url
),
debugstr_w
(
name
),
debugstr_w
(
features
),
replace
,
pomWindowResult
);
...
...
@@ -939,6 +941,23 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
return
E_UNEXPECTED
;
if
(
name
&&
*
name
==
'_'
)
{
if
(
!
strcmpW
(
name
,
_selfW
))
{
if
((
features
&&
*
features
)
||
replace
)
FIXME
(
"Unsupported arguments for _self target
\n
"
);
hres
=
IHTMLWindow2_navigate
(
&
This
->
IHTMLWindow2_iface
,
url
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
pomWindowResult
)
{
FIXME
(
"Returning this window for _self target
\n
"
);
*
pomWindowResult
=
&
This
->
IHTMLWindow2_iface
;
IHTMLWindow2_AddRef
(
*
pomWindowResult
);
}
return
S_OK
;
}
FIXME
(
"Unsupported name %s
\n
"
,
debugstr_w
(
name
));
return
E_NOTIMPL
;
}
...
...
dlls/mshtml/tests/nav_test.html
View file @
679ddf24
...
...
@@ -5,7 +5,7 @@ function ok(b,m) {
return
external
.
ok
(
b
,
m
);
}
function
nav_
back
_test
()
{
function
nav_
parent
_test
()
{
external
.
trace
(
"Running _parent navigation tests..."
);
var
iframe
=
document
.
getElementById
(
"testframe"
);
...
...
@@ -29,7 +29,7 @@ function nav_back_test() {
}
function
window_navigate_test
()
{
external
.
trace
(
"Runnin
t
window.navigate() tests..."
);
external
.
trace
(
"Runnin
g
window.navigate() tests..."
);
var
iframe
=
document
.
getElementById
(
"testframe"
);
...
...
@@ -43,6 +43,23 @@ function window_navigate_test() {
iframe
.
contentWindow
.
navigate
(
"about:blank"
);
}
function
window_open_self_test
()
{
external
.
trace
(
"Running window.open(_self) tests..."
);
var
iframe
=
document
.
getElementById
(
"testframe"
);
var
iframe_window
=
iframe
.
contentWindow
;
iframe
.
onload
=
function
()
{
iframe
.
onload
=
null
;
var
href
=
iframe
.
contentWindow
.
location
.
href
;
ok
(
/.*blank.html
\?
window_open_self/
.
test
(
href
),
"Unexpected href "
+
href
);
ok
(
iframe
.
contentWindow
===
iframe_window
,
"iframe.contentWindow !== iframe_window"
);
next_test
();
}
iframe_window
.
open
(
"blank.html?window_open_self"
,
"_self"
);
}
function
detached_src_test
()
{
var
iframe
=
document
.
createElement
(
"iframe"
);
var
onload_called
=
false
;
...
...
@@ -58,8 +75,9 @@ function detached_src_test() {
}
var
tests
=
[
nav_
back
_test
,
nav_
parent
_test
,
window_navigate_test
,
window_open_self_test
,
detached_src_test
,
function
()
{
external
.
reportSuccess
();
}
];
...
...
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