Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1023)

Unified Diff: Source/core/page/EventHandler.cpp

Issue 681113006: Remove keyboard event filtering in fullscreen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: oops Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/EventHandler.h ('k') | Source/web/WebElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 3551c07c7aabebba2e1a4930ec54a72f0828ca82..7d7847b8341fb306a04dcfb980e07d5eb41f33e8 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -36,7 +36,6 @@
#include "core/clipboard/DataTransfer.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentMarkerController.h"
-#include "core/dom/Fullscreen.h"
#include "core/dom/NodeRenderingTraversal.h"
#include "core/dom/TouchList.h"
#include "core/dom/shadow/ShadowRoot.h"
@@ -2975,37 +2974,10 @@ bool EventHandler::handleAccessKey(const PlatformKeyboardEvent& evt)
return true;
}
-bool EventHandler::isKeyEventAllowedInFullScreen(Fullscreen* fullscreen, const PlatformKeyboardEvent& keyEvent) const
-{
- if (fullscreen->webkitFullScreenKeyboardInputAllowed())
- return true;
-
- if (keyEvent.type() == PlatformKeyboardEvent::Char) {
- if (keyEvent.text().length() != 1)
- return false;
- UChar character = keyEvent.text()[0];
- return character == ' ';
- }
-
- int keyCode = keyEvent.windowsVirtualKeyCode();
- return (keyCode >= VK_BACK && keyCode <= VK_CAPITAL)
- || (keyCode >= VK_SPACE && keyCode <= VK_DELETE)
- || (keyCode >= VK_OEM_1 && keyCode <= VK_OEM_PLUS)
- || (keyCode >= VK_MULTIPLY && keyCode <= VK_OEM_8);
-}
-
bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
{
RefPtrWillBeRawPtr<FrameView> protector(m_frame->view());
- ASSERT(m_frame->document());
- if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*m_frame->document())) {
- if (fullscreen->webkitCurrentFullScreenElement() && !isKeyEventAllowedInFullScreen(fullscreen, initialKeyEvent)) {
- UseCounter::count(*m_frame->document(), UseCounter::KeyEventNotAllowedInFullScreen);
- return false;
- }
- }
-
if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL)
capsLockStateMayHaveChanged();
« no previous file with comments | « Source/core/page/EventHandler.h ('k') | Source/web/WebElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698