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

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

Issue 1180603002: Fix the logic that limits the number of frames in a page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: +UAF Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/NodeRareData.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | 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) 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 return nextCharacterRange.release(); 705 return nextCharacterRange.release();
706 } 706 }
707 707
708 return nullptr; 708 return nullptr;
709 } 709 }
710 710
711 bool LocalFrame::isURLAllowed(const KURL& url) const 711 bool LocalFrame::isURLAllowed(const KURL& url) const
712 { 712 {
713 // We allow one level of self-reference because some sites depend on that, 713 // We allow one level of self-reference because some sites depend on that,
714 // but we don't allow more than one. 714 // but we don't allow more than one.
715 if (host()->subframeCount() >= FrameHost::maxNumberOfFrames)
716 return false;
717 bool foundSelfReference = false; 715 bool foundSelfReference = false;
718 for (const Frame* frame = this; frame; frame = frame->tree().parent()) { 716 for (const Frame* frame = this; frame; frame = frame->tree().parent()) {
719 if (!frame->isLocalFrame()) 717 if (!frame->isLocalFrame())
720 continue; 718 continue;
721 if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url (), url)) { 719 if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url (), url)) {
722 if (foundSelfReference) 720 if (foundSelfReference)
723 return false; 721 return false;
724 foundSelfReference = true; 722 foundSelfReference = true;
725 } 723 }
726 } 724 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 , m_textZoomFactor(parentTextZoomFactor(this)) 833 , m_textZoomFactor(parentTextZoomFactor(this))
836 , m_inViewSourceMode(false) 834 , m_inViewSourceMode(false)
837 { 835 {
838 if (isLocalRoot()) 836 if (isLocalRoot())
839 m_instrumentingAgents = InstrumentingAgents::create(); 837 m_instrumentingAgents = InstrumentingAgents::create();
840 else 838 else
841 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 839 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
842 } 840 }
843 841
844 } // namespace blink 842 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/NodeRareData.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698