| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |