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
4633304c
Commit
4633304c
authored
Jun 29, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLRectCollection::item implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cbb70ff0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+27
-1
dom.c
dlls/mshtml/tests/dom.c
+14
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
4633304c
...
...
@@ -671,8 +671,34 @@ static HRESULT WINAPI HTMLRectCollection_get__newEnum(IHTMLRectCollection *iface
static
HRESULT
WINAPI
HTMLRectCollection_item
(
IHTMLRectCollection
*
iface
,
VARIANT
*
index
,
VARIANT
*
result
)
{
HTMLRectCollection
*
This
=
impl_from_IHTMLRectCollection
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_variant
(
index
),
result
);
nsIDOMClientRect
*
nsrect
;
IHTMLRect
*
rect
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_variant
(
index
),
result
);
if
(
V_VT
(
index
)
!=
VT_I4
||
V_I4
(
index
)
<
0
)
{
FIXME
(
"Unsupported for %s index
\n
"
,
debugstr_variant
(
index
));
return
E_NOTIMPL
;
}
nsres
=
nsIDOMClientRectList_Item
(
This
->
rect_list
,
V_I4
(
index
),
&
nsrect
);
if
(
NS_FAILED
(
nsres
))
return
map_nsresult
(
nsres
);
if
(
!
nsrect
)
{
V_VT
(
result
)
=
VT_NULL
;
return
S_OK
;
}
hres
=
create_html_rect
(
nsrect
,
&
rect
);
nsIDOMClientRect_Release
(
nsrect
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
result
)
=
VT_DISPATCH
;
V_DISPATCH
(
result
)
=
(
IDispatch
*
)
rect
;
return
S_OK
;
}
static
const
IHTMLRectCollectionVtbl
HTMLRectCollectionVtbl
=
{
...
...
dlls/mshtml/tests/dom.c
View file @
4633304c
...
...
@@ -5144,6 +5144,7 @@ static void test_elem_bounding_client_rect(IUnknown *unk)
IHTMLRectCollection
*
rects
;
IHTMLRect
*
rect
,
*
rect2
;
IHTMLElement2
*
elem2
;
VARIANT
v
,
index
;
LONG
l
;
HRESULT
hres
;
...
...
@@ -5185,6 +5186,19 @@ static void test_elem_bounding_client_rect(IUnknown *unk)
test_disp
((
IUnknown
*
)
rects
,
&
IID_IHTMLRectCollection
,
NULL
,
L"[object]"
);
hres
=
IHTMLRectCollection_get_length
(
rects
,
&
l
);
ok
(
hres
==
S_OK
,
"get_length failed: %08x
\n
"
,
hres
);
ok
(
l
==
1
,
"length = %u
\n
"
,
l
);
V_VT
(
&
index
)
=
VT_I4
;
V_I4
(
&
index
)
=
0
;
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLRectCollection_item
(
rects
,
&
index
,
&
v
);
ok
(
hres
==
S_OK
,
"item failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_DISPATCH
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
test_disp
((
IUnknown
*
)
V_DISPATCH
(
&
v
),
&
IID_IHTMLRect
,
NULL
,
L"[object]"
);
VariantClear
(
&
v
);
IHTMLRectCollection_Release
(
rects
);
IHTMLElement2_Release
(
elem2
);
}
...
...
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