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

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: 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
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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 return nextCharacterRange.release(); 693 return nextCharacterRange.release();
694 } 694 }
695 695
696 return nullptr; 696 return nullptr;
697 } 697 }
698 698
699 bool LocalFrame::isURLAllowed(const KURL& url) const 699 bool LocalFrame::isURLAllowed(const KURL& url) const
700 { 700 {
701 // We allow one level of self-reference because some sites depend on that, 701 // We allow one level of self-reference because some sites depend on that,
702 // but we don't allow more than one. 702 // but we don't allow more than one.
703 if (host()->subframeCount() >= FrameHost::maxNumberOfFrames)
704 return false;
705 bool foundSelfReference = false; 703 bool foundSelfReference = false;
706 for (const Frame* frame = this; frame; frame = frame->tree().parent()) { 704 for (const Frame* frame = this; frame; frame = frame->tree().parent()) {
707 if (!frame->isLocalFrame()) 705 if (!frame->isLocalFrame())
708 continue; 706 continue;
709 if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url (), url)) { 707 if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url (), url)) {
710 if (foundSelfReference) 708 if (foundSelfReference)
711 return false; 709 return false;
712 foundSelfReference = true; 710 foundSelfReference = true;
713 } 711 }
714 } 712 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 , m_textZoomFactor(parentTextZoomFactor(this)) 821 , m_textZoomFactor(parentTextZoomFactor(this))
824 , m_inViewSourceMode(false) 822 , m_inViewSourceMode(false)
825 { 823 {
826 if (isLocalRoot()) 824 if (isLocalRoot())
827 m_instrumentingAgents = InstrumentingAgents::create(); 825 m_instrumentingAgents = InstrumentingAgents::create();
828 else 826 else
829 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 827 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
830 } 828 }
831 829
832 } // namespace blink 830 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698