mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
bug 281781 : HandleDDENotification returns zero-extended values for WWW_GetWindowInfo patch by Masayuki Nakano, r=jshin, sr=bz, a=asa
This commit is contained in:
parent
1bc071b87a
commit
c75d55c0dc
@ -76,6 +76,7 @@
|
||||
#include "nsIJSContextStack.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsIWindowMediator.h"
|
||||
#include "nsNativeCharsetUtils.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
@ -1090,12 +1091,15 @@ nsNativeAppSupportWin::HandleDDENotification( UINT uType, // transaction t
|
||||
nsCAutoString outpt( NS_LITERAL_CSTRING("\"") );
|
||||
// Now copy the URL converting the Unicode string
|
||||
// to a single-byte ASCII string
|
||||
outpt.Append( NS_LossyConvertUCS2toASCII( url ) );
|
||||
nsCAutoString tmpNativeStr;
|
||||
NS_CopyUnicodeToNative( url, tmpNativeStr );
|
||||
outpt.Append( tmpNativeStr );
|
||||
// Add the "," used to separate the URL and the page
|
||||
// title
|
||||
outpt.Append( NS_LITERAL_CSTRING("\",\"") );
|
||||
// Now copy the current page title to the return string
|
||||
outpt.Append( NS_LossyConvertUCS2toASCII( title.get() ));
|
||||
NS_CopyUnicodeToNative( title, tmpNativeStr );
|
||||
outpt.Append( tmpNativeStr );
|
||||
// Fill out the return string with the remainin ",""
|
||||
outpt.Append( NS_LITERAL_CSTRING( "\",\"\"" ));
|
||||
|
||||
|
@ -72,6 +72,7 @@
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsXPFEComponentsCID.h"
|
||||
#include "nsNativeCharsetUtils.h"
|
||||
|
||||
struct JSContext;
|
||||
|
||||
@ -1511,12 +1512,15 @@ nsNativeAppSupportWin::HandleDDENotification( UINT uType, // transaction t
|
||||
nsCAutoString outpt( NS_LITERAL_CSTRING("\"") );
|
||||
// Now copy the URL converting the Unicode string
|
||||
// to a single-byte ASCII string
|
||||
outpt.Append( NS_LossyConvertUTF16toASCII( url ) );
|
||||
nsCAutoString tmpNativeStr;
|
||||
NS_CopyUnicodeToNative( url, tmpNativeStr );
|
||||
outpt.Append( tmpNativeStr );
|
||||
// Add the "," used to separate the URL and the page
|
||||
// title
|
||||
outpt.Append( NS_LITERAL_CSTRING("\",\"") );
|
||||
// Now copy the current page title to the return string
|
||||
outpt.Append( NS_LossyConvertUTF16toASCII( title ));
|
||||
NS_CopyUnicodeToNative( title, tmpNativeStr );
|
||||
outpt.Append( tmpNativeStr );
|
||||
// Fill out the return string with the remainin ",""
|
||||
outpt.Append( NS_LITERAL_CSTRING( "\",\"\"" ));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user