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
4bdd2429
Commit
4bdd2429
authored
Mar 19, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLAnchorElement::get_host implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
971ee04c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
htmlanchor.c
dlls/mshtml/htmlanchor.c
+9
-2
elements.js
dlls/mshtml/tests/elements.js
+25
-0
No files found.
dlls/mshtml/htmlanchor.c
View file @
4bdd2429
...
...
@@ -440,8 +440,15 @@ static HRESULT WINAPI HTMLAnchorElement_put_host(IHTMLAnchorElement *iface, BSTR
static
HRESULT
WINAPI
HTMLAnchorElement_get_host
(
IHTMLAnchorElement
*
iface
,
BSTR
*
p
)
{
HTMLAnchorElement
*
This
=
impl_from_IHTMLAnchorElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
/* FIXME: IE always appends port number, even if it's implicit default number */
nsAString_InitDepend
(
&
str
,
NULL
);
nsres
=
nsIDOMHTMLAnchorElement_GetHost
(
This
->
nsanchor
,
&
str
);
return
return_nsstr
(
nsres
,
&
str
,
p
);
}
static
HRESULT
WINAPI
HTMLAnchorElement_put_hostname
(
IHTMLAnchorElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/elements.js
View file @
4bdd2429
...
...
@@ -119,6 +119,30 @@ function test_iframe() {
});
}
function
test_anchor
()
{
var
iframe
=
document
.
body
.
firstChild
;
var
anchor
=
document
.
createElement
(
"a"
);
var
anchor_tests
=
[
{
href
:
"http://www.winehq.org:123/about"
,
protocol
:
"http:"
,
host
:
"www.winehq.org:123"
},
{
href
:
"https://www.winehq.org:123/about"
,
protocol
:
"https:"
,
host
:
"www.winehq.org:123"
},
{
href
:
"about:blank"
,
protocol
:
"about:"
,
host
:
""
},
{
href
:
"file:///c:/dir/file.html"
,
protocol
:
"file:"
,
host
:
""
},
{
href
:
"http://www.winehq.org/about"
,
protocol
:
"http:"
,
host
:
"www.winehq.org:80"
,
todo_host
:
true
},
{
href
:
"https://www.winehq.org/about"
,
protocol
:
"https:"
,
host
:
"www.winehq.org:443"
,
todo_host
:
true
},
];
for
(
var
i
in
anchor_tests
)
{
var
t
=
anchor_tests
[
i
];
anchor
.
href
=
t
.
href
;
ok
(
anchor
.
protocol
===
t
.
protocol
,
"anchor("
+
t
.
href
+
").protocol = "
+
anchor
.
protocol
);
todo_wine_if
(
"todo_host"
in
t
).
ok
(
anchor
.
host
===
t
.
host
,
"anchor("
+
t
.
href
+
").host = "
+
anchor
.
host
);
}
next_test
();
}
function
test_getElementsByClassName
()
{
var
elems
;
...
...
@@ -273,6 +297,7 @@ var tests = [
test_getElementsByClassName
,
test_head
,
test_iframe
,
test_anchor
,
test_query_selector
,
test_compare_position
,
test_document_owner
,
...
...
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