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
e140cd33
Commit
e140cd33
authored
Jul 13, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLAnchorElement::name implementation.
parent
4c96957f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
4 deletions
+57
-4
htmlanchor.c
dlls/mshtml/htmlanchor.c
+21
-4
dom.c
dlls/mshtml/tests/dom.c
+36
-0
No files found.
dlls/mshtml/htmlanchor.c
View file @
e140cd33
...
...
@@ -314,15 +314,32 @@ static HRESULT WINAPI HTMLAnchorElement_get_Methods(IHTMLAnchorElement *iface, B
static
HRESULT
WINAPI
HTMLAnchorElement_put_name
(
IHTMLAnchorElement
*
iface
,
BSTR
v
)
{
HTMLAnchorElement
*
This
=
impl_from_IHTMLAnchorElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLAnchorElement_SetName
(
This
->
nsanchor
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLAnchorElement_get_name
(
IHTMLAnchorElement
*
iface
,
BSTR
*
p
)
{
HTMLAnchorElement
*
This
=
impl_from_IHTMLAnchorElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
name_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
name_str
,
NULL
);
nsres
=
nsIDOMHTMLAnchorElement_GetName
(
This
->
nsanchor
,
&
name_str
);
return
return_nsstr
(
nsres
,
&
name_str
,
p
);
}
static
HRESULT
WINAPI
HTMLAnchorElement_put_host
(
IHTMLAnchorElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
e140cd33
...
...
@@ -1296,6 +1296,37 @@ static void _test_anchor_put_target(unsigned line, IUnknown *unk, const char *ta
SysFreeString
(
str
);
}
#define test_anchor_name(a,h) _test_anchor_name(__LINE__,a,h)
static
void
_test_anchor_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
name
)
{
IHTMLAnchorElement
*
anchor
=
_get_anchor_iface
(
line
,
unk
);
BSTR
str
;
HRESULT
hres
;
hres
=
IHTMLAnchorElement_get_name
(
anchor
,
&
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_name failed: %08x
\n
"
,
hres
);
if
(
name
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
str
,
name
),
"name = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
name
);
else
ok_
(
__FILE__
,
line
)(
str
==
NULL
,
"name = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
}
#define test_anchor_put_name(a,h) _test_anchor_put_name(__LINE__,a,h)
static
void
_test_anchor_put_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
name
)
{
IHTMLAnchorElement
*
anchor
=
_get_anchor_iface
(
line
,
unk
);
BSTR
str
;
HRESULT
hres
;
str
=
name
?
a2bstr
(
name
)
:
NULL
;
hres
=
IHTMLAnchorElement_put_name
(
anchor
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_name failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
_test_anchor_name
(
line
,
unk
,
name
);
}
#define test_option_text(o,t) _test_option_text(__LINE__,o,t)
static
void
_test_option_text
(
unsigned
line
,
IHTMLOptionElement
*
option
,
const
char
*
text
)
...
...
@@ -5408,6 +5439,11 @@ static void test_elems(IHTMLDocument2 *doc)
test_anchor_put_target
((
IUnknown
*
)
elem
,
NULL
);
test_anchor_get_target
((
IUnknown
*
)
elem
,
NULL
);
test_anchor_name
((
IUnknown
*
)
elem
,
"x"
);
test_anchor_put_name
((
IUnknown
*
)
elem
,
"anchor name"
);
test_anchor_put_name
((
IUnknown
*
)
elem
,
NULL
);
test_anchor_put_name
((
IUnknown
*
)
elem
,
"x"
);
IHTMLElement_Release
(
elem
);
}
...
...
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