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
c11c695b
Commit
c11c695b
authored
Oct 15, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLLinkElement::rel property implementation.
parent
9608714d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
4 deletions
+51
-4
htmllink.c
dlls/mshtml/htmllink.c
+18
-4
dom.c
dlls/mshtml/tests/dom.c
+33
-0
No files found.
dlls/mshtml/htmllink.c
View file @
c11c695b
...
...
@@ -119,15 +119,29 @@ static HRESULT WINAPI HTMLLinkElement_get_href(IHTMLLinkElement *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLLinkElement_put_rel
(
IHTMLLinkElement
*
iface
,
BSTR
v
)
{
HTMLLinkElement
*
This
=
impl_from_IHTMLLinkElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
rel_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
rel_str
,
v
);
nsres
=
nsIDOMHTMLLinkElement_SetRel
(
This
->
nslink
,
&
rel_str
);
nsAString_Finish
(
&
rel_str
);
return
NS_SUCCEEDED
(
nsres
)
?
S_OK
:
E_FAIL
;
}
static
HRESULT
WINAPI
HTMLLinkElement_get_rel
(
IHTMLLinkElement
*
iface
,
BSTR
*
p
)
{
HTMLLinkElement
*
This
=
impl_from_IHTMLLinkElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
rel_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
rel_str
,
NULL
);
nsres
=
nsIDOMHTMLLinkElement_GetRel
(
This
->
nslink
,
&
rel_str
);
return
return_nsstr
(
nsres
,
&
rel_str
,
p
);
}
static
HRESULT
WINAPI
HTMLLinkElement_put_rev
(
IHTMLLinkElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
c11c695b
...
...
@@ -3453,6 +3453,37 @@ static void _link_put_disabled(unsigned line, IHTMLElement *elem, VARIANT_BOOL v
_test_link_disabled
(
line
,
elem
,
v
);
}
#define test_link_rel(a,b) _test_link_rel(__LINE__,a,b)
static
void
_test_link_rel
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
v
)
{
IHTMLLinkElement
*
link
=
_get_link_iface
(
line
,
(
IUnknown
*
)
elem
);
BSTR
rel
;
HRESULT
hres
;
hres
=
IHTMLLinkElement_get_rel
(
link
,
&
rel
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_rel failed: %08x
\n
"
,
hres
);
if
(
v
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
rel
,
v
),
"rel = %s, expected %s
\n
"
,
wine_dbgstr_w
(
rel
),
v
);
else
ok_
(
__FILE__
,
line
)(
!
rel
,
"rel = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
rel
));
IHTMLLinkElement_Release
(
link
);
}
#define link_put_rel(a,b) _link_put_rel(__LINE__,a,b)
static
void
_link_put_rel
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
v
)
{
IHTMLLinkElement
*
link
=
_get_link_iface
(
line
,
(
IUnknown
*
)
elem
);
BSTR
str
=
a2bstr
(
v
);
HRESULT
hres
;
hres
=
IHTMLLinkElement_put_rel
(
link
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_disabled failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
IHTMLLinkElement_Release
(
link
);
_test_link_rel
(
line
,
elem
,
v
);
}
#define get_elem_doc(e) _get_elem_doc(__LINE__,e)
static
IHTMLDocument2
*
_get_elem_doc
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -5954,7 +5985,9 @@ static void test_elems2(IHTMLDocument2 *doc)
elem
=
get_elem_by_id
(
doc
,
"linkid"
,
TRUE
);
if
(
elem
)
{
test_link_disabled
(
elem
,
VARIANT_FALSE
);
test_link_rel
(
elem
,
"stylesheet"
);
link_put_disabled
(
elem
,
VARIANT_TRUE
);
link_put_rel
(
elem
,
"prev"
);
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