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
df25f0d9
Commit
df25f0d9
authored
Feb 17, 2011
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLAnchorElement_put_href.
parent
15c322c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
htmlanchor.c
dlls/mshtml/htmlanchor.c
+12
-2
dom.c
dlls/mshtml/tests/dom.c
+23
-0
No files found.
dlls/mshtml/htmlanchor.c
View file @
df25f0d9
...
...
@@ -102,8 +102,18 @@ static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID
static
HRESULT
WINAPI
HTMLAnchorElement_put_href
(
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_SetHref
(
This
->
nsanchor
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLAnchorElement_get_href
(
IHTMLAnchorElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
df25f0d9
...
...
@@ -1168,6 +1168,21 @@ static void _test_anchor_href(unsigned line, IUnknown *unk, const char *exhref)
_test_disp_value
(
line
,
unk
,
exhref
);
}
#define test_anchor_put_href(a,h) _test_anchor_put_href(__LINE__,a,h)
static
void
_test_anchor_put_href
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exhref
)
{
IHTMLAnchorElement
*
anchor
=
_get_anchor_iface
(
line
,
unk
);
BSTR
str
;
HRESULT
hres
;
str
=
a2bstr
(
exhref
);
hres
=
IHTMLAnchorElement_put_href
(
anchor
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_href failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
_test_disp_value
(
line
,
unk
,
exhref
);
}
#define test_option_text(o,t) _test_option_text(__LINE__,o,t)
static
void
_test_option_text
(
unsigned
line
,
IHTMLOptionElement
*
option
,
const
char
*
text
)
{
...
...
@@ -6481,6 +6496,14 @@ static void test_elems(IHTMLDocument2 *doc)
elem
=
get_elem_by_id
(
doc
,
"a"
,
TRUE
);
if
(
elem
)
{
test_anchor_href
((
IUnknown
*
)
elem
,
"http://test/"
);
/* Change the href */
test_anchor_put_href
((
IUnknown
*
)
elem
,
"http://test1/"
);
test_anchor_href
((
IUnknown
*
)
elem
,
"http://test1/"
);
/* Restore the href */
test_anchor_put_href
((
IUnknown
*
)
elem
,
"http://test/"
);
test_anchor_href
((
IUnknown
*
)
elem
,
"http://test/"
);
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