Index: Source/web/WebViewImpl.h |
diff --git a/Source/web/WebViewImpl.h b/Source/web/WebViewImpl.h |
index 6048f2b8211a0eb431bd280068b608df9fd21025..96d0bea89b486a5e826bab2d4cb942270d529c4f 100644 |
--- a/Source/web/WebViewImpl.h |
+++ b/Source/web/WebViewImpl.h |
@@ -701,8 +701,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; |