Changeset 86741 in webkit
- Timestamp:
- May 18, 2011 12:38:30 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86737 r86741 1 2011-05-16 Jeremy Noble <jer.noble@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Disable keyboard input (with exceptions) in full-screen mode. 6 https://bugs.webkit.org/show_bug.cgi?id=60943 7 8 * fullscreen/full-screen-keyboard-disabled-expected.txt: Added. 9 * fullscreen/full-screen-keyboard-disabled.html: Added. 10 * fullscreen/full-screen-keyboard-enabled-expected.txt: Added. 11 * fullscreen/full-screen-keyboard-enabled.html: Added. 12 1 13 2011-05-17 Jeremy Noble <jer.noble@apple.com> 2 14 -
trunk/LayoutTests/platform/mac-wk2/Skipped
r86673 r86741 1680 1680 # WebKit2 needs fullscreen support 1681 1681 # https://bugs.webkit.org/show_bug.cgi?id=56318 1682 fullscreen/full-screen-css.html 1683 fullscreen/full-screen-iframe-allowed.html 1684 fullscreen/full-screen-iframe-not-allowed.html 1685 fullscreen/full-screen-frameset.html 1686 fullscreen/full-screen-remove-ancestor.html 1687 fullscreen/full-screen-remove.html 1688 fullscreen/full-screen-request.html 1689 fullscreen/full-screen-twice.html 1690 fullscreen/full-screen-zIndex.html 1691 fullscreen/video-specified-size.html 1682 fullscreen/ 1692 1683 1693 1684 # WebKit2 needs to support synchronous creation of about:blank/data:url frames -
trunk/Source/WebCore/ChangeLog
r86739 r86741 1 2011-05-16 Jeremy Noble <jer.noble@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Disable keyboard input (with exceptions) in full-screen mode. 6 https://bugs.webkit.org/show_bug.cgi?id=60943 7 8 Tests: fullscreen/full-screen-keyboard-disabled.html 9 fullscreen/full-screen-keyboard-enabled.html 10 11 * page/EventHandler.cpp: 12 (WebCore::EventHandler::isKeyEventAllowedInFullScreen): Added. Implements the 13 list of allowed keyboard events in the proposed API. 14 (WebCore::EventHandler::keyEvent): Discard events which are not allowed in 15 full-screen mode. 16 * page/EventHandler.h: 17 1 18 2011-05-17 Nikolas Zimmermann <nzimmermann@rim.com> 2 19 -
trunk/Source/WebCore/page/EventHandler.cpp
r86700 r86741 2426 2426 #endif 2427 2427 2428 #if ENABLE(FULLSCREEN_API) 2429 bool EventHandler::isKeyEventAllowedInFullScreen(const PlatformKeyboardEvent& keyEvent) const 2430 { 2431 Document* document = m_frame->document(); 2432 if (document->webkitFullScreenKeyboardInputAllowed()) 2433 return true; 2434 2435 int keyCode = keyEvent.windowsVirtualKeyCode(); 2436 return (keyCode >= VK_BACK && keyCode <= VK_CAPITAL) 2437 || (keyCode >= VK_SPACE && keyCode <= VK_DELETE) 2438 || (keyCode >= VK_OEM_1 && keyCode <= VK_OEM_PLUS) 2439 || (keyCode >= VK_MULTIPLY && keyCode <= VK_OEM_8); 2440 } 2441 #endif 2442 2428 2443 bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) 2429 2444 { 2430 2445 RefPtr<FrameView> protector(m_frame->view()); 2446 2447 #if ENABLE(FULLSCREEN_API) 2448 if (m_frame->document()->webkitIsFullScreen() && !isKeyEventAllowedInFullScreen(initialKeyEvent)) 2449 return false; 2450 #endif 2431 2451 2432 2452 if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL) -
trunk/Source/WebCore/page/EventHandler.h
r86472 r86741 352 352 #endif 353 353 354 #if ENABLE(FULLSCREEN_API) 355 bool isKeyEventAllowedInFullScreen(const PlatformKeyboardEvent&) const; 356 #endif 357 354 358 Frame* m_frame; 355 359
Note: See TracChangeset
for help on using the changeset viewer.