| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nuanti Ltd. | 3 * Copyright (C) 2008 Nuanti Ltd. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 return isNonKeyboardFocusableShadowHost(element) || isShadowInsertionPointFo
cusScopeOwner(element) || isHTMLSlotElement(element); | 330 return isNonKeyboardFocusableShadowHost(element) || isShadowInsertionPointFo
cusScopeOwner(element) || isHTMLSlotElement(element); |
| 331 } | 331 } |
| 332 | 332 |
| 333 inline bool isShadowHostDelegatesFocus(const Element& element) | 333 inline bool isShadowHostDelegatesFocus(const Element& element) |
| 334 { | 334 { |
| 335 return element.authorShadowRoot() && element.authorShadowRoot()->delegatesFo
cus(); | 335 return element.authorShadowRoot() && element.authorShadowRoot()->delegatesFo
cus(); |
| 336 } | 336 } |
| 337 | 337 |
| 338 inline int adjustedTabIndex(Element& element) | 338 inline int adjustedTabIndex(Element& element) |
| 339 { | 339 { |
| 340 return isNonFocusableFocusScopeOwner(element) ? 0 : element.tabIndex(); | 340 return (isNonKeyboardFocusableShadowHost(element) || isShadowInsertionPointF
ocusScopeOwner(element)) ? 0 : element.tabIndex(); |
| 341 } | 341 } |
| 342 | 342 |
| 343 inline bool shouldVisit(Element& element) | 343 inline bool shouldVisit(Element& element) |
| 344 { | 344 { |
| 345 return element.isKeyboardFocusable() || isNonFocusableFocusScopeOwner(elemen
t); | 345 return element.isKeyboardFocusable() || isNonFocusableFocusScopeOwner(elemen
t); |
| 346 } | 346 } |
| 347 | 347 |
| 348 Element* findElementWithExactTabIndex(ScopedFocusNavigation& scope, int tabIndex
, WebFocusType type) | 348 Element* findElementWithExactTabIndex(ScopedFocusNavigation& scope, int tabIndex
, WebFocusType type) |
| 349 { | 349 { |
| 350 // Search is inclusive of start | 350 // Search is inclusive of start |
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1254 return consumed; | 1254 return consumed; |
| 1255 } | 1255 } |
| 1256 | 1256 |
| 1257 DEFINE_TRACE(FocusController) | 1257 DEFINE_TRACE(FocusController) |
| 1258 { | 1258 { |
| 1259 visitor->trace(m_page); | 1259 visitor->trace(m_page); |
| 1260 visitor->trace(m_focusedFrame); | 1260 visitor->trace(m_focusedFrame); |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 } // namespace blink | 1263 } // namespace blink |
| OLD | NEW |