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
c592c6e7
Commit
c592c6e7
authored
Jun 23, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMNode::hasChildNodes implementation.
parent
c3d8d052
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+11
-2
dom.c
dlls/mshtml/tests/dom.c
+17
-0
No files found.
dlls/mshtml/htmlnode.c
View file @
c592c6e7
...
...
@@ -393,8 +393,17 @@ static HRESULT WINAPI HTMLDOMNode_get_parentNode(IHTMLDOMNode *iface, IHTMLDOMNo
static
HRESULT
WINAPI
HTMLDOMNode_hasChildNodes
(
IHTMLDOMNode
*
iface
,
VARIANT_BOOL
*
fChildren
)
{
HTMLDOMNode
*
This
=
HTMLDOMNODE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
fChildren
);
return
E_NOTIMPL
;
PRBool
has_child
=
FALSE
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
fChildren
);
nsres
=
nsIDOMNode_HasChildNodes
(
This
->
nsnode
,
&
has_child
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"HasChildNodes failed: %08x
\n
"
,
nsres
);
*
fChildren
=
has_child
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDOMNode_get_childNodes
(
IHTMLDOMNode
*
iface
,
IDispatch
**
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
c592c6e7
...
...
@@ -836,6 +836,20 @@ static IHTMLDOMNode *_get_first_child(unsigned line, IUnknown *unk)
return
child
;
}
#define test_node_has_child(u,b) _test_node_has_child(__LINE__,u,b)
static
void
_test_node_has_child
(
unsigned
line
,
IUnknown
*
unk
,
VARIANT_BOOL
exb
)
{
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
);
VARIANT_BOOL
b
=
0xdead
;
HRESULT
hres
;
hres
=
IHTMLDOMNode_hasChildNodes
(
node
,
&
b
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"hasChildNodes failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
b
==
exb
,
"hasChildNodes=%x, expected %x
\n
"
,
b
,
exb
);
IHTMLDOMNode_Release
(
node
);
}
#define get_node_type(n) _get_node_type(__LINE__,n)
static
long
_get_node_type
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -2095,8 +2109,10 @@ static void test_create_elems(IHTMLDocument2 *doc)
hres
=
IHTMLDocument2_get_body
(
doc
,
&
body
);
ok
(
hres
==
S_OK
,
"get_body failed: %08x
\n
"
,
hres
);
test_node_has_child
((
IUnknown
*
)
body
,
VARIANT_FALSE
);
node
=
test_node_append_child
((
IUnknown
*
)
body
,
(
IUnknown
*
)
elem
);
test_node_has_child
((
IUnknown
*
)
body
,
VARIANT_TRUE
);
elem2
=
get_elem_iface
((
IUnknown
*
)
node
);
IHTMLElement_Release
(
elem2
);
...
...
@@ -2111,6 +2127,7 @@ static void test_create_elems(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_all failed: %08x
\n
"
,
hres
);
test_elem_collection
((
IUnknown
*
)
disp
,
NULL
,
0
);
IDispatch_Release
(
disp
);
test_node_has_child
((
IUnknown
*
)
body
,
VARIANT_FALSE
);
IHTMLElement_Release
(
body
);
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