| 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 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 // If the inner element is already focused, do nothing. | 1830 // If the inner element is already focused, do nothing. |
| 1831 return true; | 1831 return true; |
| 1832 } | 1832 } |
| 1833 | 1833 |
| 1834 // If the host has a focusable inner element, focus it. Otherwise, the h
ost takes focus. | 1834 // If the host has a focusable inner element, focus it. Otherwise, the h
ost takes focus. |
| 1835 Page* page = m_frame->page(); | 1835 Page* page = m_frame->page(); |
| 1836 ASSERT(page); | 1836 ASSERT(page); |
| 1837 Element* next = page->focusController().findFocusableElement(WebFocusTyp
eForward, *element.authorShadowRoot()); | 1837 Element* next = page->focusController().findFocusableElement(WebFocusTyp
eForward, *element.authorShadowRoot()); |
| 1838 if (next && element.containsIncludingShadowDOM(next)) { | 1838 if (next && element.containsIncludingShadowDOM(next)) { |
| 1839 // Use WebFocusTypeForward instead of WebFocusTypeMouse here to mean
the focus has slided. | 1839 // Use WebFocusTypeForward instead of WebFocusTypeMouse here to mean
the focus has slided. |
| 1840 next->focus(false, WebFocusTypeForward); | 1840 next->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTyp
eForward, nullptr)); |
| 1841 return true; | 1841 return true; |
| 1842 } | 1842 } |
| 1843 } | 1843 } |
| 1844 return false; | 1844 return false; |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1847 namespace { | 1847 namespace { |
| 1848 | 1848 |
| 1849 ScrollResult scrollAreaWithWheelEvent(const PlatformWheelEvent& event, Scrollabl
eArea& scrollableArea) | 1849 ScrollResult scrollAreaWithWheelEvent(const PlatformWheelEvent& event, Scrollabl
eArea& scrollableArea) |
| 1850 { | 1850 { |
| (...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4072 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 4072 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
| 4073 { | 4073 { |
| 4074 #if OS(MACOSX) | 4074 #if OS(MACOSX) |
| 4075 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 4075 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
| 4076 #else | 4076 #else |
| 4077 return PlatformEvent::AltKey; | 4077 return PlatformEvent::AltKey; |
| 4078 #endif | 4078 #endif |
| 4079 } | 4079 } |
| 4080 | 4080 |
| 4081 } // namespace blink | 4081 } // namespace blink |
| OLD | NEW |