| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 "The frame attempting navigation of the top-level window is " | 306 "The frame attempting navigation of the top-level window is " |
| 307 "sandboxed with the 'allow-top-navigation-by-user-activation' " | 307 "sandboxed with the 'allow-top-navigation-by-user-activation' " |
| 308 "flag, but has no user activation (aka gesture). See " | 308 "flag, but has no user activation (aka gesture). See " |
| 309 "https://www.chromestatus.com/feature/5629582019395584."; | 309 "https://www.chromestatus.com/feature/5629582019395584."; |
| 310 return false; | 310 return false; |
| 311 } | 311 } |
| 312 return true; | 312 return true; |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 | 315 |
| 316 ASSERT(GetSecurityContext()->GetSecurityOrigin()); | 316 DCHECK(GetSecurityContext()->GetSecurityOrigin()); |
| 317 SecurityOrigin& origin = *GetSecurityContext()->GetSecurityOrigin(); | 317 SecurityOrigin& origin = *GetSecurityContext()->GetSecurityOrigin(); |
| 318 | 318 |
| 319 // This is the normal case. A document can navigate its decendant frames, | 319 // This is the normal case. A document can navigate its decendant frames, |
| 320 // or, more generally, a document can navigate a frame if the document is | 320 // or, more generally, a document can navigate a frame if the document is |
| 321 // in the same origin as any of that frame's ancestors (in the frame | 321 // in the same origin as any of that frame's ancestors (in the frame |
| 322 // hierarchy). | 322 // hierarchy). |
| 323 // | 323 // |
| 324 // See http://www.adambarth.com/papers/2008/barth-jackson-mitchell.pdf for | 324 // See http://www.adambarth.com/papers/2008/barth-jackson-mitchell.pdf for |
| 325 // historical information about this security check. | 325 // historical information about this security check. |
| 326 if (CanAccessAncestor(origin, &target_frame)) | 326 if (CanAccessAncestor(origin, &target_frame)) |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 is_loading_(false) { | 430 is_loading_(false) { |
| 431 InstanceCounters::IncrementCounter(InstanceCounters::kFrameCounter); | 431 InstanceCounters::IncrementCounter(InstanceCounters::kFrameCounter); |
| 432 | 432 |
| 433 if (owner_) | 433 if (owner_) |
| 434 owner_->SetContentFrame(*this); | 434 owner_->SetContentFrame(*this); |
| 435 else | 435 else |
| 436 page_->SetMainFrame(this); | 436 page_->SetMainFrame(this); |
| 437 } | 437 } |
| 438 | 438 |
| 439 } // namespace blink | 439 } // namespace blink |
| OLD | NEW |