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
a03ca386
Commit
a03ca386
authored
Jun 25, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Jun 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement HTMLElement_get_children.
parent
d521a2c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
2 deletions
+43
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+43
-2
No files found.
dlls/mshtml/htmlelem.c
View file @
a03ca386
...
...
@@ -875,11 +875,52 @@ static HRESULT WINAPI HTMLElement_get_onfilterchange(IHTMLElement *iface, VARIAN
return
E_NOTIMPL
;
}
static
void
create_child_list
(
HTMLDocument
*
doc
,
HTMLElement
*
elem
,
elem_vector
*
buf
)
{
nsIDOMNodeList
*
nsnode_list
;
nsIDOMNode
*
iter
;
PRUint32
list_len
=
0
,
i
;
HTMLDOMNode
*
node
;
nsresult
nsres
;
nsres
=
nsIDOMNode_GetChildNodes
(
elem
->
node
->
nsnode
,
&
nsnode_list
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetChildNodes failed: %08x
\n
"
,
nsres
);
return
;
}
nsIDOMNodeList_GetLength
(
nsnode_list
,
&
list_len
);
if
(
!
list_len
)
return
;
buf
->
size
=
list_len
;
buf
->
buf
=
mshtml_alloc
(
buf
->
size
*
sizeof
(
HTMLElement
**
));
for
(
i
=
0
;
i
<
list_len
;
i
++
)
{
nsres
=
nsIDOMNodeList_Item
(
nsnode_list
,
i
,
&
iter
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Item failed: %08x
\n
"
,
nsres
);
continue
;
}
node
=
get_node
(
doc
,
iter
);
if
(
node
->
node_type
!=
NT_HTMLELEM
)
continue
;
elem_vector_add
(
buf
,
(
HTMLElement
*
)
node
->
impl
.
elem
);
}
}
static
HRESULT
WINAPI
HTMLElement_get_children
(
IHTMLElement
*
iface
,
IDispatch
**
p
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
elem_vector
buf
=
{
NULL
,
0
,
0
};
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
create_child_list
(
This
->
node
->
doc
,
This
,
&
buf
);
return
HTMLElementCollection_Create
((
IUnknown
*
)
HTMLELEM
(
This
),
buf
.
buf
,
buf
.
len
,
p
);
}
static
void
create_all_list
(
HTMLDocument
*
doc
,
HTMLElement
*
elem
,
elem_vector
*
buf
)
...
...
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