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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 { | 122 { |
123 if (isShadowHost(element)) | 123 if (isShadowHost(element)) |
124 return FocusNavigationScope::ownedByShadowHost(element); | 124 return FocusNavigationScope::ownedByShadowHost(element); |
125 ASSERT(isShadowInsertionPointFocusScopeOwner(element)); | 125 ASSERT(isShadowInsertionPointFocusScopeOwner(element)); |
126 return FocusNavigationScope::ownedByShadowInsertionPoint(toHTMLShadowElement
(element)); | 126 return FocusNavigationScope::ownedByShadowInsertionPoint(toHTMLShadowElement
(element)); |
127 } | 127 } |
128 | 128 |
129 FocusNavigationScope FocusNavigationScope::ownedByShadowHost(const Element& elem
ent) | 129 FocusNavigationScope FocusNavigationScope::ownedByShadowHost(const Element& elem
ent) |
130 { | 130 { |
131 ASSERT(isShadowHost(element)); | 131 ASSERT(isShadowHost(element)); |
132 return FocusNavigationScope(element.shadow()->youngestShadowRoot()); | 132 return FocusNavigationScope(&element.shadow()->youngestShadowRoot()); |
133 } | 133 } |
134 | 134 |
135 FocusNavigationScope FocusNavigationScope::ownedByIFrame(const HTMLFrameOwnerEle
ment& frame) | 135 FocusNavigationScope FocusNavigationScope::ownedByIFrame(const HTMLFrameOwnerEle
ment& frame) |
136 { | 136 { |
137 ASSERT(frame.contentFrame()); | 137 ASSERT(frame.contentFrame()); |
138 ASSERT(frame.contentFrame()->isLocalFrame()); | 138 ASSERT(frame.contentFrame()->isLocalFrame()); |
139 return FocusNavigationScope(toLocalFrame(frame.contentFrame())->document()); | 139 return FocusNavigationScope(toLocalFrame(frame.contentFrame())->document()); |
140 } | 140 } |
141 | 141 |
142 FocusNavigationScope FocusNavigationScope::ownedByShadowInsertionPoint(HTMLShado
wElement& shadowInsertionPoint) | 142 FocusNavigationScope FocusNavigationScope::ownedByShadowInsertionPoint(HTMLShado
wElement& shadowInsertionPoint) |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 return consumed; | 1049 return consumed; |
1050 } | 1050 } |
1051 | 1051 |
1052 DEFINE_TRACE(FocusController) | 1052 DEFINE_TRACE(FocusController) |
1053 { | 1053 { |
1054 visitor->trace(m_page); | 1054 visitor->trace(m_page); |
1055 visitor->trace(m_focusedFrame); | 1055 visitor->trace(m_focusedFrame); |
1056 } | 1056 } |
1057 | 1057 |
1058 } // namespace blink | 1058 } // namespace blink |
OLD | NEW |