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

Side by Side Diff: Source/core/frame/Frame.cpp

Issue 967423005: <iframe sandbox> should inherit through <a target='_blank'>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix. Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 { 153 {
154 WindowProxyManager* oldManager = old->windowProxyManager(); 154 WindowProxyManager* oldManager = old->windowProxyManager();
155 // FIXME: In the future, the Blink API layer will be calling detach() on the 155 // FIXME: In the future, the Blink API layer will be calling detach() on the
156 // old frame prior to completing the swap. However, detach calls 156 // old frame prior to completing the swap. However, detach calls
157 // clearForClose() instead of clearForNavigation(). Make sure this doesn't 157 // clearForClose() instead of clearForNavigation(). Make sure this doesn't
158 // become a no-op when that lands, since it's important to detach the global . 158 // become a no-op when that lands, since it's important to detach the global .
159 oldManager->clearForNavigation(); 159 oldManager->clearForNavigation();
160 windowProxyManager()->takeGlobalFrom(oldManager); 160 windowProxyManager()->takeGlobalFrom(oldManager);
161 } 161 }
162 162
163 Frame* Frame::findFrameForNavigation(const AtomicString& name, Frame& activeFram e) 163 Frame* Frame::findFrameForNavigation(const AtomicString& name, Frame& activeFram e)
Nate Chapin 2015/03/04 17:44:55 This unconditionally returns the result of tree().
164 { 164 {
165 Frame* frame = tree().find(name); 165 Frame* frame = tree().find(name);
166 if (!frame || !activeFrame.canNavigate(*frame)) 166 if (!frame)
167 return nullptr; 167 return nullptr;
168 return frame; 168 return frame;
169 } 169 }
170 170
171 static bool canAccessAncestor(const SecurityOrigin& activeSecurityOrigin, const Frame* targetFrame) 171 static bool canAccessAncestor(const SecurityOrigin& activeSecurityOrigin, const Frame* targetFrame)
172 { 172 {
173 // targetFrame can be 0 when we're trying to navigate a top-level frame 173 // targetFrame can be 0 when we're trying to navigate a top-level frame
174 // that has a 0 opener. 174 // that has a 0 opener.
175 if (!targetFrame) 175 if (!targetFrame)
176 return false; 176 return false;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 if (m_owner) { 297 if (m_owner) {
298 if (m_owner->isLocal()) 298 if (m_owner->isLocal())
299 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this); 299 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this);
300 } else { 300 } else {
301 page()->setMainFrame(this); 301 page()->setMainFrame(this);
302 } 302 }
303 } 303 }
304 304
305 } // namespace blink 305 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698