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
92517e2c
Commit
92517e2c
authored
Feb 19, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added support for ZoomFactor registry value.
parent
99eab9d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
2 deletions
+92
-2
nsiface.idl
dlls/mshtml/nsiface.idl
+41
-0
oleobj.c
dlls/mshtml/oleobj.c
+51
-2
No files found.
dlls/mshtml/nsiface.idl
View file @
92517e2c
...
...
@@ -3703,6 +3703,47 @@ interface nsIDocShell : nsIDocShellTreeItem
[
object
,
uuid
(
02
d37b31
-
e654
-
4b74
-
9b
c3
-
14
dfe0020bb3
),
local
]
interface
nsIMarkupDocumentViewer
:
nsISupports
{
nsresult
ScrollToNode
(
nsIDOMNode
*
node
)
;
nsresult
GetTextZoom
(
float
*
aTextZoom
)
;
nsresult
SetTextZoom
(
float
aTextZoom
)
;
nsresult
GetFullZoom
(
float
*
aFullZoom
)
;
nsresult
SetFullZoom
(
float
aFullZoom
)
;
nsresult
GetAuthorStyleDisabled
(
bool
*
aAuthorStyleDisabled
)
;
nsresult
SetAuthorStyleDisabled
(
bool
aAuthorStyleDisabled
)
;
nsresult
GetDefaultCharacterSet
(
nsACString
*
aDefaultCharacterSet
)
;
nsresult
SetDefaultCharacterSet
(
const
nsACString
*
aDefaultCharacterSet
)
;
nsresult
GetForceCharacterSet
(
nsACString
*
aForceCharacterSet
)
;
nsresult
SetForceCharacterSet
(
const
nsACString
*
aForceCharacterSet
)
;
nsresult
GetHintCharacterSet
(
nsACString
*
aHintCharacterSet
)
;
nsresult
SetHintCharacterSet
(
const
nsACString
*
aHintCharacterSet
)
;
nsresult
GetHintCharacterSetSource
(
int32_t
*
aHintCharacterSetSource
)
;
nsresult
SetHintCharacterSetSource
(
int32_t
aHintCharacterSetSource
)
;
nsresult
GetPrevDocCharacterSet
(
nsACString
*
aPrevDocCharacterSet
)
;
nsresult
SetPrevDocCharacterSet
(
const
nsACString
*
aPrevDocCharacterSet
)
;
nsresult
GetContentSize
(
int32_t
*
width
,
int32_t
*
height
)
;
nsresult
GetBidiTextDirection
(
uint8_t
*
aBidiTextDirection
)
;
nsresult
SetBidiTextDirection
(
uint8_t
aBidiTextDirection
)
;
nsresult
GetBidiTextType
(
uint8_t
*
aBidiTextType
)
;
nsresult
SetBidiTextType
(
uint8_t
aBidiTextType
)
;
nsresult
GetBidiNumeral
(
uint8_t
*
aBidiNumeral
)
;
nsresult
SetBidiNumeral
(
uint8_t
aBidiNumeral
)
;
nsresult
GetBidiSupport
(
uint8_t
*
aBidiSupport
)
;
nsresult
SetBidiSupport
(
uint8_t
aBidiSupport
)
;
nsresult
GetBidiOptions
(
uint32_t
*
aBidiOptions
)
;
nsresult
SetBidiOptions
(
uint32_t
aBidiOptions
)
;
nsresult
GetMinFontSize
(
int32_t
*
aMinFontSize
)
;
nsresult
SetMinFontSize
(
int32_t
aMinFontSize
)
;
nsresult
AppendSubtree
(
void
/*
nsTArray
<
nsCOMPtr
<
nsIMarkupDocumentViewer
>>
*/
*
array
)
;
nsresult
ChangeMaxLineBoxWidth
(
int32_t
maxLineBoxWidth
)
;
}
[
object
,
uuid
(
16
fe5e3e
-
eadc
-
4312
-
9
d44
-
b6bedd6b5474
),
local
]
...
...
dlls/mshtml/oleobj.c
View file @
92517e2c
...
...
@@ -20,6 +20,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
#define COBJMACROS
...
...
@@ -226,6 +227,52 @@ void set_document_navigation(HTMLDocumentObj *doc, BOOL doc_can_navigate)
doc_can_navigate
?
&
var
:
NULL
,
NULL
);
}
static
void
load_settings
(
HTMLDocumentObj
*
doc
)
{
nsIMarkupDocumentViewer
*
markup_document_viewer
;
nsIContentViewer
*
content_viewer
;
nsIDocShell
*
doc_shell
;
HKEY
settings_key
;
DWORD
val
,
size
;
LONG
res
;
nsresult
nsres
;
static
const
WCHAR
ie_keyW
[]
=
{
'S'
,
'O'
,
'F'
,
'T'
,
'W'
,
'A'
,
'R'
,
'E'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
zoomW
[]
=
{
'Z'
,
'o'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
zoom_factorW
[]
=
{
'Z'
,
'o'
,
'o'
,
'm'
,
'F'
,
'a'
,
'c'
,
't'
,
'o'
,
'r'
,
0
};
res
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
ie_keyW
,
&
settings_key
);
if
(
res
!=
ERROR_SUCCESS
)
return
;
size
=
sizeof
(
val
);
res
=
RegGetValueW
(
settings_key
,
zoomW
,
zoom_factorW
,
RRF_RT_REG_DWORD
,
NULL
,
&
val
,
&
size
);
RegCloseKey
(
settings_key
);
if
(
res
!=
ERROR_SUCCESS
)
return
;
TRACE
(
"Setting ZoomFactor to %u
\n
"
,
val
);
nsres
=
get_nsinterface
((
nsISupports
*
)
doc
->
nscontainer
->
navigation
,
&
IID_nsIDocShell
,
(
void
**
)
&
doc_shell
);
assert
(
nsres
==
NS_OK
);
nsres
=
nsIDocShell_GetContentViewer
(
doc_shell
,
&
content_viewer
);
assert
(
nsres
==
NS_OK
&&
content_viewer
);
nsres
=
nsISupports_QueryInterface
(
content_viewer
,
&
IID_nsIMarkupDocumentViewer
,
(
void
**
)
&
markup_document_viewer
);
nsISupports_Release
(
content_viewer
);
assert
(
nsres
==
NS_OK
);
nsres
=
nsIMarkupDocumentViewer_SetFullZoom
(
markup_document_viewer
,
(
float
)
val
/
100000
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetFullZoom failed: %08x
\n
"
,
nsres
);
nsIDocShell_Release
(
doc_shell
);
}
static
HRESULT
WINAPI
OleObject_SetClientSite
(
IOleObject
*
iface
,
IOleClientSite
*
pClientSite
)
{
HTMLDocument
*
This
=
impl_from_IOleObject
(
iface
);
...
...
@@ -319,7 +366,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
if
(
hres
==
S_OK
&&
key_path
)
{
if
(
key_path
[
0
])
{
/* FIXME: use key_path */
TRAC
E
(
"key_path = %s
\n
"
,
debugstr_w
(
key_path
));
FIXM
E
(
"key_path = %s
\n
"
,
debugstr_w
(
key_path
));
}
CoTaskMemFree
(
key_path
);
}
...
...
@@ -331,7 +378,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
if
(
hres
==
S_OK
&&
override_key_path
&&
override_key_path
[
0
])
{
if
(
override_key_path
[
0
])
{
/*FIXME: use override_key_path */
TRAC
E
(
"override_key_path = %s
\n
"
,
debugstr_w
(
override_key_path
));
FIXM
E
(
"override_key_path = %s
\n
"
,
debugstr_w
(
override_key_path
));
}
CoTaskMemFree
(
override_key_path
);
}
...
...
@@ -342,6 +389,8 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
}
}
load_settings
(
This
->
doc_obj
);
/* Native calls here GetWindow. What is it for?
* We don't have anything to do with it here (yet). */
hres
=
IOleClientSite_QueryInterface
(
pClientSite
,
&
IID_IOleWindow
,
(
void
**
)
&
ole_window
);
...
...
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