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
42349000
Commit
42349000
authored
Oct 02, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added get_tagName implementation.
parent
9650cf9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
+38
-3
htmlelem.c
dlls/mshtml/htmlelem.c
+18
-2
dom.c
dlls/mshtml/tests/dom.c
+20
-1
No files found.
dlls/mshtml/htmlelem.c
View file @
42349000
...
...
@@ -279,8 +279,24 @@ static HRESULT WINAPI HTMLElement_get_id(IHTMLElement *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLElement_get_tagName
(
IHTMLElement
*
iface
,
BSTR
*
p
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
const
PRUnichar
*
tag
;
nsAString
tag_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
tag_str
,
NULL
);
nsres
=
nsIDOMHTMLElement_GetTagName
(
This
->
nselem
,
&
tag_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsAString_GetData
(
&
tag_str
,
&
tag
,
NULL
);
*
p
=
SysAllocString
(
tag
);
}
else
{
ERR
(
"GetTagName failed: %08x
\n
"
,
nsres
);
*
p
=
NULL
;
}
nsAString_Finish
(
&
tag_str
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_get_parentElement
(
IHTMLElement
*
iface
,
IHTMLElement
**
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
42349000
...
...
@@ -80,11 +80,29 @@ static void _test_node_name(unsigned line, IUnknown *unk, const char *exname)
hres
=
IHTMLDOMNode_get_nodeName
(
node
,
&
name
);
IHTMLDOMNode_Release
(
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_nodeName failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
name
,
exname
),
"got name: %s, expected
HTML
\n
"
,
dbgstr_w
(
name
)
);
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
name
,
exname
),
"got name: %s, expected
%s
\n
"
,
dbgstr_w
(
name
),
exname
);
SysFreeString
(
name
);
}
#define test_elem_tag(u,n) _test_elem_tag(__LINE__,u,n)
static
void
_test_elem_tag
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
extag
)
{
IHTMLElement
*
elem
;
BSTR
tag
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLElement
,
(
void
**
)
&
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"QueryInterface(IID_IHTMLElement) failed: %08x
\n
"
,
hres
);
hres
=
IHTMLElement_get_tagName
(
elem
,
&
tag
);
IHTMLElement_Release
(
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_tagName failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
tag
,
extag
),
"got tag: %s, expected %s
\n
"
,
dbgstr_w
(
tag
),
extag
);
SysFreeString
(
tag
);
}
static
void
test_doc_elem
(
IHTMLDocument2
*
doc
)
{
IHTMLElement
*
elem
;
...
...
@@ -99,6 +117,7 @@ static void test_doc_elem(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_documentElement failed: %08x
\n
"
,
hres
);
test_node_name
((
IUnknown
*
)
elem
,
"HTML"
);
test_elem_tag
((
IUnknown
*
)
elem
,
"HTML"
);
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