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

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

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added tests Created 7 years, 4 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
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 3395 matching lines...) Expand 10 before | Expand all | Expand 10 after
3406 return; 3406 return;
3407 3407
3408 if (!isSpatialNavigationEnabled(m_frame)) 3408 if (!isSpatialNavigationEnabled(m_frame))
3409 return; 3409 return;
3410 3410
3411 // Arrows and other possible directional navigation keys can be used in desi gn 3411 // Arrows and other possible directional navigation keys can be used in desi gn
3412 // mode editing. 3412 // mode editing.
3413 if (m_frame->document()->inDesignMode()) 3413 if (m_frame->document()->inDesignMode())
3414 return; 3414 return;
3415 3415
3416 if (page->focusController()->handleCSSFocusNavigation(focusDirection)) {
3417 event->setDefaultHandled();
3418 return;
3419 }
3420
3416 if (page->focusController()->advanceFocus(focusDirection)) 3421 if (page->focusController()->advanceFocus(focusDirection))
3417 event->setDefaultHandled(); 3422 event->setDefaultHandled();
3418 } 3423 }
3419 3424
3420 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) 3425 void EventHandler::defaultTabEventHandler(KeyboardEvent* event)
3421 { 3426 {
3422 ASSERT(event->type() == eventNames().keydownEvent); 3427 ASSERT(event->type() == eventNames().keydownEvent);
3423 3428
3424 // We should only advance focus on tabs if no special modifier keys are held down. 3429 // We should only advance focus on tabs if no special modifier keys are held down.
3425 if (event->ctrlKey() || event->metaKey() || event->altGraphKey()) 3430 if (event->ctrlKey() || event->metaKey() || event->altGraphKey())
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3839 unsigned EventHandler::accessKeyModifiers() 3844 unsigned EventHandler::accessKeyModifiers()
3840 { 3845 {
3841 #if OS(DARWIN) 3846 #if OS(DARWIN)
3842 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3847 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3843 #else 3848 #else
3844 return PlatformEvent::AltKey; 3849 return PlatformEvent::AltKey;
3845 #endif 3850 #endif
3846 } 3851 }
3847 3852
3848 } // namespace WebCore 3853 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698