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
f4c20b02
Commit
f4c20b02
authored
Apr 03, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLMetaElement::get_name implementation.
parent
31bfc380
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
3 deletions
+47
-3
htmlmeta.c
dlls/mshtml/htmlmeta.c
+13
-2
dom.c
dlls/mshtml/tests/dom.c
+34
-1
No files found.
dlls/mshtml/htmlmeta.c
View file @
f4c20b02
...
...
@@ -132,8 +132,19 @@ static HRESULT WINAPI HTMLMetaElement_put_name(IHTMLMetaElement *iface, BSTR v)
static
HRESULT
WINAPI
HTMLMetaElement_get_name
(
IHTMLMetaElement
*
iface
,
BSTR
*
p
)
{
HTMLMetaElement
*
This
=
impl_from_IHTMLMetaElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
name_str
,
val_str
;
nsresult
nsres
;
static
const
PRUnichar
nameW
[]
=
{
'n'
,
'a'
,
'm'
,
'e'
,
0
};
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_InitDepend
(
&
name_str
,
nameW
);
nsAString_Init
(
&
val_str
,
NULL
);
nsres
=
nsIDOMHTMLElement_GetAttribute
(
This
->
element
.
nselem
,
&
name_str
,
&
val_str
);
nsAString_Finish
(
&
name_str
);
return
return_nsstr
(
nsres
,
&
val_str
,
p
);
}
static
HRESULT
WINAPI
HTMLMetaElement_put_url
(
IHTMLMetaElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
f4c20b02
...
...
@@ -47,7 +47,7 @@ static const char range_test2_str[] =
"<html><body>abc<hr />123<br /><hr />def</body></html>"
;
static
const
char
elem_test_str
[]
=
"<html><head><title>test</title><style id=
\"
styleid
\"
>.body { margin-right: 0px; }</style>"
"<meta http-equiv=
\"
Content-Type
\"
content=
\"
text/html; charset=utf-8
\"
>"
"<meta
id=
\"
metaid
\"
name=
\"
meta name
\"
http-equiv=
\"
Content-Type
\"
content=
\"
text/html; charset=utf-8
\"
>"
"<body onload=
\"
Testing()
\"
>text test<!-- a comment -->"
"<a id=
\"
a
\"
href=
\"
http://test
\"
name=
\"
x
\"
>link</a>"
"<input id=
\"
in
\"
class=
\"
testclass
\"
tabIndex=
\"
2
\"
title=
\"
test title
\"
/>"
...
...
@@ -839,6 +839,17 @@ static IHTMLStyleElement *_get_style_iface(unsigned line, IUnknown *unk)
return
obj
;
}
#define get_metaelem_iface(u) _get_metaelem_iface(__LINE__,u)
static
IHTMLMetaElement
*
_get_metaelem_iface
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLMetaElement
*
ret
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLMetaElement
,
(
void
**
)
&
ret
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLMetaElement: %08x
\n
"
,
hres
);
return
ret
;
}
#define test_node_name(u,n) _test_node_name(__LINE__,u,n)
static
void
_test_node_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exname
)
{
...
...
@@ -3232,6 +3243,22 @@ static void _test_form_elements(unsigned line, IUnknown *unk)
IHTMLFormElement_Release
(
form
);
}
#define test_meta_name(a,b) _test_meta_name(__LINE__,a,b)
static
void
_test_meta_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exname
)
{
IHTMLMetaElement
*
meta
;
BSTR
name
=
NULL
;
HRESULT
hres
;
meta
=
_get_metaelem_iface
(
line
,
unk
);
hres
=
IHTMLMetaElement_get_name
(
meta
,
&
name
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_name failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
name
,
exname
),
"name = %s, expected %s
\n
"
,
wine_dbgstr_w
(
name
),
exname
);
SysFreeString
(
name
);
IHTMLMetaElement_Release
(
meta
);
}
#define get_elem_doc(e) _get_elem_doc(__LINE__,e)
static
IHTMLDocument2
*
_get_elem_doc
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -5259,6 +5286,12 @@ static void test_elems(IHTMLDocument2 *doc)
IHTMLElement_Release
(
elem
);
}
elem
=
get_doc_elem_by_id
(
doc
,
"metaid"
);
if
(
elem
)
{
test_meta_name
((
IUnknown
*
)
elem
,
"meta name"
);
IHTMLElement_Release
(
elem
);
}
elem
=
doc_get_body
(
doc
);
node
=
get_first_child
((
IUnknown
*
)
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