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
a44ff54d
Commit
a44ff54d
authored
Jan 20, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLDocument3 getElementsByTagName.
parent
d77acecb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
htmldoc3.c
dlls/mshtml/htmldoc3.c
+26
-2
dom.c
dlls/mshtml/tests/dom.c
+19
-0
No files found.
dlls/mshtml/htmldoc3.c
View file @
a44ff54d
...
...
@@ -458,8 +458,32 @@ static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface,
IHTMLElementCollection
**
pelColl
)
{
HTMLDocument
*
This
=
HTMLDOC3_THIS
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
v
),
pelColl
);
return
E_NOTIMPL
;
nsIDOMNodeList
*
nslist
;
nsAString
id_str
,
ns_str
;
nsresult
nsres
;
static
const
WCHAR
str
[]
=
{
'*'
,
0
};
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
v
),
pelColl
);
if
(
!
This
->
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
nsAString_Init
(
&
id_str
,
v
);
nsAString_Init
(
&
ns_str
,
str
);
nsres
=
nsIDOMHTMLDocument_GetElementsByTagNameNS
(
This
->
nsdoc
,
&
ns_str
,
&
id_str
,
&
nslist
);
nsAString_Finish
(
&
id_str
);
nsAString_Finish
(
&
ns_str
);
if
(
FAILED
(
nsres
))
{
ERR
(
"GetElementByName failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
pelColl
=
(
IHTMLElementCollection
*
)
create_collection_from_nodelist
(
This
,
(
IUnknown
*
)
HTMLDOC3
(
This
),
nslist
);
nsIDOMNodeList_Release
(
nslist
);
return
S_OK
;
}
#undef HTMLDOC3_THIS
...
...
dlls/mshtml/tests/dom.c
View file @
a44ff54d
...
...
@@ -3418,6 +3418,8 @@ static void test_elems(IHTMLDocument2 *doc)
long
type
;
HRESULT
hres
;
IHTMLElementCollection
*
collection
;
IHTMLDocument3
*
doc3
;
BSTR
str
;
static
const
WCHAR
imgidW
[]
=
{
'i'
,
'm'
,
'g'
,
'i'
,
'd'
,
0
};
static
const
WCHAR
inW
[]
=
{
'i'
,
'n'
,
0
};
...
...
@@ -3804,6 +3806,23 @@ static void test_elems(IHTMLDocument2 *doc)
}
}
IDispatch_Release
(
disp
);
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IHTMLDocument3
,
(
void
**
)
&
doc3
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLDocument3 iface: %08x
\n
"
,
hres
);
str
=
a2bstr
(
"img"
);
hres
=
IHTMLDocument3_getElementsByTagName
(
doc3
,
str
,
&
col
);
SysFreeString
(
str
);
ok
(
hres
==
S_OK
,
"getElementByTag(%s) failed: %08x
\n
"
,
dbgstr_w
(
ifrW
),
hres
);
if
(
hres
==
S_OK
)
{
static
const
elem_type_t
img_types
[]
=
{
ET_IMG
};
test_elem_collection
((
IUnknown
*
)
col
,
img_types
,
sizeof
(
img_types
)
/
sizeof
(
img_types
[
0
]));
IHTMLElementCollection_Release
(
col
);
}
IHTMLDocument3_Release
(
doc3
);
}
static
void
test_create_elems
(
IHTMLDocument2
*
doc
)
...
...
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