| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::Create())); | 124 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::Create())); |
| 125 return client; | 125 return client; |
| 126 } | 126 } |
| 127 | 127 |
| 128 ChromeClient& Frame::GetChromeClient() const { | 128 ChromeClient& Frame::GetChromeClient() const { |
| 129 if (Page* page = this->GetPage()) | 129 if (Page* page = this->GetPage()) |
| 130 return page->GetChromeClient(); | 130 return page->GetChromeClient(); |
| 131 return GetEmptyChromeClient(); | 131 return GetEmptyChromeClient(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 Frame* Frame::FindFrameForNavigation(const AtomicString& name, | |
| 135 Frame& active_frame) { | |
| 136 Frame* frame = Tree().Find(name); | |
| 137 if (!frame || !active_frame.CanNavigate(*frame)) | |
| 138 return nullptr; | |
| 139 return frame; | |
| 140 } | |
| 141 | |
| 142 static bool CanAccessAncestor(const SecurityOrigin& active_security_origin, | 134 static bool CanAccessAncestor(const SecurityOrigin& active_security_origin, |
| 143 const Frame* target_frame) { | 135 const Frame* target_frame) { |
| 144 // targetFrame can be 0 when we're trying to navigate a top-level frame | 136 // targetFrame can be 0 when we're trying to navigate a top-level frame |
| 145 // that has a 0 opener. | 137 // that has a 0 opener. |
| 146 if (!target_frame) | 138 if (!target_frame) |
| 147 return false; | 139 return false; |
| 148 | 140 |
| 149 const bool is_local_active_origin = active_security_origin.IsLocal(); | 141 const bool is_local_active_origin = active_security_origin.IsLocal(); |
| 150 for (const Frame* ancestor_frame = target_frame; ancestor_frame; | 142 for (const Frame* ancestor_frame = target_frame; ancestor_frame; |
| 151 ancestor_frame = ancestor_frame->Tree().Parent()) { | 143 ancestor_frame = ancestor_frame->Tree().Parent()) { |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 is_loading_(false) { | 422 is_loading_(false) { |
| 431 InstanceCounters::IncrementCounter(InstanceCounters::kFrameCounter); | 423 InstanceCounters::IncrementCounter(InstanceCounters::kFrameCounter); |
| 432 | 424 |
| 433 if (owner_) | 425 if (owner_) |
| 434 owner_->SetContentFrame(*this); | 426 owner_->SetContentFrame(*this); |
| 435 else | 427 else |
| 436 page_->SetMainFrame(this); | 428 page_->SetMainFrame(this); |
| 437 } | 429 } |
| 438 | 430 |
| 439 } // namespace blink | 431 } // namespace blink |
| OLD | NEW |