Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Side by Side Diff: third_party/WebKit/Source/core/page/FocusController.cpp

Issue 1883083002: Introduce Node::containingTreeScope(), which asserts that the node's root is a tree scope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 return frame->deprecatedLocalOwner(); 229 return frame->deprecatedLocalOwner();
230 return nullptr; 230 return nullptr;
231 } 231 }
232 232
233 ScopedFocusNavigation ScopedFocusNavigation::createFor(const Element& current) 233 ScopedFocusNavigation ScopedFocusNavigation::createFor(const Element& current)
234 { 234 {
235 if (HTMLSlotElement* slot = SlotScopedTraversal::findScopeOwnerSlot(current) ) 235 if (HTMLSlotElement* slot = SlotScopedTraversal::findScopeOwnerSlot(current) )
236 return ScopedFocusNavigation(*slot, &current); 236 return ScopedFocusNavigation(*slot, &current);
237 if (HTMLSlotElement* slot = ScopedFocusNavigation::findFallbackScopeOwnerSlo t(current)) 237 if (HTMLSlotElement* slot = ScopedFocusNavigation::findFallbackScopeOwnerSlo t(current))
238 return ScopedFocusNavigation(*slot, &current); 238 return ScopedFocusNavigation(*slot, &current);
239 return ScopedFocusNavigation(current.treeScope(), &current); 239 return ScopedFocusNavigation(current.rootTreeScope(), &current);
240 } 240 }
241 241
242 ScopedFocusNavigation ScopedFocusNavigation::createForDocument(Document& documen t) 242 ScopedFocusNavigation ScopedFocusNavigation::createForDocument(Document& documen t)
243 { 243 {
244 return ScopedFocusNavigation(document, nullptr); 244 return ScopedFocusNavigation(document, nullptr);
245 } 245 }
246 246
247 ScopedFocusNavigation ScopedFocusNavigation::ownedByNonFocusableFocusScopeOwner( Element& element) 247 ScopedFocusNavigation ScopedFocusNavigation::ownedByNonFocusableFocusScopeOwner( Element& element)
248 { 248 {
249 if (isShadowHost(element)) 249 if (isShadowHost(element))
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 return consumed; 1306 return consumed;
1307 } 1307 }
1308 1308
1309 DEFINE_TRACE(FocusController) 1309 DEFINE_TRACE(FocusController)
1310 { 1310 {
1311 visitor->trace(m_page); 1311 visitor->trace(m_page);
1312 visitor->trace(m_focusedFrame); 1312 visitor->trace(m_focusedFrame);
1313 } 1313 }
1314 1314
1315 } // namespace blink 1315 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698