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
73984d4d
Commit
73984d4d
authored
Jul 27, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved conversion to unicode of buffers from binding to navigate.c.
parent
f011cced
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
23 deletions
+24
-23
binding.h
dlls/mshtml/binding.h
+2
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-2
navigate.c
dlls/mshtml/navigate.c
+20
-12
script.c
dlls/mshtml/script.c
+2
-9
No files found.
dlls/mshtml/binding.h
View file @
73984d4d
...
...
@@ -113,3 +113,5 @@ HRESULT channelbsc_load_stream(HTMLInnerWindow*,IStream*) DECLSPEC_HIDDEN;
void
channelbsc_set_channel
(
nsChannelBSC
*
,
nsChannel
*
,
nsIStreamListener
*
,
nsISupports
*
)
DECLSPEC_HIDDEN
;
IUri
*
nsuri_get_uri
(
nsWineURI
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_relative_uri
(
HTMLOuterWindow
*
,
const
WCHAR
*
,
IUri
**
)
DECLSPEC_HIDDEN
;
HRESULT
bind_mon_to_wstr
(
HTMLInnerWindow
*
,
IMoniker
*
,
WCHAR
**
)
DECLSPEC_HIDDEN
;
dlls/mshtml/mshtml_private.h
View file @
73984d4d
...
...
@@ -801,8 +801,6 @@ void abort_window_bindings(HTMLInnerWindow*) DECLSPEC_HIDDEN;
void
set_download_state
(
HTMLDocumentObj
*
,
int
)
DECLSPEC_HIDDEN
;
void
call_docview_84
(
HTMLDocumentObj
*
)
DECLSPEC_HIDDEN
;
HRESULT
bind_mon_to_buffer
(
HTMLInnerWindow
*
,
IMoniker
*
,
void
**
,
DWORD
*
)
DECLSPEC_HIDDEN
;
void
set_ready_state
(
HTMLOuterWindow
*
,
READYSTATE
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLSelectionObject_Create
(
HTMLDocumentNode
*
,
nsISelection
*
,
IHTMLSelectionObject
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
73984d4d
...
...
@@ -772,7 +772,7 @@ typedef struct {
BSCallback
bsc
;
DWORD
size
;
BYTE
*
buf
;
char
*
buf
;
HRESULT
hres
;
}
BufferBSC
;
...
...
@@ -875,27 +875,35 @@ static BufferBSC *create_bufferbsc(IMoniker *mon)
return
ret
;
}
HRESULT
bind_mon_to_
buffer
(
HTMLInnerWindow
*
window
,
IMoniker
*
mon
,
void
**
buf
,
DWORD
*
size
)
HRESULT
bind_mon_to_
wstr
(
HTMLInnerWindow
*
window
,
IMoniker
*
mon
,
WCHAR
**
ret
)
{
BufferBSC
*
bsc
=
create_bufferbsc
(
mon
);
WCHAR
*
text
;
DWORD
len
;
HRESULT
hres
;
*
buf
=
NULL
;
hres
=
start_binding
(
window
,
&
bsc
->
bsc
,
NULL
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
hres
=
bsc
->
hres
;
if
(
SUCCEEDED
(
hres
))
{
*
buf
=
bsc
->
buf
;
bsc
->
buf
=
NULL
;
*
size
=
bsc
->
bsc
.
readed
;
bsc
->
size
=
0
;
}
if
(
FAILED
(
hres
))
{
IBindStatusCallback_Release
(
&
bsc
->
bsc
.
IBindStatusCallback_iface
);
return
hres
;
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
bsc
->
buf
,
bsc
->
bsc
.
readed
,
NULL
,
0
);
text
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
if
(
text
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
bsc
->
buf
,
bsc
->
bsc
.
readed
,
text
,
len
);
text
[
len
]
=
0
;
}
else
{
hres
=
E_OUTOFMEMORY
;
}
IBindStatusCallback_Release
(
&
bsc
->
bsc
.
IBindStatusCallback_iface
);
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
*
ret
=
text
;
return
S_OK
;
}
static
HRESULT
read_post_data_stream
(
nsChannelBSC
*
This
,
nsChannel
*
nschannel
)
...
...
dlls/mshtml/script.c
View file @
73984d4d
...
...
@@ -32,6 +32,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
#include "binding.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
...
...
@@ -661,9 +662,7 @@ static void parse_text(ScriptHost *script_host, LPCWSTR text)
static
void
parse_extern_script
(
ScriptHost
*
script_host
,
LPCWSTR
src
)
{
IMoniker
*
mon
;
char
*
buf
;
WCHAR
*
text
;
DWORD
len
,
size
=
0
;
HRESULT
hres
;
static
const
WCHAR
wine_schemaW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
':'
};
...
...
@@ -675,17 +674,11 @@ static void parse_extern_script(ScriptHost *script_host, LPCWSTR src)
if
(
FAILED
(
hres
))
return
;
hres
=
bind_mon_to_
buffer
(
script_host
->
window
,
mon
,
(
void
**
)
&
buf
,
&
size
);
hres
=
bind_mon_to_
wstr
(
script_host
->
window
,
mon
,
&
text
);
IMoniker_Release
(
mon
);
if
(
FAILED
(
hres
))
return
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
size
,
NULL
,
0
);
text
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
size
,
text
,
len
);
heap_free
(
buf
);
text
[
len
]
=
0
;
parse_text
(
script_host
,
text
);
heap_free
(
text
);
...
...
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