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
59109257
Commit
59109257
authored
Jan 12, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDocument2::get_defaultCharset implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a20cf4c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
15 deletions
+46
-15
htmldoc.c
dlls/mshtml/htmldoc.c
+5
-2
main.c
dlls/mshtml/main.c
+40
-13
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
59109257
...
@@ -921,8 +921,11 @@ static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BST
...
@@ -921,8 +921,11 @@ static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BST
static
HRESULT
WINAPI
HTMLDocument_get_defaultCharset
(
IHTMLDocument2
*
iface
,
BSTR
*
p
)
static
HRESULT
WINAPI
HTMLDocument_get_defaultCharset
(
IHTMLDocument2
*
iface
,
BSTR
*
p
)
{
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument2
(
iface
);
HTMLDocument
*
This
=
impl_from_IHTMLDocument2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
charset_string_from_cp
(
GetACP
());
return
*
p
?
S_OK
:
E_OUTOFMEMORY
;
}
}
static
HRESULT
WINAPI
HTMLDocument_get_mimeType
(
IHTMLDocument2
*
iface
,
BSTR
*
p
)
static
HRESULT
WINAPI
HTMLDocument_get_mimeType
(
IHTMLDocument2
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/main.c
View file @
59109257
...
@@ -54,25 +54,35 @@ static HDC display_dc;
...
@@ -54,25 +54,35 @@ static HDC display_dc;
static
WCHAR
*
status_strings
[
IDS_STATUS_LAST
-
IDS_STATUS_FIRST
+
1
];
static
WCHAR
*
status_strings
[
IDS_STATUS_LAST
-
IDS_STATUS_FIRST
+
1
];
static
IMultiLanguage2
*
mlang
;
static
IMultiLanguage2
*
mlang
;
UINT
cp_from_charset_string
(
BSTR
charset
)
static
BOOL
ensure_mlang
(
void
)
{
{
MIMECSETINFO
info
;
IMultiLanguage2
*
new_mlang
;
HRESULT
hres
;
HRESULT
hres
;
if
(
!
mlang
)
{
if
(
mlang
)
IMultiLanguage2
*
new_mlang
;
return
TRUE
;
hres
=
CoCreateInstance
(
&
CLSID_CMultiLanguage
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMultiLanguage2
,
(
void
**
)
&
new_mlang
);
if
(
FAILED
(
hres
))
{
ERR
(
"Could not create CMultiLanguage instance
\n
"
);
return
CP_UTF8
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
mlang
,
new_mlang
,
NULL
))
hres
=
CoCreateInstance
(
&
CLSID_CMultiLanguage
,
NULL
,
CLSCTX_INPROC_SERVER
,
IMultiLanguage2_Release
(
new_mlang
);
&
IID_IMultiLanguage2
,
(
void
**
)
&
new_mlang
);
if
(
FAILED
(
hres
))
{
ERR
(
"Could not create CMultiLanguage instance
\n
"
);
return
FALSE
;
}
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
mlang
,
new_mlang
,
NULL
))
IMultiLanguage2_Release
(
new_mlang
);
return
TRUE
;
}
UINT
cp_from_charset_string
(
BSTR
charset
)
{
MIMECSETINFO
info
;
HRESULT
hres
;
if
(
!
ensure_mlang
())
return
CP_UTF8
;
hres
=
IMultiLanguage2_GetCharsetInfo
(
mlang
,
charset
,
&
info
);
hres
=
IMultiLanguage2_GetCharsetInfo
(
mlang
,
charset
,
&
info
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
FIXME
(
"GetCharsetInfo failed: %08x
\n
"
,
hres
);
FIXME
(
"GetCharsetInfo failed: %08x
\n
"
,
hres
);
...
@@ -82,6 +92,23 @@ UINT cp_from_charset_string(BSTR charset)
...
@@ -82,6 +92,23 @@ UINT cp_from_charset_string(BSTR charset)
return
info
.
uiInternetEncoding
;
return
info
.
uiInternetEncoding
;
}
}
BSTR
charset_string_from_cp
(
UINT
cp
)
{
MIMECPINFO
info
;
HRESULT
hres
;
if
(
!
ensure_mlang
())
return
SysAllocString
(
NULL
);
hres
=
IMultiLanguage2_GetCodePageInfo
(
mlang
,
cp
,
GetUserDefaultUILanguage
(),
&
info
);
if
(
FAILED
(
hres
))
{
ERR
(
"GetCodePageInfo failed: %08x
\n
"
,
hres
);
return
SysAllocString
(
NULL
);
}
return
SysAllocString
(
info
.
wszWebCharset
);
}
static
void
thread_detach
(
void
)
static
void
thread_detach
(
void
)
{
{
thread_data_t
*
thread_data
;
thread_data_t
*
thread_data
;
...
...
dlls/mshtml/mshtml_private.h
View file @
59109257
...
@@ -1271,6 +1271,7 @@ static inline void windowref_release(windowref_t *ref)
...
@@ -1271,6 +1271,7 @@ static inline void windowref_release(windowref_t *ref)
}
}
UINT
cp_from_charset_string
(
BSTR
)
DECLSPEC_HIDDEN
;
UINT
cp_from_charset_string
(
BSTR
)
DECLSPEC_HIDDEN
;
BSTR
charset_string_from_cp
(
UINT
)
DECLSPEC_HIDDEN
;
HDC
get_display_dc
(
void
)
DECLSPEC_HIDDEN
;
HDC
get_display_dc
(
void
)
DECLSPEC_HIDDEN
;
HINSTANCE
get_shdoclc
(
void
)
DECLSPEC_HIDDEN
;
HINSTANCE
get_shdoclc
(
void
)
DECLSPEC_HIDDEN
;
void
set_statustext
(
HTMLDocumentObj
*
,
INT
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
void
set_statustext
(
HTMLDocumentObj
*
,
INT
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
...
...
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