| 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 * | 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 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2186 } | 2186 } |
| 2187 | 2187 |
| 2188 void EventHandler::defaultTextInputEventHandler(TextEvent* event) | 2188 void EventHandler::defaultTextInputEventHandler(TextEvent* event) |
| 2189 { | 2189 { |
| 2190 if (m_frame->editor().handleTextEvent(event)) | 2190 if (m_frame->editor().handleTextEvent(event)) |
| 2191 event->setDefaultHandled(); | 2191 event->setDefaultHandled(); |
| 2192 } | 2192 } |
| 2193 | 2193 |
| 2194 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) | 2194 void EventHandler::defaultTabEventHandler(KeyboardEvent* event) |
| 2195 { | 2195 { |
| 2196 ASSERT(event->type() == EventTypeNames::keydown); | |
| 2197 | |
| 2198 // We should only advance focus on tabs if no special modifier keys are held
down. | |
| 2199 if (event->ctrlKey() || event->metaKey()) | |
| 2200 return; | |
| 2201 | |
| 2202 Page* page = m_frame->page(); | |
| 2203 if (!page) | |
| 2204 return; | |
| 2205 if (!page->tabKeyCyclesThroughElements()) | |
| 2206 return; | |
| 2207 | |
| 2208 FocusType focusType = event->shiftKey() ? FocusTypeBackward : FocusTypeForwa
rd; | |
| 2209 | |
| 2210 if (page->focusController().advanceFocus(focusType)) | |
| 2211 event->setDefaultHandled(); | |
| 2212 } | 2196 } |
| 2213 | 2197 |
| 2214 void EventHandler::capsLockStateMayHaveChanged() | 2198 void EventHandler::capsLockStateMayHaveChanged() |
| 2215 { | 2199 { |
| 2216 } | 2200 } |
| 2217 | 2201 |
| 2218 bool EventHandler::passMousePressEventToScrollbar(MouseEventWithHitTestResults&
mev) | 2202 bool EventHandler::passMousePressEventToScrollbar(MouseEventWithHitTestResults&
mev) |
| 2219 { | 2203 { |
| 2220 // FIXME(sky): Remove | 2204 // FIXME(sky): Remove |
| 2221 return false; | 2205 return false; |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2572 | 2556 |
| 2573 void EventHandler::focusDocumentView() | 2557 void EventHandler::focusDocumentView() |
| 2574 { | 2558 { |
| 2575 Page* page = m_frame->page(); | 2559 Page* page = m_frame->page(); |
| 2576 if (!page) | 2560 if (!page) |
| 2577 return; | 2561 return; |
| 2578 page->focusController().focusDocumentView(m_frame); | 2562 page->focusController().focusDocumentView(m_frame); |
| 2579 } | 2563 } |
| 2580 | 2564 |
| 2581 } // namespace blink | 2565 } // namespace blink |
| OLD | NEW |