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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 358283002: Add a UseCounter for legacy fullscreen key event filtering (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2928 matching lines...) Expand 10 before | Expand all | Expand 10 after
2939 || (keyCode >= VK_OEM_1 && keyCode <= VK_OEM_PLUS) 2939 || (keyCode >= VK_OEM_1 && keyCode <= VK_OEM_PLUS)
2940 || (keyCode >= VK_MULTIPLY && keyCode <= VK_OEM_8); 2940 || (keyCode >= VK_MULTIPLY && keyCode <= VK_OEM_8);
2941 } 2941 }
2942 2942
2943 bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) 2943 bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
2944 { 2944 {
2945 RefPtr<FrameView> protector(m_frame->view()); 2945 RefPtr<FrameView> protector(m_frame->view());
2946 2946
2947 ASSERT(m_frame->document()); 2947 ASSERT(m_frame->document());
2948 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(*m_frame->document())) { 2948 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(*m_frame->document())) {
2949 if (fullscreen->webkitIsFullScreen() && !isKeyEventAllowedInFullScreen(f ullscreen, initialKeyEvent)) 2949 if (fullscreen->webkitIsFullScreen() && !isKeyEventAllowedInFullScreen(f ullscreen, initialKeyEvent)) {
2950 UseCounter::count(*m_frame->document(), UseCounter::KeyEventNotAllow edInFullScreen);
2950 return false; 2951 return false;
2952 }
2951 } 2953 }
2952 2954
2953 if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL) 2955 if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL)
2954 capsLockStateMayHaveChanged(); 2956 capsLockStateMayHaveChanged();
2955 2957
2956 #if OS(WIN) 2958 #if OS(WIN)
2957 if (panScrollInProgress()) { 2959 if (panScrollInProgress()) {
2958 // If a key is pressed while the panScroll is in progress then we want t o stop 2960 // If a key is pressed while the panScroll is in progress then we want t o stop
2959 if (initialKeyEvent.type() == PlatformEvent::KeyDown || initialKeyEvent. type() == PlatformEvent::RawKeyDown) 2961 if (initialKeyEvent.type() == PlatformEvent::KeyDown || initialKeyEvent. type() == PlatformEvent::RawKeyDown)
2960 stopAutoscroll(); 2962 stopAutoscroll();
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
3821 unsigned EventHandler::accessKeyModifiers() 3823 unsigned EventHandler::accessKeyModifiers()
3822 { 3824 {
3823 #if OS(MACOSX) 3825 #if OS(MACOSX)
3824 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3826 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3825 #else 3827 #else
3826 return PlatformEvent::AltKey; 3828 return PlatformEvent::AltKey;
3827 #endif 3829 #endif
3828 } 3830 }
3829 3831
3830 } // namespace WebCore 3832 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698