Fix mixed line breaks in webview sources
This commit is contained in:
@@ -56,8 +56,8 @@ bool DecodeString(const wxString& in, wxString* out)
|
|||||||
out->append('\\');
|
out->append('\\');
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
#if SIZEOF_WCHAR_T == 2
|
#if SIZEOF_WCHAR_T == 2
|
||||||
// In this case, we handle surrogates without doing anything special was wchar_t strings use UTF-17 encoding.
|
// In this case, we handle surrogates without doing anything special was wchar_t strings use UTF-17 encoding.
|
||||||
if (wxIsxdigit(ch[1]) && wxIsxdigit(ch[2]) &&
|
if (wxIsxdigit(ch[1]) && wxIsxdigit(ch[2]) &&
|
||||||
wxIsxdigit(ch[3]) && wxIsxdigit(ch[4]))
|
wxIsxdigit(ch[3]) && wxIsxdigit(ch[4]))
|
||||||
{
|
{
|
||||||
|
@@ -746,15 +746,15 @@ bool wxWebViewFactoryEdge::IsAvailable()
|
|||||||
wxVersionInfo wxWebViewFactoryEdge::GetVersionInfo()
|
wxVersionInfo wxWebViewFactoryEdge::GetVersionInfo()
|
||||||
{
|
{
|
||||||
IsAvailable(); // Make sure ms_version string is initialized (if available)
|
IsAvailable(); // Make sure ms_version string is initialized (if available)
|
||||||
long major = 0,
|
long major = 0,
|
||||||
minor = 0,
|
minor = 0,
|
||||||
micro = 0;
|
micro = 0;
|
||||||
wxStringTokenizer tk(wxWebViewEdgeImpl::ms_version, ". ");
|
wxStringTokenizer tk(wxWebViewEdgeImpl::ms_version, ". ");
|
||||||
// Ignore the return value because if the version component is missing
|
// Ignore the return value because if the version component is missing
|
||||||
// or invalid (i.e. non-numeric), the only thing we can do is to ignore
|
// or invalid (i.e. non-numeric), the only thing we can do is to ignore
|
||||||
// it anyhow.
|
// it anyhow.
|
||||||
tk.GetNextToken().ToLong(&major);
|
tk.GetNextToken().ToLong(&major);
|
||||||
tk.GetNextToken().ToLong(&minor);
|
tk.GetNextToken().ToLong(&minor);
|
||||||
tk.GetNextToken().ToLong(µ);
|
tk.GetNextToken().ToLong(µ);
|
||||||
|
|
||||||
return wxVersionInfo("Microsoft Edge WebView2", major, minor, micro);
|
return wxVersionInfo("Microsoft Edge WebView2", major, minor, micro);
|
||||||
|
@@ -58,16 +58,16 @@ wxVersionInfo wxWebViewFactoryIE::GetVersionInfo()
|
|||||||
wxRegKey key(wxRegKey::HKLM, "Software\\Microsoft\\Internet Explorer");
|
wxRegKey key(wxRegKey::HKLM, "Software\\Microsoft\\Internet Explorer");
|
||||||
wxString value;
|
wxString value;
|
||||||
key.QueryValue("Version", value);
|
key.QueryValue("Version", value);
|
||||||
long major = 0,
|
long major = 0,
|
||||||
minor = 0,
|
minor = 0,
|
||||||
micro = 0;
|
micro = 0;
|
||||||
wxStringTokenizer tk(value, ". ");
|
wxStringTokenizer tk(value, ". ");
|
||||||
// Ignore the return value because if the version component is missing
|
// Ignore the return value because if the version component is missing
|
||||||
// or invalid (i.e. non-numeric), the only thing we can do is to ignore
|
// or invalid (i.e. non-numeric), the only thing we can do is to ignore
|
||||||
// it anyhow.
|
// it anyhow.
|
||||||
tk.GetNextToken().ToLong(&major);
|
tk.GetNextToken().ToLong(&major);
|
||||||
tk.GetNextToken().ToLong(&minor);
|
tk.GetNextToken().ToLong(&minor);
|
||||||
tk.GetNextToken().ToLong(µ);
|
tk.GetNextToken().ToLong(µ);
|
||||||
return wxVersionInfo("Internet Explorer", major, minor, micro);
|
return wxVersionInfo("Internet Explorer", major, minor, micro);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user