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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 visitor->trace(m_domWindow); | 102 visitor->trace(m_domWindow); |
103 } | 103 } |
104 | 104 |
105 void Frame::detachChildren() | 105 void Frame::detachChildren() |
106 { | 106 { |
107 typedef WillBeHeapVector<RefPtrWillBeMember<Frame> > FrameVector; | 107 typedef WillBeHeapVector<RefPtrWillBeMember<Frame> > FrameVector; |
108 FrameVector childrenToDetach; | 108 FrameVector childrenToDetach; |
109 childrenToDetach.reserveCapacity(tree().childCount()); | 109 childrenToDetach.reserveCapacity(tree().childCount()); |
110 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) | 110 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) |
111 childrenToDetach.append(child); | 111 childrenToDetach.append(child); |
112 FrameVector::iterator end = childrenToDetach.end(); | 112 for (const auto& child : childrenToDetach) |
113 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it) | 113 child->detach(); |
114 (*it)->detach(); | |
115 } | 114 } |
116 | 115 |
117 FrameHost* Frame::host() const | 116 FrameHost* Frame::host() const |
118 { | 117 { |
119 return m_host; | 118 return m_host; |
120 } | 119 } |
121 | 120 |
122 Page* Frame::page() const | 121 Page* Frame::page() const |
123 { | 122 { |
124 if (m_host) | 123 if (m_host) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 210 } |
212 m_owner = nullptr; | 211 m_owner = nullptr; |
213 } | 212 } |
214 | 213 |
215 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const | 214 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const |
216 { | 215 { |
217 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; | 216 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; |
218 } | 217 } |
219 | 218 |
220 } // namespace blink | 219 } // namespace blink |
OLD | NEW |