| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 disconnectOwnerElement(); | 95 disconnectOwnerElement(); |
| 96 // After this, we must no longer talk to the client since this clears | 96 // After this, we must no longer talk to the client since this clears |
| 97 // its owning reference back to our owning LocalFrame. | 97 // its owning reference back to our owning LocalFrame. |
| 98 m_client->detached(type); | 98 m_client->detached(type); |
| 99 m_client = nullptr; | 99 m_client = nullptr; |
| 100 m_host = nullptr; | 100 m_host = nullptr; |
| 101 } | 101 } |
| 102 | 102 |
| 103 void Frame::detachChildren() | 103 void Frame::detachChildren() |
| 104 { | 104 { |
| 105 typedef WillBeHeapVector<RefPtrWillBeMember<Frame>> FrameVector; | 105 typedef HeapVector<Member<Frame>> FrameVector; |
| 106 FrameVector childrenToDetach; | 106 FrameVector childrenToDetach; |
| 107 childrenToDetach.reserveCapacity(tree().childCount()); | 107 childrenToDetach.reserveCapacity(tree().childCount()); |
| 108 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) | 108 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) |
| 109 childrenToDetach.append(child); | 109 childrenToDetach.append(child); |
| 110 for (const auto& child : childrenToDetach) | 110 for (const auto& child : childrenToDetach) |
| 111 child->detach(FrameDetachType::Remove); | 111 child->detach(FrameDetachType::Remove); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void Frame::disconnectOwnerElement() | 114 void Frame::disconnectOwnerElement() |
| 115 { | 115 { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 return tree().parent()->isRemoteFrame(); | 147 return tree().parent()->isRemoteFrame(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const | 150 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const |
| 151 { | 151 { |
| 152 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : nu
llptr; | 152 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : nu
llptr; |
| 153 } | 153 } |
| 154 | 154 |
| 155 static ChromeClient& emptyChromeClient() | 155 static ChromeClient& emptyChromeClient() |
| 156 { | 156 { |
| 157 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<EmptyChromeClient>, client, (Empt
yChromeClient::create())); | 157 DEFINE_STATIC_LOCAL(Persistent<EmptyChromeClient>, client, (EmptyChromeClien
t::create())); |
| 158 return *client; | 158 return *client; |
| 159 } | 159 } |
| 160 | 160 |
| 161 ChromeClient& Frame::chromeClient() const | 161 ChromeClient& Frame::chromeClient() const |
| 162 { | 162 { |
| 163 if (Page* page = this->page()) | 163 if (Page* page = this->page()) |
| 164 return page->chromeClient(); | 164 return page->chromeClient(); |
| 165 return emptyChromeClient(); | 165 return emptyChromeClient(); |
| 166 } | 166 } |
| 167 | 167 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 frameCounter().increment(); | 308 frameCounter().increment(); |
| 309 #endif | 309 #endif |
| 310 | 310 |
| 311 if (m_owner) | 311 if (m_owner) |
| 312 m_owner->setContentFrame(*this); | 312 m_owner->setContentFrame(*this); |
| 313 else | 313 else |
| 314 page()->setMainFrame(this); | 314 page()->setMainFrame(this); |
| 315 } | 315 } |
| 316 | 316 |
| 317 } // namespace blink | 317 } // namespace blink |
| OLD | NEW |