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

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

Issue 2082493002: Remove WebFrame::canHaveSecureChild (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch for landing 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
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 void Frame::didChangeVisibilityState() 298 void Frame::didChangeVisibilityState()
299 { 299 {
300 HeapVector<Member<Frame>> childFrames; 300 HeapVector<Member<Frame>> childFrames;
301 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling()) 301 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling())
302 childFrames.append(child); 302 childFrames.append(child);
303 for (size_t i = 0; i < childFrames.size(); ++i) 303 for (size_t i = 0; i < childFrames.size(); ++i)
304 childFrames[i]->didChangeVisibilityState(); 304 childFrames[i]->didChangeVisibilityState();
305 } 305 }
306 306
307 bool Frame::canHaveSecureChild() const
308 {
309 for (const Frame* parent = this; parent; parent = parent->tree().parent()) {
310 if (!parent->securityContext()->getSecurityOrigin()->isPotentiallyTrustw orthy())
311 return false;
312 }
313 return true;
314 }
315
316 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) 307 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
317 : m_treeNode(this) 308 : m_treeNode(this)
318 , m_host(host) 309 , m_host(host)
319 , m_owner(owner) 310 , m_owner(owner)
320 , m_client(client) 311 , m_client(client)
321 , m_isLoading(false) 312 , m_isLoading(false)
322 { 313 {
323 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); 314 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter);
324 315
325 ASSERT(page()); 316 ASSERT(page());
326 317
327 if (m_owner) 318 if (m_owner)
328 m_owner->setContentFrame(*this); 319 m_owner->setContentFrame(*this);
329 else 320 else
330 page()->setMainFrame(this); 321 page()->setMainFrame(this);
331 } 322 }
332 323
333 } // namespace blink 324 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698