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

Unified Diff: third_party/WebKit/Source/core/events/KeyboardEvent.cpp

Issue 2675793005: Track constant InputDeviceCapabilities objects per-window. (Closed)
Patch Set: test tidying Created 3 years, 10 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/events/KeyboardEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/KeyboardEvent.cpp b/third_party/WebKit/Source/core/events/KeyboardEvent.cpp
index 6e6b84795beb7c58f03d24558fd8f930a2183b1e..e7581e89641e43fe8bd7ffc3d7428ece99f9be6b 100644
--- a/third_party/WebKit/Source/core/events/KeyboardEvent.cpp
+++ b/third_party/WebKit/Source/core/events/KeyboardEvent.cpp
@@ -25,6 +25,7 @@
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/ScriptState.h"
#include "core/editing/InputMethodController.h"
+#include "core/input/InputDeviceCapabilities.h"
#include "platform/WindowsKeyboardCodes.h"
#include "public/platform/Platform.h"
#include "public/platform/WebInputEvent.h"
@@ -96,7 +97,9 @@ KeyboardEvent::KeyboardEvent(const WebKeyboardEvent& key,
0,
static_cast<PlatformEvent::Modifiers>(key.modifiers()),
TimeTicks::FromSeconds(key.timeStampSeconds()),
- InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities()),
+ domWindow
+ ? domWindow->getInputDeviceCapabilities()->firesTouchEvents(false)
+ : nullptr),
m_keyEvent(WTF::makeUnique<WebKeyboardEvent>(key)),
// TODO(crbug.com/482880): Fix this initialization to lazy initialization.
m_code(Platform::current()->domCodeStringFromEnum(key.domCode)),
« no previous file with comments | « third_party/WebKit/Source/core/events/CompositionEvent.cpp ('k') | third_party/WebKit/Source/core/events/MouseEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698