| 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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 } | 959 } |
| 960 | 960 |
| 961 // This function is an incomprehensible mess and is only used in checkLoadComple
teForThisFrame. | 961 // This function is an incomprehensible mess and is only used in checkLoadComple
teForThisFrame. |
| 962 // If you're thinking of using it elsewhere, stop right now and reconsider your
life. | 962 // If you're thinking of using it elsewhere, stop right now and reconsider your
life. |
| 963 static bool isDocumentDoneLoading(Document* document) | 963 static bool isDocumentDoneLoading(Document* document) |
| 964 { | 964 { |
| 965 if (!document->loader()) | 965 if (!document->loader()) |
| 966 return true; | 966 return true; |
| 967 if (document->loader()->isLoadingMainResource()) | 967 if (document->loader()->isLoadingMainResource()) |
| 968 return false; | 968 return false; |
| 969 if (!document->hasFiredDOMContentLoadedEvent()) |
| 970 return false; |
| 969 if (!document->loadEventFinished()) { | 971 if (!document->loadEventFinished()) { |
| 970 if (document->loader()->isLoading() || document->isDelayingLoadEvent()) | 972 if (document->loader()->isLoading() || document->isDelayingLoadEvent()) |
| 971 return false; | 973 return false; |
| 972 } | 974 } |
| 973 if (document->fetcher()->requestCount()) | 975 if (document->fetcher()->requestCount()) |
| 974 return false; | 976 return false; |
| 975 if (document->processingLoadEvent()) | 977 if (document->processingLoadEvent()) |
| 976 return false; | 978 return false; |
| 977 if (document->hasActiveParser()) | 979 if (document->hasActiveParser()) |
| 978 return false; | 980 return false; |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1442 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. | 1444 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. |
| 1443 Frame* parentFrame = m_frame->tree().parent(); | 1445 Frame* parentFrame = m_frame->tree().parent(); |
| 1444 if (parentFrame && parentFrame->isLocalFrame()) | 1446 if (parentFrame && parentFrame->isLocalFrame()) |
| 1445 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); | 1447 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); |
| 1446 if (FrameOwner* frameOwner = m_frame->owner()) | 1448 if (FrameOwner* frameOwner = m_frame->owner()) |
| 1447 flags |= frameOwner->sandboxFlags(); | 1449 flags |= frameOwner->sandboxFlags(); |
| 1448 return flags; | 1450 return flags; |
| 1449 } | 1451 } |
| 1450 | 1452 |
| 1451 } // namespace blink | 1453 } // namespace blink |
| OLD | NEW |