Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: Source/core/loader/FrameLoader.cpp

Issue 672843002: Delay dispatching DOMContentLoaded event to next event loop. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: hmm Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698