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
f911e240
Commit
f911e240
authored
Jun 24, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::get_title implementation.
parent
a3a9a317
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
3 deletions
+40
-3
htmlelem.c
dlls/mshtml/htmlelem.c
+18
-2
dom.c
dlls/mshtml/tests/dom.c
+22
-1
No files found.
dlls/mshtml/htmlelem.c
View file @
f911e240
...
...
@@ -601,8 +601,24 @@ static HRESULT WINAPI HTMLElement_put_title(IHTMLElement *iface, BSTR v)
static
HRESULT
WINAPI
HTMLElement_get_title
(
IHTMLElement
*
iface
,
BSTR
*
p
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
title_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
title_str
,
NULL
);
nsres
=
nsIDOMHTMLElement_GetTitle
(
This
->
nselem
,
&
title_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
title
;
nsAString_GetData
(
&
title_str
,
&
title
);
*
p
=
*
title
?
SysAllocString
(
title
)
:
NULL
;
}
else
{
ERR
(
"GetTitle failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_put_language
(
IHTMLElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
f911e240
...
...
@@ -42,7 +42,7 @@ static const char elem_test_str[] =
"<html><head><title>test</title><style>.body { margin-right: 0px; }</style>"
"<body>text test<!-- a comment -->"
"<a href=
\"
http://test
\"
name=
\"
x
\"
>link</a>"
"<input id=
\"
in
\"
class=
\"
testclass
\"
tabIndex=
\"
2
\"
/>"
"<input id=
\"
in
\"
class=
\"
testclass
\"
tabIndex=
\"
2
\"
title=
\"
test title
\"
/>"
"<select id=
\"
s
\"
><option id=
\"
x
\"
value=
\"
val1
\"
>opt1</option><option id=
\"
y
\"
>opt2</option></select>"
"<textarea id=
\"
X
\"
>text text</textarea>"
"<table><tbody></tbody></table>"
...
...
@@ -1090,6 +1090,24 @@ static void _test_elem_put_id(unsigned line, IUnknown *unk, const char *new_id)
_test_elem_id
(
line
,
unk
,
new_id
);
}
#define test_elem_title(u,t) _test_elem_title(__LINE__,u,t)
static
void
_test_elem_title
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
extitle
)
{
IHTMLElement
*
elem
=
_get_elem_iface
(
line
,
unk
);
BSTR
title
;
HRESULT
hres
;
hres
=
IHTMLElement_get_title
(
elem
,
&
title
);
IHTMLElement_Release
(
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_title failed: %08x
\n
"
,
hres
);
if
(
extitle
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
title
,
extitle
),
"unexpected title %s
\n
"
,
dbgstr_w
(
title
));
else
ok_
(
__FILE__
,
line
)
(
!
title
,
"title=%s, expected NULL
\n
"
,
dbgstr_w
(
title
));
SysFreeString
(
title
);
}
#define test_node_get_value_str(u,e) _test_node_get_value_str(__LINE__,u,e)
static
void
_test_node_get_value_str
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exval
)
{
...
...
@@ -1985,6 +2003,8 @@ static void test_elems(IHTMLDocument2 *doc)
test_select_elem
(
select
);
test_elem_title
((
IUnknown
*
)
select
,
NULL
);
node
=
get_first_child
((
IUnknown
*
)
select
);
ok
(
node
!=
NULL
,
"node == NULL
\n
"
);
if
(
node
)
{
...
...
@@ -2036,6 +2056,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_class
((
IUnknown
*
)
elem
,
"testclass"
);
test_elem_tabindex
((
IUnknown
*
)
elem
,
2
);
test_elem_set_tabindex
((
IUnknown
*
)
elem
,
3
);
test_elem_title
((
IUnknown
*
)
elem
,
"test title"
);
IHTMLInputElement_Release
(
input
);
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