The Blink Rename
This commit is contained in:
parent
b8b7d0ab1a
commit
627eb30409
4 changed files with 17 additions and 17 deletions
|
@ -19,7 +19,7 @@ void CommonWebContentsDelegate::HandleKeyboardEvent(
|
|||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
// Escape exits tabbed fullscreen mode.
|
||||
if (event.windowsKeyCode == ui::VKEY_ESCAPE && is_html_fullscreen())
|
||||
if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen())
|
||||
ExitFullscreenModeForTab(source);
|
||||
|
||||
// Let the NativeWindow handle other parts.
|
||||
|
|
|
@ -82,17 +82,17 @@ void FlipWindowStyle(HWND handle, bool on, DWORD flag) {
|
|||
#endif
|
||||
|
||||
bool IsAltKey(const content::NativeWebKeyboardEvent& event) {
|
||||
return event.windowsKeyCode == ui::VKEY_MENU;
|
||||
return event.windows_key_code == ui::VKEY_MENU;
|
||||
}
|
||||
|
||||
bool IsAltModifier(const content::NativeWebKeyboardEvent& event) {
|
||||
typedef content::NativeWebKeyboardEvent::Modifiers Modifiers;
|
||||
int modifiers = event.modifiers();
|
||||
modifiers &= ~Modifiers::NumLockOn;
|
||||
modifiers &= ~Modifiers::CapsLockOn;
|
||||
return (modifiers == Modifiers::AltKey) ||
|
||||
(modifiers == (Modifiers::AltKey | Modifiers::IsLeft)) ||
|
||||
(modifiers == (Modifiers::AltKey | Modifiers::IsRight));
|
||||
int modifiers = event.GetModifiers();
|
||||
modifiers &= ~Modifiers::kNumLockOn;
|
||||
modifiers &= ~Modifiers::kCapsLockOn;
|
||||
return (modifiers == Modifiers::kAltKey) ||
|
||||
(modifiers == (Modifiers::kAltKey | Modifiers::kIsLeft)) ||
|
||||
(modifiers == (Modifiers::kAltKey | Modifiers::kIsRight));
|
||||
}
|
||||
|
||||
#if defined(USE_X11)
|
||||
|
@ -1252,15 +1252,15 @@ void NativeWindowViews::HandleKeyboardEvent(
|
|||
// Show accelerator when "Alt" is pressed.
|
||||
if (menu_bar_visible_ && IsAltKey(event))
|
||||
menu_bar_->SetAcceleratorVisibility(
|
||||
event.type() == blink::WebInputEvent::RawKeyDown);
|
||||
event.GetType() == blink::WebInputEvent::kRawKeyDown);
|
||||
|
||||
// Show the submenu when "Alt+Key" is pressed.
|
||||
if (event.type() == blink::WebInputEvent::RawKeyDown && !IsAltKey(event) &&
|
||||
IsAltModifier(event)) {
|
||||
if (event.GetType() == blink::WebInputEvent::kRawKeyDown &&
|
||||
!IsAltKey(event) && IsAltModifier(event)) {
|
||||
if (!menu_bar_visible_ &&
|
||||
(menu_bar_->GetAcceleratorIndex(event.windowsKeyCode) != -1))
|
||||
(menu_bar_->GetAcceleratorIndex(event.windows_key_code) != -1))
|
||||
SetMenuBarVisibility(true);
|
||||
menu_bar_->ActivateAccelerator(event.windowsKeyCode);
|
||||
menu_bar_->ActivateAccelerator(event.windows_key_code);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1268,10 +1268,10 @@ void NativeWindowViews::HandleKeyboardEvent(
|
|||
return;
|
||||
|
||||
// Toggle the menu bar only when a single Alt is released.
|
||||
if (event.type() == blink::WebInputEvent::RawKeyDown && IsAltKey(event)) {
|
||||
if (event.GetType() == blink::WebInputEvent::kRawKeyDown && IsAltKey(event)) {
|
||||
// When a single Alt is pressed:
|
||||
menu_bar_alt_pressed_ = true;
|
||||
} else if (event.type() == blink::WebInputEvent::KeyUp && IsAltKey(event) &&
|
||||
} else if (event.GetType() == blink::WebInputEvent::kKeyUp && IsAltKey(event) &&
|
||||
menu_bar_alt_pressed_) {
|
||||
// When a single Alt is released right after a Alt is pressed:
|
||||
menu_bar_alt_pressed_ = false;
|
||||
|
|
|
@ -358,7 +358,7 @@ bool AutofillPopupView::HandleKeyPressEvent(
|
|||
const content::NativeWebKeyboardEvent& event) {
|
||||
if (!popup_)
|
||||
return false;
|
||||
switch (event.windowsKeyCode) {
|
||||
switch (event.windows_key_code) {
|
||||
case ui::VKEY_UP:
|
||||
SelectPreviousLine();
|
||||
return true;
|
||||
|
|
|
@ -290,7 +290,7 @@ bool Converter<blink::WebMouseWheelEvent>::FromV8(
|
|||
bool can_scroll = true;
|
||||
if (dict.Get("canScroll", &can_scroll) && !can_scroll) {
|
||||
out->has_precise_scrolling_deltas = false;
|
||||
out->setModifiers(out->GetModifiers() & ~blink::WebInputEvent::ControlKey);
|
||||
out->SetModifiers(out->GetModifiers() & ~blink::WebInputEvent::kControlKey);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue