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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 | 86 |
87 // FIXME: We should not be doing all this work inside the destructor | 87 // FIXME: We should not be doing all this work inside the destructor |
88 | 88 |
89 #ifndef NDEBUG | 89 #ifndef NDEBUG |
90 frameCounter.decrement(); | 90 frameCounter.decrement(); |
91 #endif | 91 #endif |
92 } | 92 } |
93 | 93 |
94 void Frame::detachChildren() | 94 void Frame::detachChildren() |
95 { | 95 { |
96 ASSERT(refCount() > 1); | |
kenrb
2014/09/05 19:28:09
I'm fine with this, but it should have a comment o
nasko
2014/09/05 23:37:29
Done.
| |
96 typedef Vector<RefPtr<Frame> > FrameVector; | 97 typedef Vector<RefPtr<Frame> > FrameVector; |
97 FrameVector childrenToDetach; | 98 FrameVector childrenToDetach; |
98 childrenToDetach.reserveCapacity(tree().childCount()); | 99 childrenToDetach.reserveCapacity(tree().childCount()); |
99 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling()) | 100 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling()) |
100 childrenToDetach.append(child); | 101 childrenToDetach.append(child); |
101 FrameVector::iterator end = childrenToDetach.end(); | 102 FrameVector::iterator end = childrenToDetach.end(); |
102 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it) | 103 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it) |
103 (*it)->detach(); | 104 (*it)->detach(); |
104 } | 105 } |
105 | 106 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
199 } | 200 } |
200 m_owner = 0; | 201 m_owner = 0; |
201 } | 202 } |
202 | 203 |
203 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const | 204 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const |
204 { | 205 { |
205 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; | 206 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; |
206 } | 207 } |
207 | 208 |
208 } // namespace blink | 209 } // namespace blink |
OLD | NEW |