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
a815677d
Commit
a815677d
authored
Nov 19, 2008
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Nov 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw/tests: Make the webbrowser test dpi aware, make it pass in wine.
parent
0a66633c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
Makefile.in
dlls/shdocvw/Makefile.in
+1
-1
oleobject.c
dlls/shdocvw/oleobject.c
+13
-2
Makefile.in
dlls/shdocvw/tests/Makefile.in
+1
-1
webbrowser.c
dlls/shdocvw/tests/webbrowser.c
+15
-1
No files found.
dlls/shdocvw/Makefile.in
View file @
a815677d
...
...
@@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
shdocvw.dll
IMPORTLIB
=
shdocvw
IMPORTS
=
uuid shell32 shlwapi user32 advapi32 kernel32
IMPORTS
=
uuid shell32 shlwapi user32
gdi32
advapi32 kernel32
DELAYIMPORTS
=
version urlmon ole32 oleaut32
C_SRCS
=
\
...
...
dlls/shdocvw/oleobject.c
View file @
a815677d
...
...
@@ -890,6 +890,16 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
void
WebBrowser_OleObject_Init
(
WebBrowser
*
This
)
{
DWORD
dpi_x
;
DWORD
dpi_y
;
HDC
hdc
;
/* default aspect ratio is 96dpi / 96dpi */
hdc
=
GetDC
(
0
);
dpi_x
=
GetDeviceCaps
(
hdc
,
LOGPIXELSX
);
dpi_y
=
GetDeviceCaps
(
hdc
,
LOGPIXELSY
);
ReleaseDC
(
0
,
hdc
);
This
->
lpOleObjectVtbl
=
&
OleObjectVtbl
;
This
->
lpOleInPlaceObjectVtbl
=
&
OleInPlaceObjectVtbl
;
This
->
lpOleControlVtbl
=
&
OleControlVtbl
;
...
...
@@ -907,8 +917,9 @@ void WebBrowser_OleObject_Init(WebBrowser *This)
memset
(
&
This
->
clip_rect
,
0
,
sizeof
(
RECT
));
memset
(
&
This
->
frameinfo
,
0
,
sizeof
(
OLEINPLACEFRAMEINFO
));
This
->
extent
.
cx
=
1323
;
This
->
extent
.
cy
=
529
;
/* The size is dpi dependent */
This
->
extent
.
cx
=
127000
/
dpi_x
;
This
->
extent
.
cy
=
50800
/
dpi_y
;
}
void
WebBrowser_OleObject_Destroy
(
WebBrowser
*
This
)
...
...
dlls/shdocvw/tests/Makefile.in
View file @
a815677d
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
shdocvw.dll
IMPORTS
=
shell32 ole32 oleaut32 user32 advapi32 kernel32
IMPORTS
=
shell32 ole32 oleaut32 user32
gdi32
advapi32 kernel32
CTESTS
=
\
intshcut.c
\
...
...
dlls/shdocvw/tests/webbrowser.c
View file @
a815677d
...
...
@@ -1816,6 +1816,17 @@ static void test_Extent(IUnknown *unk)
IOleObject
*
oleobj
;
SIZE
size
;
HRESULT
hres
;
DWORD
dpi_x
;
DWORD
dpi_y
;
HDC
hdc
;
/* default aspect ratio is 96dpi / 96dpi */
hdc
=
GetDC
(
0
);
dpi_x
=
GetDeviceCaps
(
hdc
,
LOGPIXELSX
);
dpi_y
=
GetDeviceCaps
(
hdc
,
LOGPIXELSY
);
ReleaseDC
(
0
,
hdc
);
if
(
dpi_x
!=
96
||
dpi_y
!=
96
)
trace
(
"dpi: %d / %d
\n
"
,
dpi_y
,
dpi_y
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
ok
(
hres
==
S_OK
,
"Could not get IOleObkect: %08x
\n
"
,
hres
);
...
...
@@ -1825,7 +1836,10 @@ 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
);
ok
(
size
.
cx
==
1323
&&
size
.
cy
==
529
,
"size = {%d %d}
\n
"
,
size
.
cx
,
size
.
cy
);
/* 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
);
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