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
11616033
Commit
11616033
authored
May 21, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
May 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IOleInPlaceObjectWindowless::SetObjectRects.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d9693be2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
3 deletions
+66
-3
oleobj.c
dlls/mshtml/oleobj.c
+10
-3
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+56
-0
No files found.
dlls/mshtml/oleobj.c
View file @
11616033
...
...
@@ -1171,11 +1171,18 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectW
}
static
HRESULT
WINAPI
OleInPlaceObjectWindowless_SetObjectRects
(
IOleInPlaceObjectWindowless
*
iface
,
LPCRECT
lprcPosRect
,
LPCRECT
lprcClipRect
)
const
RECT
*
pos
,
const
RECT
*
clip
)
{
HTMLDocument
*
This
=
impl_from_IOleInPlaceObjectWindowless
(
iface
);
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
lprcPosRect
,
lprcClipRect
);
return
E_NOTIMPL
;
RECT
r
;
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
wine_dbgstr_rect
(
pos
),
wine_dbgstr_rect
(
clip
));
if
(
clip
&&
!
EqualRect
(
clip
,
pos
))
FIXME
(
"Ignoring clip rect %s
\n
"
,
wine_dbgstr_rect
(
clip
));
r
=
*
pos
;
return
IOleDocumentView_SetRect
(
&
This
->
doc_obj
->
IOleDocumentView_iface
,
&
r
);
}
static
HRESULT
WINAPI
OleInPlaceObjectWindowless_ReactivateAndUndo
(
IOleInPlaceObjectWindowless
*
iface
)
...
...
dlls/mshtml/tests/htmldoc.c
View file @
11616033
...
...
@@ -7088,6 +7088,61 @@ static void test_OnFrameWindowActivate(IUnknown *unk)
IOleInPlaceActiveObject_Release
(
inplaceact
);
}
static
void
test_object_rects
(
IHTMLDocument2
*
doc
)
{
IOleInPlaceObjectWindowless
*
windowlessobj
;
IOleDocumentView
*
view
;
RECT
r
,
doc_rect
;
HRESULT
hres
;
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IOleInPlaceObjectWindowless
,
(
void
**
)
&
windowlessobj
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IOleInPlaceObjectWindowless) failed: %08x
\n
"
,
hres
);
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IOleDocumentView
,
(
void
**
)
&
view
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IOleDocumentView) failed: %08x
\n
"
,
hres
);
r
.
top
=
1
;
r
.
left
=
2
;
r
.
bottom
=
200
;
r
.
right
=
201
;
hres
=
IOleInPlaceObjectWindowless_SetObjectRects
(
windowlessobj
,
&
r
,
NULL
);
ok
(
hres
==
S_OK
,
"SetObjectRects failed: %08x
\n
"
,
hres
);
GetWindowRect
(
doc_hwnd
,
&
doc_rect
);
MapWindowPoints
(
HWND_DESKTOP
,
container_hwnd
,
(
POINT
*
)
&
doc_rect
,
2
);
ok
(
EqualRect
(
&
r
,
&
doc_rect
),
"unexpected doc rect %s expected %s
\n
"
,
wine_dbgstr_rect
(
&
doc_rect
),
wine_dbgstr_rect
(
&
r
));
memset
(
&
doc_rect
,
0xc0
,
sizeof
(
doc_rect
));
hres
=
IOleDocumentView_GetRect
(
view
,
&
doc_rect
);
ok
(
hres
==
S_OK
,
"GetRect failed: %08x
\n
"
,
hres
);
ok
(
EqualRect
(
&
r
,
&
doc_rect
),
"unexpected doc rect %s expected %s
\n
"
,
wine_dbgstr_rect
(
&
doc_rect
),
wine_dbgstr_rect
(
&
r
));
r
.
top
=
3
;
r
.
left
=
4
;
r
.
bottom
=
205
;
r
.
right
=
206
;
hres
=
IOleDocumentView_SetRect
(
view
,
&
r
);
ok
(
hres
==
S_OK
,
"SetObjectRects failed: %08x
\n
"
,
hres
);
GetWindowRect
(
doc_hwnd
,
&
doc_rect
);
MapWindowPoints
(
HWND_DESKTOP
,
container_hwnd
,
(
POINT
*
)
&
doc_rect
,
2
);
ok
(
EqualRect
(
&
r
,
&
doc_rect
),
"unexpected doc rect %s expected %s
\n
"
,
wine_dbgstr_rect
(
&
doc_rect
),
wine_dbgstr_rect
(
&
r
));
memset
(
&
doc_rect
,
0xc0
,
sizeof
(
doc_rect
));
hres
=
IOleDocumentView_GetRect
(
view
,
&
doc_rect
);
ok
(
hres
==
S_OK
,
"GetRect failed: %08x
\n
"
,
hres
);
ok
(
EqualRect
(
&
r
,
&
doc_rect
),
"unexpected doc rect %s expected %s
\n
"
,
wine_dbgstr_rect
(
&
doc_rect
),
wine_dbgstr_rect
(
&
r
));
IOleInPlaceObjectWindowless_Release
(
windowlessobj
);
IOleDocumentView_Release
(
view
);
}
static
void
test_InPlaceDeactivate
(
IHTMLDocument2
*
doc
,
BOOL
expect_call
)
{
IOleInPlaceObjectWindowless
*
windowlessobj
=
NULL
;
...
...
@@ -7609,6 +7664,7 @@ static void test_HTMLDocument(BOOL do_load, BOOL mime)
test_Window
(
doc
,
TRUE
);
test_external
(
doc
,
TRUE
);
test_target_container
(
doc
);
test_object_rects
(
doc
);
test_UIDeactivate
();
test_OleCommandTarget
(
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