OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 } | 699 } |
700 | 700 |
701 static bool shouldSendCompleteNotification(LocalFrame* frame, | 701 static bool shouldSendCompleteNotification(LocalFrame* frame, |
702 bool isNavigationHandledByClient) { | 702 bool isNavigationHandledByClient) { |
703 // FIXME: We might have already sent stop notifications and be re-completing. | 703 // FIXME: We might have already sent stop notifications and be re-completing. |
704 if (!frame->isLoading()) | 704 if (!frame->isLoading()) |
705 return false; | 705 return false; |
706 // Only send didStopLoading() if there are no navigations in progress at all, | 706 // Only send didStopLoading() if there are no navigations in progress at all, |
707 // whether committed, provisional, or pending. | 707 // whether committed, provisional, or pending. |
708 return frame->loader().documentLoader()->sentDidFinishLoad() && | 708 return frame->loader().documentLoader()->sentDidFinishLoad() && |
709 !frame->loader().provisionalDocumentLoader() && | 709 !frame->loader().hasProvisionalNavigation(); |
710 !isNavigationHandledByClient; | |
711 } | 710 } |
712 | 711 |
713 void FrameLoader::checkCompleted() { | 712 void FrameLoader::checkCompleted() { |
714 if (!shouldComplete(m_frame->document())) | 713 if (!shouldComplete(m_frame->document())) |
715 return; | 714 return; |
716 | 715 |
717 // OK, completed. | 716 // OK, completed. |
718 m_frame->document()->setReadyState(Document::Complete); | 717 m_frame->document()->setReadyState(Document::Complete); |
719 if (m_frame->document()->loadEventStillNeeded()) | 718 if (m_frame->document()->loadEventStillNeeded()) |
720 m_frame->document()->implicitClose(); | 719 m_frame->document()->implicitClose(); |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1906 m_documentLoader ? m_documentLoader->url() : String()); | 1905 m_documentLoader ? m_documentLoader->url() : String()); |
1907 return tracedValue; | 1906 return tracedValue; |
1908 } | 1907 } |
1909 | 1908 |
1910 inline void FrameLoader::takeObjectSnapshot() const { | 1909 inline void FrameLoader::takeObjectSnapshot() const { |
1911 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1910 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
1912 toTracedValue()); | 1911 toTracedValue()); |
1913 } | 1912 } |
1914 | 1913 |
1915 } // namespace blink | 1914 } // namespace blink |
OLD | NEW |