| 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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 IntRect rect = editor().firstRectForRange(nextCharacterRange); | 749 IntRect rect = editor().firstRectForRange(nextCharacterRange); |
| 750 if (rect.contains(framePoint)) | 750 if (rect.contains(framePoint)) |
| 751 return EphemeralRange(nextCharacterRange); | 751 return EphemeralRange(nextCharacterRange); |
| 752 } | 752 } |
| 753 | 753 |
| 754 return EphemeralRange(); | 754 return EphemeralRange(); |
| 755 } | 755 } |
| 756 | 756 |
| 757 bool LocalFrame::isURLAllowed(const KURL& url) const | 757 bool LocalFrame::isURLAllowed(const KURL& url) const |
| 758 { | 758 { |
| 759 // Exempt about: URLs from self-reference check. |
| 760 if (url.protocolIsAbout()) |
| 761 return true; |
| 762 |
| 759 // We allow one level of self-reference because some sites depend on that, | 763 // We allow one level of self-reference because some sites depend on that, |
| 760 // but we don't allow more than one. | 764 // but we don't allow more than one. |
| 761 bool foundSelfReference = false; | 765 bool foundSelfReference = false; |
| 762 for (const Frame* frame = this; frame; frame = frame->tree().parent()) { | 766 for (const Frame* frame = this; frame; frame = frame->tree().parent()) { |
| 763 if (!frame->isLocalFrame()) | 767 if (!frame->isLocalFrame()) |
| 764 continue; | 768 continue; |
| 765 if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url
(), url)) { | 769 if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url
(), url)) { |
| 766 if (foundSelfReference) | 770 if (foundSelfReference) |
| 767 return false; | 771 return false; |
| 768 foundSelfReference = true; | 772 foundSelfReference = true; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 { | 921 { |
| 918 m_frame->disableNavigation(); | 922 m_frame->disableNavigation(); |
| 919 } | 923 } |
| 920 | 924 |
| 921 FrameNavigationDisabler::~FrameNavigationDisabler() | 925 FrameNavigationDisabler::~FrameNavigationDisabler() |
| 922 { | 926 { |
| 923 m_frame->enableNavigation(); | 927 m_frame->enableNavigation(); |
| 924 } | 928 } |
| 925 | 929 |
| 926 } // namespace blink | 930 } // namespace blink |
| OLD | NEW |