| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 namespace blink { | 54 namespace blink { |
| 55 | 55 |
| 56 using namespace HTMLNames; | 56 using namespace HTMLNames; |
| 57 | 57 |
| 58 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, frameCounter, ("Frame")); | 58 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, frameCounter, ("Frame")); |
| 59 | 59 |
| 60 Frame::~Frame() | 60 Frame::~Frame() |
| 61 { | 61 { |
| 62 ASSERT(!m_owner); | 62 ASSERT(!m_owner); |
| 63 #if !ENABLE(OILPAN) | |
| 64 // FIXME: We should not be doing all this work inside the destructor | |
| 65 setDOMWindow(nullptr); | |
| 66 #endif | |
| 67 | |
| 68 #ifndef NDEBUG | 63 #ifndef NDEBUG |
| 69 frameCounter.decrement(); | 64 frameCounter.decrement(); |
| 70 #endif | 65 #endif |
| 71 } | 66 } |
| 72 | 67 |
| 73 void Frame::trace(Visitor* visitor) | 68 void Frame::trace(Visitor* visitor) |
| 74 { | 69 { |
| 75 visitor->trace(m_treeNode); | 70 visitor->trace(m_treeNode); |
| 76 visitor->trace(m_host); | 71 visitor->trace(m_host); |
| 77 visitor->trace(m_owner); | 72 visitor->trace(m_owner); |
| 78 visitor->trace(m_domWindow); | |
| 79 } | 73 } |
| 80 | 74 |
| 81 void Frame::detach() | 75 void Frame::detach() |
| 82 { | 76 { |
| 83 ASSERT(m_client); | 77 ASSERT(m_client); |
| 84 disconnectOwnerElement(); | 78 disconnectOwnerElement(); |
| 85 // After this, we must no longer talk to the client since this clears | 79 // After this, we must no longer talk to the client since this clears |
| 86 // its owning reference back to our owning LocalFrame. | 80 // its owning reference back to our owning LocalFrame. |
| 87 m_client->detached(); | 81 m_client->detached(); |
| 88 m_client = nullptr; | 82 m_client = nullptr; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 return true; | 130 return true; |
| 137 | 131 |
| 138 return tree().parent()->isRemoteFrame(); | 132 return tree().parent()->isRemoteFrame(); |
| 139 } | 133 } |
| 140 | 134 |
| 141 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const | 135 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const |
| 142 { | 136 { |
| 143 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; | 137 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; |
| 144 } | 138 } |
| 145 | 139 |
| 146 void Frame::setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow> domWindow) | |
| 147 { | |
| 148 if (m_domWindow) | |
| 149 m_domWindow->reset(); | |
| 150 | |
| 151 m_domWindow = domWindow; | |
| 152 } | |
| 153 | |
| 154 static ChromeClient& emptyChromeClient() | 140 static ChromeClient& emptyChromeClient() |
| 155 { | 141 { |
| 156 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, ()); | 142 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, ()); |
| 157 return client; | 143 return client; |
| 158 } | 144 } |
| 159 | 145 |
| 160 ChromeClient& Frame::chromeClient() const | 146 ChromeClient& Frame::chromeClient() const |
| 161 { | 147 { |
| 162 if (Page* page = this->page()) | 148 if (Page* page = this->page()) |
| 163 return page->chrome().client(); | 149 return page->chrome().client(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 202 |
| 217 if (m_owner) { | 203 if (m_owner) { |
| 218 if (m_owner->isLocal()) | 204 if (m_owner->isLocal()) |
| 219 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this); | 205 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this); |
| 220 } else { | 206 } else { |
| 221 page()->setMainFrame(this); | 207 page()->setMainFrame(this); |
| 222 } | 208 } |
| 223 } | 209 } |
| 224 | 210 |
| 225 } // namespace blink | 211 } // namespace blink |
| OLD | NEW |