Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
beeaea11
Commit
beeaea11
authored
Jun 25, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMNode::get_parentNode implementation.
parent
337f1b73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
2 deletions
+51
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+21
-2
dom.c
dlls/mshtml/tests/dom.c
+30
-0
No files found.
dlls/mshtml/htmlnode.c
View file @
beeaea11
...
@@ -386,8 +386,27 @@ static HRESULT WINAPI HTMLDOMNode_get_nodeType(IHTMLDOMNode *iface, long *p)
...
@@ -386,8 +386,27 @@ static HRESULT WINAPI HTMLDOMNode_get_nodeType(IHTMLDOMNode *iface, long *p)
static
HRESULT
WINAPI
HTMLDOMNode_get_parentNode
(
IHTMLDOMNode
*
iface
,
IHTMLDOMNode
**
p
)
static
HRESULT
WINAPI
HTMLDOMNode_get_parentNode
(
IHTMLDOMNode
*
iface
,
IHTMLDOMNode
**
p
)
{
{
HTMLDOMNode
*
This
=
HTMLDOMNODE_THIS
(
iface
);
HTMLDOMNode
*
This
=
HTMLDOMNODE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
HTMLDOMNode
*
node
;
return
E_NOTIMPL
;
nsIDOMNode
*
nsnode
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMNode_GetParentNode
(
This
->
nsnode
,
&
nsnode
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetParentNode failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
if
(
!
nsnode
)
{
*
p
=
NULL
;
return
S_OK
;
}
node
=
get_node
(
This
->
doc
,
nsnode
,
TRUE
);
*
p
=
HTMLDOMNODE
(
node
);
IHTMLDOMNode_AddRef
(
*
p
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLDOMNode_hasChildNodes
(
IHTMLDOMNode
*
iface
,
VARIANT_BOOL
*
fChildren
)
static
HRESULT
WINAPI
HTMLDOMNode_hasChildNodes
(
IHTMLDOMNode
*
iface
,
VARIANT_BOOL
*
fChildren
)
...
...
dlls/mshtml/tests/dom.c
View file @
beeaea11
...
@@ -900,6 +900,20 @@ static void _test_node_has_child(unsigned line, IUnknown *unk, VARIANT_BOOL exb)
...
@@ -900,6 +900,20 @@ static void _test_node_has_child(unsigned line, IUnknown *unk, VARIANT_BOOL exb)
IHTMLDOMNode_Release
(
node
);
IHTMLDOMNode_Release
(
node
);
}
}
#define test_node_get_parent(u) _test_node_get_parent(__LINE__,u)
static
IHTMLDOMNode
*
_test_node_get_parent
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
);
IHTMLDOMNode
*
parent
;
HRESULT
hres
;
hres
=
IHTMLDOMNode_get_parentNode
(
node
,
&
parent
);
IHTMLDOMNode_Release
(
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_parentNode failed: %08x
\n
"
,
hres
);
return
parent
;
}
#define get_node_type(n) _get_node_type(__LINE__,n)
#define get_node_type(n) _get_node_type(__LINE__,n)
static
long
_get_node_type
(
unsigned
line
,
IUnknown
*
unk
)
static
long
_get_node_type
(
unsigned
line
,
IUnknown
*
unk
)
{
{
...
@@ -2042,6 +2056,22 @@ static void test_elems(IHTMLDocument2 *doc)
...
@@ -2042,6 +2056,22 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_set_class
((
IUnknown
*
)
elem
,
NULL
);
test_elem_set_class
((
IUnknown
*
)
elem
,
NULL
);
test_elem_tabindex
((
IUnknown
*
)
elem
,
0
);
test_elem_tabindex
((
IUnknown
*
)
elem
,
0
);
test_elem_set_tabindex
((
IUnknown
*
)
elem
,
1
);
test_elem_set_tabindex
((
IUnknown
*
)
elem
,
1
);
node
=
test_node_get_parent
((
IUnknown
*
)
elem
);
ok
(
node
!=
NULL
,
"node == NULL
\n
"
);
test_node_name
((
IUnknown
*
)
node
,
"BODY"
);
node2
=
test_node_get_parent
((
IUnknown
*
)
node
);
IHTMLDOMNode_Release
(
node
);
ok
(
node2
!=
NULL
,
"node == NULL
\n
"
);
test_node_name
((
IUnknown
*
)
node2
,
"HTML"
);
node
=
test_node_get_parent
((
IUnknown
*
)
node2
);
IHTMLDOMNode_Release
(
node2
);
ok
(
node
!=
NULL
,
"node == NULL
\n
"
);
test_node_name
((
IUnknown
*
)
node
,
"#document"
);
node2
=
test_node_get_parent
((
IUnknown
*
)
node
);
IHTMLDOMNode_Release
(
node
);
ok
(
node2
==
NULL
,
"node != NULL
\n
"
);
IHTMLElement_Release
(
elem
);
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