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
952a54cb
Commit
952a54cb
authored
Jul 11, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement2::getElementsByTagName implementation.
parent
1de0055c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
4 deletions
+45
-4
htmlelem.c
dlls/mshtml/htmlelem.c
+25
-0
htmlelem2.c
dlls/mshtml/htmlelem2.c
+19
-4
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
952a54cb
...
...
@@ -1896,6 +1896,31 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node)
return
HTMLElementCollection_Create
((
IUnknown
*
)
HTMLDOMNODE
(
node
),
buf
.
buf
,
buf
.
len
);
}
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocument
*
doc
,
IUnknown
*
unk
,
nsIDOMNodeList
*
nslist
)
{
PRUint32
length
=
0
,
i
;
elem_vector
buf
;
nsIDOMNodeList_GetLength
(
nslist
,
&
length
);
buf
.
len
=
buf
.
size
=
length
;
if
(
buf
.
len
)
{
nsIDOMNode
*
nsnode
;
buf
.
buf
=
heap_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
*
));
for
(
i
=
0
;
i
<
length
;
i
++
)
{
nsIDOMNodeList_Item
(
nslist
,
i
,
&
nsnode
);
buf
.
buf
[
i
]
=
HTMLELEM_NODE_THIS
(
get_node
(
doc
,
nsnode
,
TRUE
));
nsIDOMNode_Release
(
nsnode
);
}
}
else
{
buf
.
buf
=
NULL
;
}
return
HTMLElementCollection_Create
(
unk
,
buf
.
buf
,
buf
.
len
);
}
static
IHTMLElementCollection
*
HTMLElementCollection_Create
(
IUnknown
*
ref_unk
,
HTMLElement
**
elems
,
DWORD
len
)
{
...
...
dlls/mshtml/htmlelem2.c
View file @
952a54cb
...
...
@@ -917,12 +917,27 @@ static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, lon
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLElement2_getElementByTagName
(
IHTMLElement2
*
iface
,
BSTR
v
,
static
HRESULT
WINAPI
HTMLElement2_getElement
s
ByTagName
(
IHTMLElement2
*
iface
,
BSTR
v
,
IHTMLElementCollection
**
pelColl
)
{
HTMLElement
*
This
=
HTMLELEM2_THIS
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
v
),
pelColl
);
return
E_NOTIMPL
;
nsIDOMNodeList
*
nslist
;
nsAString
tag_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
v
),
pelColl
);
nsAString_Init
(
&
tag_str
,
v
);
nsres
=
nsIDOMHTMLElement_GetElementsByTagName
(
This
->
nselem
,
&
tag_str
,
&
nslist
);
nsAString_Finish
(
&
tag_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetElementByTagName failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
pelColl
=
create_collection_from_nodelist
(
This
->
node
.
doc
,
(
IUnknown
*
)
HTMLELEM
(
This
),
nslist
);
nsIDOMNodeList_Release
(
nslist
);
return
S_OK
;
}
#undef HTMLELEM2_THIS
...
...
@@ -1032,7 +1047,7 @@ static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
HTMLElement2_put_onbeforeeditfocus
,
HTMLElement2_get_onbeforeeditfocus
,
HTMLElement2_get_readyStateValue
,
HTMLElement2_getElementByTagName
,
HTMLElement2_getElement
s
ByTagName
,
};
void
HTMLElement2_Init
(
HTMLElement
*
This
)
...
...
dlls/mshtml/mshtml_private.h
View file @
952a54cb
...
...
@@ -566,6 +566,7 @@ void doc_insert_script(HTMLDocument*,nsIDOMHTMLScriptElement*);
IDispatch
*
script_parse_event
(
HTMLDocument
*
,
LPCWSTR
);
IHTMLElementCollection
*
create_all_collection
(
HTMLDOMNode
*
);
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocument
*
,
IUnknown
*
,
nsIDOMNodeList
*
);
/* commands */
typedef
struct
{
...
...
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