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

Unified Diff: Source/web/WebViewImpl.h

Issue 956133002: [IME] Differentiate s_suppressNextKeypressEvent in WebViewImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing test, reducing non-essential deltas. Created 5 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
« no previous file with comments | « no previous file | Source/web/WebViewImpl.cpp » ('j') | Source/web/WebViewImpl.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.h
diff --git a/Source/web/WebViewImpl.h b/Source/web/WebViewImpl.h
index c34031f9643b826d96cb67a288b1615d24e9dd26..0d08baa5f86b34341645c73b64f76ff300d9af53 100644
--- a/Source/web/WebViewImpl.h
+++ b/Source/web/WebViewImpl.h
@@ -698,8 +698,14 @@ private:
// Webkit expects keyPress events to be suppressed if the associated keyDown
// event was handled. Safari implements this behavior by peeking out the
// associated WM_CHAR event if the keydown was handled. We emulate
- // this behavior by setting this flag if the keyDown was handled.
- bool m_suppressNextKeypressEvent;
+ // this behavior by storing a state to indicate that keyDown has been handled,
+ // and so that the following keyPress event should be suppressed.
+ enum SuppressNextKeypressEvent {
+ Suppress_None, // Don't suppress.
+ Suppress_KeyEventCanceled, // Key event was canceled.
+ Suppress_KeyEventHandled // Key event was handled.
+ };
+ SuppressNextKeypressEvent m_suppressNextKeypressEvent;
// Represents whether or not this object should process incoming IME events.
bool m_imeAcceptEvents;
« no previous file with comments | « no previous file | Source/web/WebViewImpl.cpp » ('j') | Source/web/WebViewImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698