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
15979674
Commit
15979674
authored
Apr 29, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added indexed access to HTMLElementCollection object support.
parent
ef4200fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
1 deletion
+51
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+51
-1
No files found.
dlls/mshtml/htmlelem.c
View file @
15979674
...
@@ -1651,6 +1651,51 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface,
...
@@ -1651,6 +1651,51 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface,
return
S_OK
;
return
S_OK
;
}
}
#define DISPID_ELEMCOL_0 MSHTML_DISPID_CUSTOM_MIN
static
HRESULT
HTMLElementCollection_get_dispid
(
IUnknown
*
iface
,
BSTR
name
,
DWORD
flags
,
DISPID
*
dispid
)
{
HTMLElementCollection
*
This
=
ELEMCOL_THIS
(
iface
);
WCHAR
*
ptr
;
DWORD
idx
=
0
;
for
(
ptr
=
name
;
*
ptr
&&
isdigitW
(
*
ptr
);
ptr
++
)
idx
=
idx
*
10
+
(
*
ptr
-
'0'
);
if
(
*
ptr
||
idx
>=
This
->
len
)
return
DISP_E_UNKNOWNNAME
;
*
dispid
=
DISPID_ELEMCOL_0
+
idx
;
TRACE
(
"ret %x
\n
"
,
*
dispid
);
return
S_OK
;
}
static
HRESULT
HTMLElementCollection_invoke
(
IUnknown
*
iface
,
DISPID
id
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
res
,
EXCEPINFO
*
ei
,
IServiceProvider
*
caller
)
{
HTMLElementCollection
*
This
=
ELEMCOL_THIS
(
iface
);
DWORD
idx
;
TRACE
(
"(%p)->(%x %x %x %p %p %p %p)
\n
"
,
This
,
id
,
lcid
,
flags
,
params
,
res
,
ei
,
caller
);
idx
=
id
-
DISPID_ELEMCOL_0
;
if
(
idx
>=
This
->
len
)
return
DISP_E_UNKNOWNNAME
;
switch
(
flags
)
{
case
INVOKE_PROPERTYGET
:
V_VT
(
res
)
=
VT_DISPATCH
;
V_DISPATCH
(
res
)
=
(
IDispatch
*
)
HTMLELEM
(
This
->
elems
[
idx
]);
IHTMLElement_AddRef
(
HTMLELEM
(
This
->
elems
[
idx
]));
break
;
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
}
return
S_OK
;
}
#undef ELEMCOL_THIS
#undef ELEMCOL_THIS
static
const
IHTMLElementCollectionVtbl
HTMLElementCollectionVtbl
=
{
static
const
IHTMLElementCollectionVtbl
HTMLElementCollectionVtbl
=
{
...
@@ -1669,8 +1714,13 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = {
...
@@ -1669,8 +1714,13 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = {
HTMLElementCollection_tags
HTMLElementCollection_tags
};
};
static
const
dispex_static_data_vtbl_t
HTMLElementColection_dispex_vtbl
=
{
HTMLElementCollection_get_dispid
,
HTMLElementCollection_invoke
};
static
dispex_static_data_t
HTMLElementCollection_dispex
=
{
static
dispex_static_data_t
HTMLElementCollection_dispex
=
{
NULL
,
&
HTMLElementColection_dispex_vtbl
,
DispHTMLElementCollection_tid
,
DispHTMLElementCollection_tid
,
NULL
,
NULL
,
{
{
...
...
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