Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/EditingBehavior.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/EditingBehavior.cpp b/third_party/WebKit/Source/core/editing/EditingBehavior.cpp |
| index 54890191d8ca1b696d8bfc511afb14e7d13af7f7..310ddf1232c2ca1757da424b5ef0df555ce53a48 100644 |
| --- a/third_party/WebKit/Source/core/editing/EditingBehavior.cpp |
| +++ b/third_party/WebKit/Source/core/editing/EditingBehavior.cpp |
| @@ -267,7 +267,13 @@ bool EditingBehavior::shouldInsertCharacter(const KeyboardEvent& event) const { |
| // unexpected behaviour |
| if (ch < ' ') |
| return false; |
| -#if !OS(WIN) |
| +#if OS(LINUX) |
| + // According to XKB map no keyboard combinations with ctrl key are mapped to |
| + // printable characters, however we need the filter as the DomKey/text could |
| + // contain printable characters. |
| + if (event.ctrlKey()) |
|
yosin_UTC9
2016/11/11 01:49:26
Q: How about other modifier keys, Alt, Meta, Hyper
chongz
2016/11/11 20:12:28
Good question!
1. Alt: We set |webkit_event.isSy
|
| + return false; |
| +#elif !OS(WIN) |
| // Don't insert ASCII character if ctrl w/o alt or meta is on. |
| // On Mac, we should ignore events when meta is on (Command-<x>). |
| if (ch < 0x80) { |