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

Unified Diff: third_party/WebKit/Source/core/editing/EditingBehavior.cpp

Issue 2474083002: [DomKey X11] Produce correct DomKey when Control is down (Closed)
Patch Set: dtapuska's review: Move #if block 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
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698