OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 } | 997 } |
998 | 998 |
999 void FrameLoader::detachChildren() | 999 void FrameLoader::detachChildren() |
1000 { | 1000 { |
1001 typedef Vector<RefPtr<Frame> > FrameVector; | 1001 typedef Vector<RefPtr<Frame> > FrameVector; |
1002 FrameVector childrenToDetach; | 1002 FrameVector childrenToDetach; |
1003 childrenToDetach.reserveCapacity(m_frame->tree().childCount()); | 1003 childrenToDetach.reserveCapacity(m_frame->tree().childCount()); |
1004 for (Frame* child = m_frame->tree().lastChild(); child; child = child->tree(
).previousSibling()) | 1004 for (Frame* child = m_frame->tree().lastChild(); child; child = child->tree(
).previousSibling()) |
1005 childrenToDetach.append(child); | 1005 childrenToDetach.append(child); |
1006 FrameVector::iterator end = childrenToDetach.end(); | 1006 FrameVector::iterator end = childrenToDetach.end(); |
1007 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; it++) | 1007 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it) |
1008 (*it)->loader().detachFromParent(); | 1008 (*it)->loader().detachFromParent(); |
1009 } | 1009 } |
1010 | 1010 |
1011 void FrameLoader::closeAndRemoveChild(Frame* child) | 1011 void FrameLoader::closeAndRemoveChild(Frame* child) |
1012 { | 1012 { |
1013 child->setView(0); | 1013 child->setView(0); |
1014 if (child->ownerElement() && child->page()) | 1014 if (child->ownerElement() && child->page()) |
1015 child->page()->decrementSubframeCount(); | 1015 child->page()->decrementSubframeCount(); |
1016 child->willDetachFrameHost(); | 1016 child->willDetachFrameHost(); |
1017 child->loader().detachClient(); | 1017 child->loader().detachClient(); |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 { | 1463 { |
1464 SandboxFlags flags = m_forcedSandboxFlags; | 1464 SandboxFlags flags = m_forcedSandboxFlags; |
1465 if (Frame* parentFrame = m_frame->tree().parent()) | 1465 if (Frame* parentFrame = m_frame->tree().parent()) |
1466 flags |= parentFrame->document()->sandboxFlags(); | 1466 flags |= parentFrame->document()->sandboxFlags(); |
1467 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1467 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
1468 flags |= ownerElement->sandboxFlags(); | 1468 flags |= ownerElement->sandboxFlags(); |
1469 return flags; | 1469 return flags; |
1470 } | 1470 } |
1471 | 1471 |
1472 } // namespace WebCore | 1472 } // namespace WebCore |
OLD | NEW |