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

Unified Diff: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp

Issue 2255323004: Create MouseEventManager and EventHandlingUtil (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 4 years, 3 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
Index: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp b/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
index e5b1abc0ea5fc708f0b649f2ad4964ecd31799f9..cd31aaef3bd3949135d2d4a0bca8763932bc4edd 100644
--- a/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
@@ -8,7 +8,8 @@
#include "core/editing/Editor.h"
#include "core/events/KeyboardEvent.h"
#include "core/html/HTMLDialogElement.h"
-#include "core/input/EventHandler.h"
+#include "core/input/EventHandlingUtil.h"
+#include "core/input/ScrollManager.h"
#include "core/layout/LayoutObject.h"
#include "core/layout/LayoutTextControlSingleLine.h"
#include "core/loader/FrameLoaderClient.h"
@@ -59,10 +60,6 @@ KeyboardEventManager::KeyboardEventManager(
{
}
-KeyboardEventManager::~KeyboardEventManager()
-{
-}
-
bool KeyboardEventManager::handleAccessKey(const WebKeyboardEvent& evt)
{
// FIXME: Ignoring the state of Shift key is what neither IE nor Firefox do.
@@ -120,7 +117,7 @@ WebInputEventResult KeyboardEventManager::keyEvent(
if (initialKeyEvent.type == WebInputEvent::KeyUp || initialKeyEvent.type == WebInputEvent::Char) {
KeyboardEvent* domEvent = KeyboardEvent::create(initialKeyEvent, m_frame->document()->domWindow());
- return EventHandler::toWebInputEventResult(node->dispatchEvent(domEvent));
+ return EventHandlingUtil::toWebInputEventResult(node->dispatchEvent(domEvent));
}
WebKeyboardEvent keyDownEvent = initialKeyEvent;
@@ -133,7 +130,7 @@ WebInputEventResult KeyboardEventManager::keyEvent(
DispatchEventResult dispatchResult = node->dispatchEvent(keydown);
if (dispatchResult != DispatchEventResult::NotCanceled)
- return EventHandler::toWebInputEventResult(dispatchResult);
+ return EventHandlingUtil::toWebInputEventResult(dispatchResult);
// If frame changed as a result of keydown dispatch, then return early to avoid sending a subsequent keypress message to the new frame.
bool changedFocusedFrame = m_frame->page() && m_frame != m_frame->page()->focusController().focusedOrMainFrame();
if (changedFocusedFrame)
@@ -164,7 +161,7 @@ WebInputEventResult KeyboardEventManager::keyEvent(
return WebInputEventResult::NotHandled;
KeyboardEvent* keypress = KeyboardEvent::create(keyPressEvent, m_frame->document()->domWindow());
keypress->setTarget(node);
- return EventHandler::toWebInputEventResult(node->dispatchEvent(keypress));
+ return EventHandlingUtil::toWebInputEventResult(node->dispatchEvent(keypress));
}
void KeyboardEventManager::capsLockStateMayHaveChanged()
@@ -310,6 +307,7 @@ void KeyboardEventManager::defaultEscapeEventHandler(KeyboardEvent* event)
DEFINE_TRACE(KeyboardEventManager)
{
visitor->trace(m_frame);
+ visitor->trace(m_scrollManager);
}
static OverrideCapsLockState s_overrideCapsLockState;
« no previous file with comments | « third_party/WebKit/Source/core/input/KeyboardEventManager.h ('k') | third_party/WebKit/Source/core/input/MouseEventManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698