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

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

Issue 2454073005: Add isComposing support for KeyboardEvents (Closed)
Patch Set: Fix windows and linux Created 4 years, 1 month 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.h
diff --git a/third_party/WebKit/Source/core/events/KeyboardEvent.h b/third_party/WebKit/Source/core/events/KeyboardEvent.h
index dcf3b7ce8e861185f92ad550f5064c923015e45b..c3c432e2671816c3fc0af7a196c513dc8eb0fb2e 100644
--- a/third_party/WebKit/Source/core/events/KeyboardEvent.h
+++ b/third_party/WebKit/Source/core/events/KeyboardEvent.h
@@ -47,27 +47,15 @@ class CORE_EXPORT KeyboardEvent final : public UIEventWithKeyState {
static KeyboardEvent* create() { return new KeyboardEvent; }
static KeyboardEvent* create(const WebKeyboardEvent& webEvent,
- AbstractView* view) {
- return new KeyboardEvent(webEvent, view);
+ LocalDOMWindow* domWindow) {
+ return new KeyboardEvent(webEvent, domWindow);
}
static KeyboardEvent* create(ScriptState*,
const AtomicString& type,
const KeyboardEventInit&);
- static KeyboardEvent* create(const AtomicString& type,
- bool canBubble,
- bool cancelable,
- AbstractView* view,
- const String& code,
- const String& key,
- unsigned location,
- PlatformEvent::Modifiers modifiers,
- double platformTimeStamp) {
- return new KeyboardEvent(type, canBubble, cancelable, view, code, key,
- location, modifiers, platformTimeStamp);
- }
-
+ KeyboardEvent(const AtomicString&, const KeyboardEventInit&);
~KeyboardEvent() override;
void initKeyboardEvent(ScriptState*,
@@ -97,22 +85,13 @@ class CORE_EXPORT KeyboardEvent final : public UIEventWithKeyState {
const AtomicString& interfaceName() const override;
bool isKeyboardEvent() const override;
int which() const override;
+ bool isComposing() const { return m_isComposing; }
DECLARE_VIRTUAL_TRACE();
private:
KeyboardEvent();
- KeyboardEvent(const WebKeyboardEvent&, AbstractView*);
- KeyboardEvent(const AtomicString&, const KeyboardEventInit&);
- KeyboardEvent(const AtomicString& type,
- bool canBubble,
- bool cancelable,
- AbstractView*,
- const String& code,
- const String& key,
- unsigned location,
- PlatformEvent::Modifiers,
- double platformTimeStamp);
+ KeyboardEvent(const WebKeyboardEvent&, LocalDOMWindow*);
void initLocationModifiers(unsigned location);
@@ -120,6 +99,7 @@ class CORE_EXPORT KeyboardEvent final : public UIEventWithKeyState {
String m_code;
String m_key;
unsigned m_location;
+ bool m_isComposing;
};
DEFINE_EVENT_TYPE_CASTS(KeyboardEvent);

Powered by Google App Engine
This is Rietveld 408576698