| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 306 |
| 307 ElementShadow* shadow = root.isElementNode() ? toElement(root).shadow() : 0; | 307 ElementShadow* shadow = root.isElementNode() ? toElement(root).shadow() : 0; |
| 308 if (shadow) | 308 if (shadow) |
| 309 collectFrameOwners(*shadow); | 309 collectFrameOwners(*shadow); |
| 310 } | 310 } |
| 311 | 311 |
| 312 inline void ChildFrameDisconnector::disconnectCollectedFrameOwners() | 312 inline void ChildFrameDisconnector::disconnectCollectedFrameOwners() |
| 313 { | 313 { |
| 314 // Must disable frame loading in the subtree so an unload handler cannot | 314 // Must disable frame loading in the subtree so an unload handler cannot |
| 315 // insert more frames and create loaded frames in detached subtrees. | 315 // insert more frames and create loaded frames in detached subtrees. |
| 316 SubframeLoadingDisabler disabler(&m_root); | 316 SubframeLoadingDisabler disabler(m_root); |
| 317 | 317 |
| 318 for (unsigned i = 0; i < m_frameOwners.size(); ++i) { | 318 for (unsigned i = 0; i < m_frameOwners.size(); ++i) { |
| 319 HTMLFrameOwnerElement* owner = m_frameOwners[i].get(); | 319 HTMLFrameOwnerElement* owner = m_frameOwners[i].get(); |
| 320 // Don't need to traverse up the tree for the first owner since no | 320 // Don't need to traverse up the tree for the first owner since no |
| 321 // script could have moved it. | 321 // script could have moved it. |
| 322 if (!i || m_root.containsIncludingShadowDOM(owner)) | 322 if (!i || m_root.containsIncludingShadowDOM(owner)) |
| 323 owner->disconnectContentFrame(); | 323 owner->disconnectContentFrame(); |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 339 for (Node* child = m_root.firstChild(); child; child = child->nextSiblin
g()) | 339 for (Node* child = m_root.firstChild(); child; child = child->nextSiblin
g()) |
| 340 collectFrameOwners(*child); | 340 collectFrameOwners(*child); |
| 341 } | 341 } |
| 342 | 342 |
| 343 disconnectCollectedFrameOwners(); | 343 disconnectCollectedFrameOwners(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace WebCore | 346 } // namespace WebCore |
| 347 | 347 |
| 348 #endif // ContainerNodeAlgorithms_h | 348 #endif // ContainerNodeAlgorithms_h |
| OLD | NEW |