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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 (*it)->loader().detachFromParent(); | 1022 (*it)->loader().detachFromParent(); |
1023 } | 1023 } |
1024 | 1024 |
1025 void FrameLoader::closeAndRemoveChild(Frame* child) | 1025 void FrameLoader::closeAndRemoveChild(Frame* child) |
1026 { | 1026 { |
1027 child->setView(0); | 1027 child->setView(0); |
1028 if (child->ownerElement() && child->page()) | 1028 if (child->ownerElement() && child->page()) |
1029 child->page()->decrementSubframeCount(); | 1029 child->page()->decrementSubframeCount(); |
1030 child->willDetachFrameHost(); | 1030 child->willDetachFrameHost(); |
1031 child->loader().detachClient(); | 1031 child->loader().detachClient(); |
1032 | |
1033 m_frame->tree().removeChild(child); | |
1034 } | 1032 } |
1035 | 1033 |
1036 // Called every time a resource is completely loaded or an error is received. | 1034 // Called every time a resource is completely loaded or an error is received. |
1037 void FrameLoader::checkLoadComplete() | 1035 void FrameLoader::checkLoadComplete() |
1038 { | 1036 { |
1039 ASSERT(m_client->hasWebView()); | 1037 ASSERT(m_client->hasWebView()); |
1040 | 1038 |
1041 // FIXME: Always traversing the entire frame tree is a bit inefficient, but | 1039 // FIXME: Always traversing the entire frame tree is a bit inefficient, but |
1042 // is currently needed in order to null out the previous history item for al
l frames. | 1040 // is currently needed in order to null out the previous history item for al
l frames. |
1043 if (Page* page = m_frame->page()) { | 1041 if (Page* page = m_frame->page()) { |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 { | 1451 { |
1454 SandboxFlags flags = m_forcedSandboxFlags; | 1452 SandboxFlags flags = m_forcedSandboxFlags; |
1455 if (Frame* parentFrame = m_frame->tree().parent()) | 1453 if (Frame* parentFrame = m_frame->tree().parent()) |
1456 flags |= parentFrame->document()->sandboxFlags(); | 1454 flags |= parentFrame->document()->sandboxFlags(); |
1457 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1455 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
1458 flags |= ownerElement->sandboxFlags(); | 1456 flags |= ownerElement->sandboxFlags(); |
1459 return flags; | 1457 return flags; |
1460 } | 1458 } |
1461 | 1459 |
1462 } // namespace WebCore | 1460 } // namespace WebCore |
OLD | NEW |