diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
commit | 635860845790a19bf50bbc51ba8fb66a96dde068 (patch) | |
tree | ef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/page/mac/EventHandlerMac.mm | |
parent | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff) | |
download | external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2 |
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/page/mac/EventHandlerMac.mm')
-rw-r--r-- | WebCore/page/mac/EventHandlerMac.mm | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/WebCore/page/mac/EventHandlerMac.mm b/WebCore/page/mac/EventHandlerMac.mm index 562c1dd..5d09843 100644 --- a/WebCore/page/mac/EventHandlerMac.mm +++ b/WebCore/page/mac/EventHandlerMac.mm @@ -26,6 +26,7 @@ #include "config.h" #include "EventHandler.h" +#include "AXObjectCache.h" #include "BlockExceptions.h" #include "ChromeClient.h" #include "ClipboardMac.h" @@ -42,16 +43,15 @@ #include "RenderWidget.h" #include "Scrollbar.h" #include "Settings.h" +#include <wtf/StdLibExtras.h> namespace WebCore { -unsigned EventHandler::s_accessKeyModifiers = PlatformKeyboardEvent::CtrlKey | PlatformKeyboardEvent::AltKey; - const double EventHandler::TextDragDelay = 0.15; static RetainPtr<NSEvent>& currentEvent() { - static RetainPtr<NSEvent> event; + DEFINE_STATIC_LOCAL(RetainPtr<NSEvent>, event, ()); return event; } @@ -643,4 +643,15 @@ bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& return passSubframeEventToSubframe(mev, subframe); } +unsigned EventHandler::accessKeyModifiers() +{ + // Control+Option key combinations are usually unused on Mac OS X, but not when VoiceOver is enabled. + // So, we use Control in this case, even though it conflicts with Emacs-style key bindings. + // See <https://bugs.webkit.org/show_bug.cgi?id=21107> for more detail. + if (AXObjectCache::accessibilityEnhancedUserInterfaceEnabled()) + return PlatformKeyboardEvent::CtrlKey; + + return PlatformKeyboardEvent::CtrlKey | PlatformKeyboardEvent::AltKey; +} + } |