| 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 | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 9 * rights reserved. | 9 * rights reserved. |
| 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 return false; | 161 return false; |
| 162 } | 162 } |
| 163 | 163 |
| 164 bool Frame::canNavigate(const Frame& targetFrame) { | 164 bool Frame::canNavigate(const Frame& targetFrame) { |
| 165 String errorReason; | 165 String errorReason; |
| 166 const bool isAllowedNavigation = | 166 const bool isAllowedNavigation = |
| 167 canNavigateWithoutFramebusting(targetFrame, errorReason); | 167 canNavigateWithoutFramebusting(targetFrame, errorReason); |
| 168 const bool sandboxed = securityContext()->getSandboxFlags() != SandboxNone; | 168 const bool sandboxed = securityContext()->getSandboxFlags() != SandboxNone; |
| 169 const bool hasUserGesture = | 169 const bool hasUserGesture = |
| 170 isLocalFrame() ? toLocalFrame(this)->document()->hasReceivedUserGesture() | 170 isLocalFrame() ? toLocalFrame(this)->hasReceivedUserGesture() : false; |
| 171 : false; | |
| 172 | 171 |
| 173 // Top navigation in sandbox with or w/o 'allow-top-navigation'. | 172 // Top navigation in sandbox with or w/o 'allow-top-navigation'. |
| 174 if (targetFrame != this && sandboxed && targetFrame == tree().top()) { | 173 if (targetFrame != this && sandboxed && targetFrame == tree().top()) { |
| 175 UseCounter::count(&targetFrame, UseCounter::TopNavInSandbox); | 174 UseCounter::count(&targetFrame, UseCounter::TopNavInSandbox); |
| 176 if (!hasUserGesture) { | 175 if (!hasUserGesture) { |
| 177 UseCounter::count(&targetFrame, | 176 UseCounter::count(&targetFrame, |
| 178 UseCounter::TopNavInSandboxWithoutGesture); | 177 UseCounter::TopNavInSandboxWithoutGesture); |
| 179 } | 178 } |
| 180 } | 179 } |
| 181 | 180 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 385 |
| 387 ASSERT(page()); | 386 ASSERT(page()); |
| 388 | 387 |
| 389 if (m_owner) | 388 if (m_owner) |
| 390 m_owner->setContentFrame(*this); | 389 m_owner->setContentFrame(*this); |
| 391 else | 390 else |
| 392 page()->setMainFrame(this); | 391 page()->setMainFrame(this); |
| 393 } | 392 } |
| 394 | 393 |
| 395 } // namespace blink | 394 } // namespace blink |
| OLD | NEW |