| 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 return false; | 664 return false; |
| 665 | 665 |
| 666 // We might have declined to run the load event due to an imminent | 666 // We might have declined to run the load event due to an imminent |
| 667 // content-initiated navigation. | 667 // content-initiated navigation. |
| 668 if (!frame->document()->loadEventFinished()) | 668 if (!frame->document()->loadEventFinished()) |
| 669 return false; | 669 return false; |
| 670 | 670 |
| 671 // An event might have restarted a child frame. | 671 // An event might have restarted a child frame. |
| 672 if (!allDescendantsAreComplete(frame)) | 672 if (!allDescendantsAreComplete(frame)) |
| 673 return false; | 673 return false; |
| 674 |
| 675 // Don't notify if the frame is being detached. |
| 676 if (frame->isDetaching()) |
| 677 return false; |
| 678 |
| 674 return true; | 679 return true; |
| 675 } | 680 } |
| 676 | 681 |
| 677 static bool shouldSendCompleteNotification(LocalFrame* frame, | 682 static bool shouldSendCompleteNotification(LocalFrame* frame, |
| 678 bool isNavigationHandledByClient) { | 683 bool isNavigationHandledByClient) { |
| 679 // FIXME: We might have already sent stop notifications and be re-completing. | 684 // FIXME: We might have already sent stop notifications and be re-completing. |
| 680 if (!frame->isLoading()) | 685 if (!frame->isLoading()) |
| 681 return false; | 686 return false; |
| 682 // Only send didStopLoading() if there are no navigations in progress at all, | 687 // Only send didStopLoading() if there are no navigations in progress at all, |
| 683 // whether committed, provisional, or pending. | 688 // whether committed, provisional, or pending. |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 m_documentLoader ? m_documentLoader->url() : String()); | 1921 m_documentLoader ? m_documentLoader->url() : String()); |
| 1917 return tracedValue; | 1922 return tracedValue; |
| 1918 } | 1923 } |
| 1919 | 1924 |
| 1920 inline void FrameLoader::takeObjectSnapshot() const { | 1925 inline void FrameLoader::takeObjectSnapshot() const { |
| 1921 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1926 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
| 1922 toTracedValue()); | 1927 toTracedValue()); |
| 1923 } | 1928 } |
| 1924 | 1929 |
| 1925 } // namespace blink | 1930 } // namespace blink |
| OLD | NEW |