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
e37f8f23
Commit
e37f8f23
authored
Nov 21, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Fix the computation of the default extents.
parent
bd8e14be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
oleobject.c
dlls/shdocvw/oleobject.c
+3
-3
webbrowser.c
dlls/shdocvw/tests/webbrowser.c
+6
-5
No files found.
dlls/shdocvw/oleobject.c
View file @
e37f8f23
...
...
@@ -917,9 +917,9 @@ void WebBrowser_OleObject_Init(WebBrowser *This)
memset
(
&
This
->
clip_rect
,
0
,
sizeof
(
RECT
));
memset
(
&
This
->
frameinfo
,
0
,
sizeof
(
OLEINPLACEFRAMEINFO
));
/*
The size is dpi dependent
*/
This
->
extent
.
cx
=
127000
/
dpi_x
;
This
->
extent
.
cy
=
50800
/
dpi_y
;
/*
Default size is 50x20 pixels, in himetric units
*/
This
->
extent
.
cx
=
MulDiv
(
50
,
2540
,
dpi_x
)
;
This
->
extent
.
cy
=
MulDiv
(
20
,
2540
,
dpi_y
)
;
}
void
WebBrowser_OleObject_Destroy
(
WebBrowser
*
This
)
...
...
dlls/shdocvw/tests/webbrowser.c
View file @
e37f8f23
...
...
@@ -1814,7 +1814,7 @@ static void test_GetControlInfo(IUnknown *unk)
static
void
test_Extent
(
IUnknown
*
unk
)
{
IOleObject
*
oleobj
;
SIZE
size
;
SIZE
size
,
expected
;
HRESULT
hres
;
DWORD
dpi_x
;
DWORD
dpi_y
;
...
...
@@ -1836,10 +1836,11 @@ static void test_Extent(IUnknown *unk)
size
.
cx
=
size
.
cy
=
0xdeadbeef
;
hres
=
IOleObject_GetExtent
(
oleobj
,
DVASPECT_CONTENT
,
&
size
);
ok
(
hres
==
S_OK
,
"GetExtent failed: %08x
\n
"
,
hres
);
/* The default size is dpi dependent (96:1323x529 / 120:1058x423) */
ok
(
size
.
cx
==
(
127000
/
dpi_x
)
&&
size
.
cy
==
(
50800
/
dpi_y
),
"size = {%d %d} (expected %d %d)
\n
"
,
size
.
cx
,
size
.
cy
,
127000
/
dpi_x
,
50800
/
dpi_y
);
/* Default size is 50x20 pixels, in himetric units */
expected
.
cx
=
MulDiv
(
50
,
2540
,
dpi_x
);
expected
.
cy
=
MulDiv
(
20
,
2540
,
dpi_y
);
ok
(
size
.
cx
==
expected
.
cx
&&
size
.
cy
==
expected
.
cy
,
"size = {%d %d} (expected %d %d)
\n
"
,
size
.
cx
,
size
.
cy
,
expected
.
cx
,
expected
.
cy
);
size
.
cx
=
800
;
size
.
cy
=
700
;
...
...
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