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

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

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 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 b375cfae3364a011344e4b63baa3880d03931031..6e6b84795beb7c58f03d24558fd8f930a2183b1e 100644
--- a/third_party/WebKit/Source/core/events/KeyboardEvent.cpp
+++ b/third_party/WebKit/Source/core/events/KeyboardEvent.cpp
@@ -54,11 +54,11 @@ const AtomicString& eventTypeForKeyboardEventType(WebInputEvent::Type type) {
}
KeyboardEvent::KeyLocationCode keyLocationCode(const WebInputEvent& key) {
- if (key.modifiers & WebInputEvent::IsKeyPad)
+ if (key.modifiers() & WebInputEvent::IsKeyPad)
return KeyboardEvent::kDomKeyLocationNumpad;
- if (key.modifiers & WebInputEvent::IsLeft)
+ if (key.modifiers() & WebInputEvent::IsLeft)
return KeyboardEvent::kDomKeyLocationLeft;
- if (key.modifiers & WebInputEvent::IsRight)
+ if (key.modifiers() & WebInputEvent::IsRight)
return KeyboardEvent::kDomKeyLocationRight;
return KeyboardEvent::kDomKeyLocationStandard;
}
@@ -89,13 +89,13 @@ KeyboardEvent::KeyboardEvent() : m_location(kDomKeyLocationStandard) {}
KeyboardEvent::KeyboardEvent(const WebKeyboardEvent& key,
LocalDOMWindow* domWindow)
: UIEventWithKeyState(
- eventTypeForKeyboardEventType(key.type),
+ eventTypeForKeyboardEventType(key.type()),
true,
true,
domWindow,
0,
- static_cast<PlatformEvent::Modifiers>(key.modifiers),
- TimeTicks::FromSeconds(key.timeStampSeconds),
+ static_cast<PlatformEvent::Modifiers>(key.modifiers()),
+ TimeTicks::FromSeconds(key.timeStampSeconds()),
InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities()),
m_keyEvent(WTF::makeUnique<WebKeyboardEvent>(key)),
// TODO(crbug.com/482880): Fix this initialization to lazy initialization.
« no previous file with comments | « third_party/WebKit/Source/core/events/GestureEvent.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