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 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2081 if (!page->focusController().setFocusedElement(0, m_frame)) | 2081 if (!page->focusController().setFocusedElement(0, m_frame)) |
2082 return true; | 2082 return true; |
2083 } | 2083 } |
2084 } | 2084 } |
2085 | 2085 |
2086 return false; | 2086 return false; |
2087 } | 2087 } |
2088 | 2088 |
2089 bool EventHandler::slideFocusOnShadowHostIfNecessary(const Element& element) | 2089 bool EventHandler::slideFocusOnShadowHostIfNecessary(const Element& element) |
2090 { | 2090 { |
2091 if (element.shadowRoot() && !element.tabStop()) { | 2091 if (element.shadowRoot() && element.shadowRoot()->delegatesFocus()) { |
2092 Document* doc = m_frame->document(); | 2092 Document* doc = m_frame->document(); |
2093 if (element.containsIncludingShadowDOM(doc->focusedElement())) { | 2093 if (element.containsIncludingShadowDOM(doc->focusedElement())) { |
2094 // If the inner element is already focused, do nothing. | 2094 // If the inner element is already focused, do nothing. |
2095 return true; | 2095 return true; |
2096 } | 2096 } |
2097 | 2097 |
2098 // If the host has a focusable inner element, focus it. Otherwise, the h
ost takes focus. | 2098 // If the host has a focusable inner element, focus it. Otherwise, the h
ost takes focus. |
2099 Page* page = m_frame->page(); | 2099 Page* page = m_frame->page(); |
2100 ASSERT(page); | 2100 ASSERT(page); |
2101 Node* next = page->focusController().findFocusableNode(WebFocusTypeForwa
rd, *element.shadowRoot()); | 2101 Node* next = page->focusController().findFocusableNode(WebFocusTypeForwa
rd, *element.shadowRoot()); |
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4170 unsigned EventHandler::accessKeyModifiers() | 4170 unsigned EventHandler::accessKeyModifiers() |
4171 { | 4171 { |
4172 #if OS(MACOSX) | 4172 #if OS(MACOSX) |
4173 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4173 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
4174 #else | 4174 #else |
4175 return PlatformEvent::AltKey; | 4175 return PlatformEvent::AltKey; |
4176 #endif | 4176 #endif |
4177 } | 4177 } |
4178 | 4178 |
4179 } // namespace blink | 4179 } // namespace blink |
OLD | NEW |