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

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: renamed Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.containingTreeScope(), &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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698