mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 20:19:41 +00:00
Cleaned up whitespace, so we can finally merge #211. (not all of the errors was introduced in the PR though, some was pre-existent)
This commit is contained in:
+35
-35
@@ -184,42 +184,42 @@ namespace CefSharp
|
||||
|
||||
void WebView::OnPreviewKey(KeyEventArgs^ e)
|
||||
{
|
||||
CefRefPtr<CefBrowser> browser;
|
||||
if (!TryGetCefBrowser(browser))
|
||||
{
|
||||
return;
|
||||
}
|
||||
CefRefPtr<CefBrowser> browser;
|
||||
if (!TryGetCefBrowser(browser))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (e->Key == Key::Tab ||e->Key >= Key::Left && e->Key <= Key::Down)
|
||||
{
|
||||
CefBrowser::KeyType type = e->IsDown ? KT_KEYDOWN : KT_KEYUP;
|
||||
CefKeyInfo keyInfo;
|
||||
keyInfo.key = KeyInterop::VirtualKeyFromKey(e->Key);
|
||||
browser->SendKeyEvent(type, keyInfo, 0);
|
||||
if (e->Key == Key::Tab || e->Key >= Key::Left && e->Key <= Key::Down)
|
||||
{
|
||||
CefBrowser::KeyType type = e->IsDown ? KT_KEYDOWN : KT_KEYUP;
|
||||
CefKeyInfo keyInfo;
|
||||
keyInfo.key = KeyInterop::VirtualKeyFromKey(e->Key);
|
||||
browser->SendKeyEvent(type, keyInfo, 0);
|
||||
|
||||
e->Handled = true;
|
||||
}
|
||||
e->Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
void WebView::OnPreviewTextInput(TextCompositionEventArgs^ e)
|
||||
{
|
||||
CefRefPtr<CefBrowser> browser;
|
||||
if (!TryGetCefBrowser(browser))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CefBrowser::KeyType type;
|
||||
for (int i = 0; i < e->Text->Length; i++)
|
||||
{
|
||||
CefKeyInfo keyInfo;
|
||||
keyInfo.key = (int)e->Text[i];
|
||||
type = KT_CHAR;
|
||||
browser->SendKeyEvent(type, keyInfo, 0);
|
||||
}
|
||||
e->Handled = true;
|
||||
}
|
||||
|
||||
void WebView::OnPreviewTextInput(TextCompositionEventArgs^ e)
|
||||
{
|
||||
CefRefPtr<CefBrowser> browser;
|
||||
if (!TryGetCefBrowser(browser))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CefBrowser::KeyType type;
|
||||
for (int i = 0;i<e->Text->Length;i++)
|
||||
{
|
||||
CefKeyInfo keyInfo;
|
||||
keyInfo.key =(int)e->Text[i];
|
||||
type = KT_CHAR;
|
||||
browser->SendKeyEvent(type, keyInfo, 0);
|
||||
}
|
||||
e->Handled = true;
|
||||
}
|
||||
|
||||
void WebView::OnMouseButton(MouseButtonEventArgs^ e)
|
||||
{
|
||||
CefRefPtr<CefBrowser> browser;
|
||||
@@ -667,7 +667,7 @@ namespace CefSharp
|
||||
|
||||
Content = _image = gcnew Image();
|
||||
RenderOptions::SetBitmapScalingMode(_image, BitmapScalingMode::NearestNeighbor);
|
||||
|
||||
|
||||
_popup = gcnew Popup();
|
||||
_popup->Child = _popupImage = gcnew Image();
|
||||
|
||||
@@ -701,7 +701,7 @@ namespace CefSharp
|
||||
{
|
||||
// If the display properties is set to e.g. 125%, M11 and M22 will be 1.25.
|
||||
return _matrix->M11 != 1 ||
|
||||
_matrix->M22 != 1;
|
||||
_matrix->M22 != 1;
|
||||
}
|
||||
|
||||
Transform^ WebView::GetScaleTransform()
|
||||
@@ -822,7 +822,7 @@ namespace CefSharp
|
||||
void WebView::SetPopupSizeAndPosition(const void* rect)
|
||||
{
|
||||
auto cefRect = (const CefRect*) rect;
|
||||
|
||||
|
||||
_popupX = cefRect->x;
|
||||
_popupY = cefRect->y;
|
||||
_popupWidth = cefRect->width;
|
||||
|
||||
Reference in New Issue
Block a user