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
6bf5ffbc
Commit
6bf5ffbc
authored
Apr 24, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added get_firstChild implementation.
parent
1cb633a5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+13
-2
dom.c
dlls/mshtml/tests/dom.c
+25
-0
No files found.
dlls/mshtml/htmlnode.c
View file @
6bf5ffbc
...
...
@@ -246,8 +246,19 @@ static HRESULT WINAPI HTMLDOMNode_get_nodeValue(IHTMLDOMNode *iface, VARIANT *p)
static
HRESULT
WINAPI
HTMLDOMNode_get_firstChild
(
IHTMLDOMNode
*
iface
,
IHTMLDOMNode
**
p
)
{
HTMLDOMNode
*
This
=
HTMLDOMNODE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMNode
*
nschild
=
NULL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsIDOMNode_GetFirstChild
(
This
->
nsnode
,
&
nschild
);
if
(
nschild
)
{
*
p
=
HTMLDOMNODE
(
get_node
(
This
->
doc
,
nschild
,
TRUE
));
IHTMLDOMNode_AddRef
(
*
p
);
}
else
{
*
p
=
NULL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDOMNode_get_lastChild
(
IHTMLDOMNode
*
iface
,
IHTMLDOMNode
**
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
6bf5ffbc
...
...
@@ -738,6 +738,23 @@ static void _test_elem_collection(unsigned line, IHTMLElementCollection *col,
ok_
(
__FILE__
,
line
)
(
disp
==
NULL
,
"disp != NULL
\n
"
);
}
#define get_first_child(n) _get_first_child(__LINE__,n)
static
IHTMLDOMNode
*
_get_first_child
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMNode
*
node
,
*
child
=
NULL
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDOMNode
,
(
void
**
)
&
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLDOMNode: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
NULL
;
hres
=
IHTMLDOMNode_get_firstChild
(
node
,
&
child
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_firstChild failed: %08x
\n
"
,
hres
);
return
child
;
}
static
void
test_elem_col_item
(
IHTMLElementCollection
*
col
,
LPCWSTR
n
,
const
elem_type_t
*
elem_types
,
long
len
)
{
...
...
@@ -1379,6 +1396,7 @@ static void test_elems(IHTMLDocument2 *doc)
{
IHTMLElementCollection
*
col
;
IHTMLElement
*
elem
;
IHTMLDOMNode
*
node
;
IDispatch
*
disp
;
HRESULT
hres
;
...
...
@@ -1451,6 +1469,13 @@ static void test_elems(IHTMLDocument2 *doc)
test_select_elem
(
select
);
node
=
get_first_child
((
IUnknown
*
)
select
);
ok
(
node
!=
NULL
,
"node == NULL
\n
"
);
if
(
node
)
{
test_elem_type
((
IUnknown
*
)
node
,
ET_OPTION
);
IHTMLDOMNode_Release
(
node
);
}
IHTMLSelectElement_Release
(
select
);
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