[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

estade at chromium.org estade at chromium.org
Wed Dec 22 15:42:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cabd4c7f48bd3e9b9efdf4efcbb61f5b57ef1d7d
Author: estade at chromium.org <estade at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 10 22:47:42 2010 +0000

    2010-11-10  Evan Stade  <estade at chromium.org>
    
            Reviewed by Tony Chang.
    
            [chromium] menu key doesn't work when capslock or numslock is on
            https://bugs.webkit.org/show_bug.cgi?id=49289
    
            Add a special bitmask for the "input" modifier keys (shift, alt, crtl, meta). The Modifier
            enum has grown to something that might be better termed State, but changing the nomenclature
            now is difficult. The bitmask gets its name from the related function getWebInputModifiers.
    
            * public/WebInputEvent.h: add InputModifiers mask for true modifier keys
            * src/WebViewImpl.cpp: disregard non-modifier keys
            (WebKit::WebViewImpl::keyEvent):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71774 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 8708882..7c462ea 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-10  Evan Stade  <estade at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        [chromium] menu key doesn't work when capslock or numslock is on
+        https://bugs.webkit.org/show_bug.cgi?id=49289
+
+        Add a special bitmask for the "input" modifier keys (shift, alt, crtl, meta). The Modifier
+        enum has grown to something that might be better termed State, but changing the nomenclature
+        now is difficult. The bitmask gets its name from the related function getWebInputModifiers.
+
+        * public/WebInputEvent.h: add InputModifiers mask for true modifier keys
+        * src/WebViewImpl.cpp: disregard non-modifier keys
+        (WebKit::WebViewImpl::keyEvent):
+
 2010-11-10  Csaba Osztrogonác  <ossy at webkit.org>
 
         Reviewed by David Hyatt.
diff --git a/WebKit/chromium/public/WebInputEvent.h b/WebKit/chromium/public/WebInputEvent.h
index 26e41a4..581e76c 100644
--- a/WebKit/chromium/public/WebInputEvent.h
+++ b/WebKit/chromium/public/WebInputEvent.h
@@ -130,6 +130,8 @@ public:
         NumLockOn        = 1 << 10,
     };
 
+    static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey;
+
     unsigned size;   // The size of this structure, for serialization.
     Type type;
     int modifiers;
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 490c620..6e16352 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -571,13 +571,13 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event)
         WebInputEvent::RawKeyDown;
 #endif
 
-    if (((!event.modifiers && (event.windowsKeyCode == VKEY_APPS))
-        || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10)))
-        && event.type == contextMenuTriggeringEventType) {
+    bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers) && event.windowsKeyCode == VKEY_APPS;
+    bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.windowsKeyCode == VKEY_F10;
+    if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeringEventType) {
         sendContextMenuEvent(event);
         return true;
     }
-#endif
+#endif // OS(WINDOWS) || OS(LINUX) || OS(FREEBSD)
 
     // It's not clear if we should continue after detecting a capslock keypress.
     // I'll err on the side of continuing, which is the pre-existing behaviour.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list