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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 { | 735 { |
736 for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree()->paren
t()) { | 736 for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree()->paren
t()) { |
737 if (!ancestor->loader()->m_isComplete) | 737 if (!ancestor->loader()->m_isComplete) |
738 return false; | 738 return false; |
739 } | 739 } |
740 return true; | 740 return true; |
741 } | 741 } |
742 | 742 |
743 void FrameLoader::checkCompleted() | 743 void FrameLoader::checkCompleted() |
744 { | 744 { |
| 745 RefPtr<Frame> protect(m_frame); |
745 m_shouldCallCheckCompleted = false; | 746 m_shouldCallCheckCompleted = false; |
746 | 747 |
747 if (m_frame->view()) | 748 if (m_frame->view()) |
748 m_frame->view()->handleLoadCompleted(); | 749 m_frame->view()->handleLoadCompleted(); |
749 | 750 |
750 // Have we completed before? | 751 // Have we completed before? |
751 if (m_isComplete) | 752 if (m_isComplete) |
752 return; | 753 return; |
753 | 754 |
754 // Are we still parsing? | 755 // Are we still parsing? |
(...skipping 10 matching lines...) Expand all Loading... |
765 | 766 |
766 // Any frame that hasn't completed yet? | 767 // Any frame that hasn't completed yet? |
767 if (!allChildrenAreComplete()) | 768 if (!allChildrenAreComplete()) |
768 return; | 769 return; |
769 | 770 |
770 // OK, completed. | 771 // OK, completed. |
771 m_isComplete = true; | 772 m_isComplete = true; |
772 m_requestedHistoryItem = 0; | 773 m_requestedHistoryItem = 0; |
773 m_frame->document()->setReadyState(Document::Complete); | 774 m_frame->document()->setReadyState(Document::Complete); |
774 | 775 |
775 RefPtr<Frame> protect(m_frame); | |
776 checkCallImplicitClose(); // if we didn't do it before | 776 checkCallImplicitClose(); // if we didn't do it before |
777 | 777 |
778 m_frame->navigationScheduler()->startTimer(); | 778 m_frame->navigationScheduler()->startTimer(); |
779 | 779 |
780 completed(); | 780 completed(); |
781 if (m_frame->page()) | 781 if (m_frame->page()) |
782 checkLoadComplete(); | 782 checkLoadComplete(); |
783 | 783 |
784 if (m_frame->view()) | 784 if (m_frame->view()) |
785 m_frame->view()->handleLoadCompleted(); | 785 m_frame->view()->handleLoadCompleted(); |
(...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3349 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); | 3349 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); |
3350 | 3350 |
3351 page->chrome()->setWindowRect(newWindowRect); | 3351 page->chrome()->setWindowRect(newWindowRect); |
3352 page->chrome()->show(); | 3352 page->chrome()->show(); |
3353 | 3353 |
3354 created = true; | 3354 created = true; |
3355 return frame; | 3355 return frame; |
3356 } | 3356 } |
3357 | 3357 |
3358 } // namespace WebCore | 3358 } // namespace WebCore |
OLD | NEW |