| 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. |
| 6 * Copyright (C) 2016 Samsung Electronics. All rights reserved. |
| 5 * | 7 * |
| 6 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 8 * are met: | 10 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 11 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 12 * notice, this list of conditions and the following disclaimer. |
| 11 * 2. Redistributions in binary form must reproduce the above copyright | 13 * 2. Redistributions in binary form must reproduce the above copyright |
| 12 * notice, this list of conditions and the following disclaimer in the | 14 * notice, this list of conditions and the following disclaimer in the |
| 13 * documentation and/or other materials provided with the distribution. | 15 * documentation and/or other materials provided with the distribution. |
| 14 * | 16 * |
| (...skipping 3446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3461 return; | 3463 return; |
| 3462 | 3464 |
| 3463 if (!isSpatialNavigationEnabled(m_frame)) | 3465 if (!isSpatialNavigationEnabled(m_frame)) |
| 3464 return; | 3466 return; |
| 3465 | 3467 |
| 3466 // Arrows and other possible directional navigation keys can be used in desi
gn | 3468 // Arrows and other possible directional navigation keys can be used in desi
gn |
| 3467 // mode editing. | 3469 // mode editing. |
| 3468 if (m_frame->document()->inDesignMode()) | 3470 if (m_frame->document()->inDesignMode()) |
| 3469 return; | 3471 return; |
| 3470 | 3472 |
| 3473 if (page->focusController().advanceCSSNavigationFocus(focusType)) { |
| 3474 event->setDefaultHandled(); |
| 3475 return; |
| 3476 } |
| 3477 |
| 3471 if (page->focusController().advanceFocus(focusType)) | 3478 if (page->focusController().advanceFocus(focusType)) |
| 3472 event->setDefaultHandled(); | 3479 event->setDefaultHandled(); |
| 3473 } | 3480 } |
| 3474 | 3481 |
| 3475 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) | 3482 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) |
| 3476 { | 3483 { |
| 3477 ASSERT(event->type() == EventTypeNames::keydown); | 3484 ASSERT(event->type() == EventTypeNames::keydown); |
| 3478 | 3485 |
| 3479 // We should only advance focus on tabs if no special modifier keys are held
down. | 3486 // We should only advance focus on tabs if no special modifier keys are held
down. |
| 3480 if (event->ctrlKey() || event->metaKey()) | 3487 if (event->ctrlKey() || event->metaKey()) |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3992 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 3999 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
| 3993 { | 4000 { |
| 3994 #if OS(MACOSX) | 4001 #if OS(MACOSX) |
| 3995 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 4002 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
| 3996 #else | 4003 #else |
| 3997 return PlatformEvent::AltKey; | 4004 return PlatformEvent::AltKey; |
| 3998 #endif | 4005 #endif |
| 3999 } | 4006 } |
| 4000 | 4007 |
| 4001 } // namespace blink | 4008 } // namespace blink |
| OLD | NEW |