| 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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 | 1013 |
| 1014 Element* FocusController::findFocusableElementInShadowHost(const Element& shadow
Host) | 1014 Element* FocusController::findFocusableElementInShadowHost(const Element& shadow
Host) |
| 1015 { | 1015 { |
| 1016 DCHECK(shadowHost.authorShadowRoot()); | 1016 DCHECK(shadowHost.authorShadowRoot()); |
| 1017 ScopedFocusNavigation scope = ScopedFocusNavigation::ownedByShadowHost(shado
wHost); | 1017 ScopedFocusNavigation scope = ScopedFocusNavigation::ownedByShadowHost(shado
wHost); |
| 1018 return findFocusableElementAcrossFocusScopes(WebFocusTypeForward, scope); | 1018 return findFocusableElementAcrossFocusScopes(WebFocusTypeForward, scope); |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 static bool relinquishesEditingFocus(const Element& element) | 1021 static bool relinquishesEditingFocus(const Element& element) |
| 1022 { | 1022 { |
| 1023 DCHECK(element.hasEditableStyle()); | 1023 DCHECK(hasEditableStyle(element)); |
| 1024 return element.document().frame() && rootEditableElement(element); | 1024 return element.document().frame() && rootEditableElement(element); |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 static void clearSelectionIfNeeded(LocalFrame* oldFocusedFrame, LocalFrame* newF
ocusedFrame, Element* newFocusedElement) | 1027 static void clearSelectionIfNeeded(LocalFrame* oldFocusedFrame, LocalFrame* newF
ocusedFrame, Element* newFocusedElement) |
| 1028 { | 1028 { |
| 1029 if (!oldFocusedFrame || !newFocusedFrame) | 1029 if (!oldFocusedFrame || !newFocusedFrame) |
| 1030 return; | 1030 return; |
| 1031 | 1031 |
| 1032 if (oldFocusedFrame->document() != newFocusedFrame->document()) | 1032 if (oldFocusedFrame->document() != newFocusedFrame->document()) |
| 1033 return; | 1033 return; |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 return consumed; | 1308 return consumed; |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 DEFINE_TRACE(FocusController) | 1311 DEFINE_TRACE(FocusController) |
| 1312 { | 1312 { |
| 1313 visitor->trace(m_page); | 1313 visitor->trace(m_page); |
| 1314 visitor->trace(m_focusedFrame); | 1314 visitor->trace(m_focusedFrame); |
| 1315 } | 1315 } |
| 1316 | 1316 |
| 1317 } // namespace blink | 1317 } // namespace blink |
| OLD | NEW |