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) 2013 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 3458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3473 return; | 3474 return; |
3474 | 3475 |
3475 if (!isSpatialNavigationEnabled(m_frame)) | 3476 if (!isSpatialNavigationEnabled(m_frame)) |
3476 return; | 3477 return; |
3477 | 3478 |
3478 // Arrows and other possible directional navigation keys can be used in desi
gn | 3479 // Arrows and other possible directional navigation keys can be used in desi
gn |
3479 // mode editing. | 3480 // mode editing. |
3480 if (m_frame->document()->inDesignMode()) | 3481 if (m_frame->document()->inDesignMode()) |
3481 return; | 3482 return; |
3482 | 3483 |
| 3484 if (page->focusController().handleCSSFocusNavigation(focusType)) { |
| 3485 event->setDefaultHandled(); |
| 3486 return; |
| 3487 } |
| 3488 |
3483 if (page->focusController().advanceFocus(focusType)) | 3489 if (page->focusController().advanceFocus(focusType)) |
3484 event->setDefaultHandled(); | 3490 event->setDefaultHandled(); |
3485 } | 3491 } |
3486 | 3492 |
3487 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) | 3493 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) |
3488 { | 3494 { |
3489 ASSERT(event->type() == EventTypeNames::keydown); | 3495 ASSERT(event->type() == EventTypeNames::keydown); |
3490 | 3496 |
3491 // We should only advance focus on tabs if no special modifier keys are held
down. | 3497 // We should only advance focus on tabs if no special modifier keys are held
down. |
3492 if (event->ctrlKey() || event->metaKey() || event->altGraphKey()) | 3498 if (event->ctrlKey() || event->metaKey() || event->altGraphKey()) |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4042 unsigned EventHandler::accessKeyModifiers() | 4048 unsigned EventHandler::accessKeyModifiers() |
4043 { | 4049 { |
4044 #if OS(MACOSX) | 4050 #if OS(MACOSX) |
4045 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4051 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
4046 #else | 4052 #else |
4047 return PlatformEvent::AltKey; | 4053 return PlatformEvent::AltKey; |
4048 #endif | 4054 #endif |
4049 } | 4055 } |
4050 | 4056 |
4051 } // namespace WebCore | 4057 } // namespace WebCore |
OLD | NEW |