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

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

Issue 1413583002: Make ElementShadow::youngestShadowRoot() return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more tail -> head Created 5 years, 2 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698