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

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

Issue 2055433002: Revert of service worker: Don't control a subframe of an insecure context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 void Frame::didChangeVisibilityState() 299 void Frame::didChangeVisibilityState()
300 { 300 {
301 HeapVector<Member<Frame>> childFrames; 301 HeapVector<Member<Frame>> childFrames;
302 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling()) 302 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling())
303 childFrames.append(child); 303 childFrames.append(child);
304 for (size_t i = 0; i < childFrames.size(); ++i) 304 for (size_t i = 0; i < childFrames.size(); ++i)
305 childFrames[i]->didChangeVisibilityState(); 305 childFrames[i]->didChangeVisibilityState();
306 } 306 }
307 307
308 bool Frame::canHaveSecureChild() const
309 {
310 for (const Frame* parent = this; parent; parent = parent->tree().parent()) {
311 if (!parent->securityContext()->getSecurityOrigin()->isPotentiallyTrustw orthy())
312 return false;
313 }
314 return true;
315 }
316
317 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) 308 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
318 : m_treeNode(this) 309 : m_treeNode(this)
319 , m_host(host) 310 , m_host(host)
320 , m_owner(owner) 311 , m_owner(owner)
321 , m_client(client) 312 , m_client(client)
322 , m_isLoading(false) 313 , m_isLoading(false)
323 { 314 {
324 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); 315 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter);
325 316
326 ASSERT(page()); 317 ASSERT(page());
327 318
328 if (m_owner) 319 if (m_owner)
329 m_owner->setContentFrame(*this); 320 m_owner->setContentFrame(*this);
330 else 321 else
331 page()->setMainFrame(this); 322 page()->setMainFrame(this);
332 } 323 }
333 324
334 } // namespace blink 325 } // 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