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

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: Applied code review suggestions. Also rebased. Created 6 years, 8 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 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 6 *
6 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
8 * are met: 9 * are met:
9 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
14 * 15 *
(...skipping 3414 matching lines...) Expand 10 before | Expand all | Expand 10 after
3429 return; 3430 return;
3430 3431
3431 if (!isSpatialNavigationEnabled(m_frame)) 3432 if (!isSpatialNavigationEnabled(m_frame))
3432 return; 3433 return;
3433 3434
3434 // Arrows and other possible directional navigation keys can be used in desi gn 3435 // Arrows and other possible directional navigation keys can be used in desi gn
3435 // mode editing. 3436 // mode editing.
3436 if (m_frame->document()->inDesignMode()) 3437 if (m_frame->document()->inDesignMode())
3437 return; 3438 return;
3438 3439
3440 if (page->focusController().handleCSSFocusNavigation(focusType)) {
3441 event->setDefaultHandled();
3442 return;
3443 }
3444
3439 if (page->focusController().advanceFocus(focusType)) 3445 if (page->focusController().advanceFocus(focusType))
3440 event->setDefaultHandled(); 3446 event->setDefaultHandled();
3441 } 3447 }
3442 3448
3443 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) 3449 void EventHandler::defaultTabEventHandler(KeyboardEvent* event)
3444 { 3450 {
3445 ASSERT(event->type() == EventTypeNames::keydown); 3451 ASSERT(event->type() == EventTypeNames::keydown);
3446 3452
3447 // We should only advance focus on tabs if no special modifier keys are held down. 3453 // We should only advance focus on tabs if no special modifier keys are held down.
3448 if (event->ctrlKey() || event->metaKey() || event->altGraphKey()) 3454 if (event->ctrlKey() || event->metaKey() || event->altGraphKey())
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
3995 unsigned EventHandler::accessKeyModifiers() 4001 unsigned EventHandler::accessKeyModifiers()
3996 { 4002 {
3997 #if OS(MACOSX) 4003 #if OS(MACOSX)
3998 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4004 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3999 #else 4005 #else
4000 return PlatformEvent::AltKey; 4006 return PlatformEvent::AltKey;
4001 #endif 4007 #endif
4002 } 4008 }
4003 4009
4004 } // namespace WebCore 4010 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698