OLD | NEW |
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 3387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3402 return; | 3403 return; |
3403 | 3404 |
3404 if (!isSpatialNavigationEnabled(m_frame)) | 3405 if (!isSpatialNavigationEnabled(m_frame)) |
3405 return; | 3406 return; |
3406 | 3407 |
3407 // Arrows and other possible directional navigation keys can be used in desi
gn | 3408 // Arrows and other possible directional navigation keys can be used in desi
gn |
3408 // mode editing. | 3409 // mode editing. |
3409 if (m_frame->document()->inDesignMode()) | 3410 if (m_frame->document()->inDesignMode()) |
3410 return; | 3411 return; |
3411 | 3412 |
| 3413 if (page->focusController().handleCSSFocusNavigation(focusType)) { |
| 3414 event->setDefaultHandled(); |
| 3415 return; |
| 3416 } |
| 3417 |
3412 if (page->focusController().advanceFocus(focusType)) | 3418 if (page->focusController().advanceFocus(focusType)) |
3413 event->setDefaultHandled(); | 3419 event->setDefaultHandled(); |
3414 } | 3420 } |
3415 | 3421 |
3416 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) | 3422 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) |
3417 { | 3423 { |
3418 ASSERT(event->type() == EventTypeNames::keydown); | 3424 ASSERT(event->type() == EventTypeNames::keydown); |
3419 | 3425 |
3420 // We should only advance focus on tabs if no special modifier keys are held
down. | 3426 // We should only advance focus on tabs if no special modifier keys are held
down. |
3421 if (event->ctrlKey() || event->metaKey()) | 3427 if (event->ctrlKey() || event->metaKey()) |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3880 unsigned EventHandler::accessKeyModifiers() | 3886 unsigned EventHandler::accessKeyModifiers() |
3881 { | 3887 { |
3882 #if OS(MACOSX) | 3888 #if OS(MACOSX) |
3883 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3889 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3884 #else | 3890 #else |
3885 return PlatformEvent::AltKey; | 3891 return PlatformEvent::AltKey; |
3886 #endif | 3892 #endif |
3887 } | 3893 } |
3888 | 3894 |
3889 } // namespace blink | 3895 } // namespace blink |
OLD | NEW |