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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 return false; | 941 return false; |
942 return true; | 942 return true; |
943 } | 943 } |
944 | 944 |
945 bool FrameLoader::checkLoadCompleteForThisFrame() | 945 bool FrameLoader::checkLoadCompleteForThisFrame() |
946 { | 946 { |
947 ASSERT(client()->hasWebView()); | 947 ASSERT(client()->hasWebView()); |
948 RefPtr<LocalFrame> protect(m_frame); | 948 RefPtr<LocalFrame> protect(m_frame); |
949 | 949 |
950 bool allChildrenAreDoneLoading = true; | 950 bool allChildrenAreDoneLoading = true; |
951 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { | 951 for (RefPtr<Frame> child = m_frame->tree().firstChild(); child; child = chil
d->tree().nextSibling()) { |
952 if (child->isLocalFrame()) | 952 if (child->isLocalFrame()) |
953 allChildrenAreDoneLoading &= toLocalFrame(child)->loader().checkLoad
CompleteForThisFrame(); | 953 allChildrenAreDoneLoading &= toLocalFrame(child.get())->loader().che
ckLoadCompleteForThisFrame(); |
954 } | 954 } |
955 | 955 |
956 if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) { | 956 if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) { |
957 const ResourceError& error = m_provisionalDocumentLoader->mainDocumentEr
ror(); | 957 const ResourceError& error = m_provisionalDocumentLoader->mainDocumentEr
ror(); |
958 if (error.isNull()) | 958 if (error.isNull()) |
959 return false; | 959 return false; |
960 RefPtr<DocumentLoader> loader = m_provisionalDocumentLoader; | 960 RefPtr<DocumentLoader> loader = m_provisionalDocumentLoader; |
961 client()->dispatchDidFailProvisionalLoad(error); | 961 client()->dispatchDidFailProvisionalLoad(error); |
962 if (loader != m_provisionalDocumentLoader) | 962 if (loader != m_provisionalDocumentLoader) |
963 return false; | 963 return false; |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. | 1465 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. |
1466 Frame* parentFrame = m_frame->tree().parent(); | 1466 Frame* parentFrame = m_frame->tree().parent(); |
1467 if (parentFrame && parentFrame->isLocalFrame()) | 1467 if (parentFrame && parentFrame->isLocalFrame()) |
1468 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); | 1468 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); |
1469 if (FrameOwner* frameOwner = m_frame->ownerElement()) | 1469 if (FrameOwner* frameOwner = m_frame->ownerElement()) |
1470 flags |= frameOwner->sandboxFlags(); | 1470 flags |= frameOwner->sandboxFlags(); |
1471 return flags; | 1471 return flags; |
1472 } | 1472 } |
1473 | 1473 |
1474 } // namespace WebCore | 1474 } // namespace WebCore |
OLD | NEW |