Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ca54be2c
Commit
ca54be2c
authored
Nov 30, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLScreen::get_width implementation.
parent
1ddc01c0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
+40
-3
htmlscreen.c
dlls/mshtml/htmlscreen.c
+5
-2
main.c
dlls/mshtml/main.c
+18
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
Makefile.in
dlls/mshtml/tests/Makefile.in
+1
-1
dom.c
dlls/mshtml/tests/dom.c
+15
-0
No files found.
dlls/mshtml/htmlscreen.c
View file @
ca54be2c
...
...
@@ -148,8 +148,11 @@ static HRESULT WINAPI HTMLScreen_get_bufferDepth(IHTMLScreen *iface, LONG *p)
static
HRESULT
WINAPI
HTMLScreen_get_width
(
IHTMLScreen
*
iface
,
LONG
*
p
)
{
HTMLScreen
*
This
=
HTMLSCREEN_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
GetDeviceCaps
(
get_display_dc
(),
HORZRES
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLScreen_get_height
(
IHTMLScreen
*
iface
,
LONG
*
p
)
...
...
dlls/mshtml/main.c
View file @
ca54be2c
...
...
@@ -47,6 +47,7 @@ HINSTANCE hInst;
DWORD
mshtml_tls
=
TLS_OUT_OF_INDEXES
;
static
HINSTANCE
shdoclc
=
NULL
;
static
HDC
display_dc
;
static
void
thread_detach
(
void
)
{
...
...
@@ -71,6 +72,8 @@ static void process_detach(void)
FreeLibrary
(
shdoclc
);
if
(
mshtml_tls
!=
TLS_OUT_OF_INDEXES
)
TlsFree
(
mshtml_tls
);
if
(
display_dc
)
DeleteObject
(
display_dc
);
}
HINSTANCE
get_shdoclc
(
void
)
...
...
@@ -84,6 +87,21 @@ HINSTANCE get_shdoclc(void)
return
shdoclc
=
LoadLibraryExW
(
wszShdoclc
,
NULL
,
LOAD_LIBRARY_AS_DATAFILE
);
}
HDC
get_display_dc
(
void
)
{
static
const
WCHAR
displayW
[]
=
{
'D'
,
'I'
,
'S'
,
'P'
,
'L'
,
'A'
,
'Y'
,
0
};
if
(
!
display_dc
)
{
HDC
hdc
;
hdc
=
CreateICW
(
displayW
,
NULL
,
NULL
,
NULL
);
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
display_dc
,
hdc
,
NULL
))
DeleteObject
(
hdc
);
}
return
display_dc
;
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
{
switch
(
fdwReason
)
{
...
...
dlls/mshtml/mshtml_private.h
View file @
ca54be2c
...
...
@@ -940,6 +940,7 @@ static inline void windowref_release(windowref_t *ref)
heap_free
(
ref
);
}
HDC
get_display_dc
(
void
);
HINSTANCE
get_shdoclc
(
void
);
extern
HINSTANCE
hInst
;
dlls/mshtml/tests/Makefile.in
View file @
ca54be2c
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
mshtml.dll
IMPORTS
=
ole32 oleaut32 user32 urlmon advapi32 kernel32
IMPORTS
=
ole32 oleaut32 user32 urlmon
gdi32
advapi32 kernel32
CTESTS
=
\
dom.c
\
...
...
dlls/mshtml/tests/dom.c
View file @
ca54be2c
...
...
@@ -3035,8 +3035,12 @@ static void test_navigator(IHTMLDocument2 *doc)
static
void
test_screen
(
IHTMLWindow2
*
window
)
{
IHTMLScreen
*
screen
,
*
screen2
;
LONG
l
,
exl
;
HDC
hdc
;
HRESULT
hres
;
static
const
WCHAR
displayW
[]
=
{
'D'
,
'I'
,
'S'
,
'P'
,
'L'
,
'A'
,
'Y'
,
0
};
screen
=
NULL
;
hres
=
IHTMLWindow2_get_screen
(
window
,
&
screen
);
ok
(
hres
==
S_OK
,
"get_screen failed: %08x
\n
"
,
hres
);
...
...
@@ -3051,6 +3055,17 @@ static void test_screen(IHTMLWindow2 *window)
test_disp
((
IUnknown
*
)
screen
,
&
DIID_DispHTMLScreen
,
"[object]"
);
hdc
=
CreateICW
(
displayW
,
NULL
,
NULL
,
NULL
);
exl
=
GetDeviceCaps
(
hdc
,
HORZRES
);
l
=
0xdeadbeef
;
hres
=
IHTMLScreen_get_width
(
screen
,
&
l
);
ok
(
hres
==
S_OK
,
"get_width failed: %08x
\n
"
,
hres
);
ok
(
l
==
exl
,
"width = %d, expected %d
\n
"
,
l
,
exl
);
DeleteObject
(
hdc
);
IHTMLScreen_Release
(
screen
);
}
...
...
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