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
31faed57
Commit
31faed57
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: Adder _parent target support to navigate_anchor.
parent
d6bb86e8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
4 deletions
+61
-4
htmlanchor.c
dlls/mshtml/htmlanchor.c
+8
-4
blank.html
dlls/mshtml/tests/blank.html
+1
-0
nav_test.html
dlls/mshtml/tests/nav_test.html
+42
-0
rsrc.rc
dlls/mshtml/tests/rsrc.rc
+9
-0
script.c
dlls/mshtml/tests/script.c
+1
-0
No files found.
dlls/mshtml/htmlanchor.c
View file @
31faed57
...
...
@@ -77,7 +77,7 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This)
nsresult
nsres
;
HRESULT
hres
=
E_FAIL
;
static
const
WCHAR
_parentW
[]
=
{
'p'
,
'a'
,
'r'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
_parentW
[]
=
{
'
_'
,
'
p'
,
'a'
,
'r'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
_selfW
[]
=
{
'_'
,
's'
,
'e'
,
'l'
,
'f'
,
0
};
static
const
WCHAR
_topW
[]
=
{
'_'
,
't'
,
'o'
,
'p'
,
0
};
...
...
@@ -93,9 +93,13 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This)
TRACE
(
"target _top
\n
"
);
get_top_window
(
This
->
element
.
node
.
doc
->
basedoc
.
window
,
&
window
);
}
else
if
(
!
strcmpiW
(
target
,
_parentW
))
{
FIXME
(
"Navigating to target _parent is not implemented
\n
"
);
nsAString_Finish
(
&
target_str
);
return
S_OK
;
window
=
This
->
element
.
node
.
doc
->
basedoc
.
window
;
if
(
!
window
->
parent
)
{
WARN
(
"Window has no parent
\n
"
);
nsAString_Finish
(
&
target_str
);
return
S_OK
;
}
window
=
window
->
parent
;
}
else
{
HTMLOuterWindow
*
top_window
;
...
...
dlls/mshtml/tests/blank.html
0 → 100644
View file @
31faed57
<html></html>
dlls/mshtml/tests/nav_test.html
0 → 100644
View file @
31faed57
<html>
<head>
<script>
function
ok
(
b
,
m
)
{
return
external
.
ok
(
b
,
m
);
}
function
nav_back_test
()
{
external
.
trace
(
"Running _parent navigation tests..."
);
var
iframe
=
document
.
getElementById
(
"testframe"
);
var
subframe
=
iframe
.
contentWindow
.
document
.
createElement
(
"iframe"
);
subframe
.
onload
=
function
()
{
var
doc
=
subframe
.
contentWindow
.
document
;
doc
.
body
.
innerHTML
=
'<a href="blank2.html" id="aid" target="_parent">test</a>'
;
doc
.
getElementById
(
"aid"
).
click
();
}
iframe
.
onload
=
function
()
{
var
href
=
iframe
.
contentWindow
.
location
.
href
;
ok
(
/.*blank2.html/
.
test
(
href
),
"Unexpected href "
+
href
);
next_test
();
}
iframe
.
contentWindow
.
document
.
body
.
appendChild
(
subframe
);
subframe
.
src
=
"blank.html"
;
}
var
tests
=
[
nav_back_test
,
function
()
{
external
.
reportSuccess
();
}
];
function
next_test
()
{
window
.
setTimeout
(
tests
.
shift
(),
0
);
}
</script>
<body
onload=
"next_test()"
>
<iframe
src=
"about:blank"
id=
"testframe"
></iframe>
</body>
</html>
dlls/mshtml/tests/rsrc.rc
View file @
31faed57
...
...
@@ -31,6 +31,15 @@ events.html HTML "events.html"
/* @makedep: externscr.js */
externscr.js HTML "externscr.js"
/* @makedep: nav_test.html */
nav_test.html HTML "nav_test.html"
/* @makedep: blank.html */
blank.html HTML "blank.html"
/* @makedep: blank.html */
blank2.html HTML "blank.html"
/* @makedep: test_tlb.tlb */
1 TYPELIB test_tlb.tlb
...
...
dlls/mshtml/tests/script.c
View file @
31faed57
...
...
@@ -2831,6 +2831,7 @@ static void run_js_tests(void)
run_js_script
(
"exectest.html"
);
run_js_script
(
"vbtest.html"
);
run_js_script
(
"events.html"
);
run_js_script
(
"nav_test.html"
);
}
static
BOOL
init_registry
(
BOOL
init
)
...
...
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