| 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 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 m_progressTracker->progressCompleted(); | 1673 m_progressTracker->progressCompleted(); |
| 1674 setState(FrameStateComplete); | 1674 setState(FrameStateComplete); |
| 1675 } | 1675 } |
| 1676 | 1676 |
| 1677 void FrameLoader::commitProvisionalLoad() | 1677 void FrameLoader::commitProvisionalLoad() |
| 1678 { | 1678 { |
| 1679 RefPtr<CachedPage> cachedPage = m_loadingFromCachedPage ? pageCache()->get(h
istory()->provisionalItem()) : 0; | 1679 RefPtr<CachedPage> cachedPage = m_loadingFromCachedPage ? pageCache()->get(h
istory()->provisionalItem()) : 0; |
| 1680 RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader; | 1680 RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader; |
| 1681 RefPtr<Frame> protect(m_frame); | 1681 RefPtr<Frame> protect(m_frame); |
| 1682 | 1682 |
| 1683 LOG(PageCache, "WebCoreLoading %s: About to commit provisional load from pre
vious URL '%s' to new URL '%s'", m_frame->tree()->uniqueName().string().utf8().d
ata(), | 1683 LOG_INFO(PageCache, "WebCoreLoading %s: About to commit provisional load fro
m previous URL '%s' to new URL '%s'", m_frame->tree()->uniqueName().string().utf
8().data(), |
| 1684 m_frame->document() ? m_frame->document()->url().elidedString().utf8().d
ata() : "", | 1684 m_frame->document() ? m_frame->document()->url().elidedString().utf
8().data() : "", |
| 1685 pdl ? pdl->url().elidedString().utf8().data() : "<no provisional Documen
tLoader>"); | 1685 pdl ? pdl->url().elidedString().utf8().data() : "<no provisional Do
cumentLoader>"); |
| 1686 | 1686 |
| 1687 // Check to see if we need to cache the page we are navigating away from int
o the back/forward cache. | 1687 // Check to see if we need to cache the page we are navigating away from int
o the back/forward cache. |
| 1688 // We are doing this here because we know for sure that a new page is about
to be loaded. | 1688 // We are doing this here because we know for sure that a new page is about
to be loaded. |
| 1689 HistoryItem* item = history()->currentItem(); | 1689 HistoryItem* item = history()->currentItem(); |
| 1690 if (!m_frame->tree()->parent() && pageCache()->canCache(m_frame->page()) &&
!item->isInPageCache()) | 1690 if (!m_frame->tree()->parent() && pageCache()->canCache(m_frame->page()) &&
!item->isInPageCache()) |
| 1691 pageCache()->add(item, m_frame->page()); | 1691 pageCache()->add(item, m_frame->page()); |
| 1692 | 1692 |
| 1693 if (m_loadType != FrameLoadTypeReplace) | 1693 if (m_loadType != FrameLoadTypeReplace) |
| 1694 closeOldDataSources(); | 1694 closeOldDataSources(); |
| 1695 | 1695 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1725 if (!title.isNull()) | 1725 if (!title.isNull()) |
| 1726 m_client->dispatchDidReceiveTitle(title); | 1726 m_client->dispatchDidReceiveTitle(title); |
| 1727 | 1727 |
| 1728 checkCompleted(); | 1728 checkCompleted(); |
| 1729 } else { | 1729 } else { |
| 1730 if (cachedPage) | 1730 if (cachedPage) |
| 1731 pageCache()->remove(history()->currentItem()); | 1731 pageCache()->remove(history()->currentItem()); |
| 1732 didOpenURL(); | 1732 didOpenURL(); |
| 1733 } | 1733 } |
| 1734 | 1734 |
| 1735 LOG(Loading, "WebCoreLoading %s: Finished committing provisional load to URL
%s", m_frame->tree()->uniqueName().string().utf8().data(), | 1735 LOG_INFO(Loading, "WebCoreLoading %s: Finished committing provisional load t
o URL %s", m_frame->tree()->uniqueName().string().utf8().data(), |
| 1736 m_frame->document() ? m_frame->document()->url().elidedString().utf8().d
ata() : ""); | 1736 m_frame->document() ? m_frame->document()->url().elidedString().utf
8().data() : ""); |
| 1737 | 1737 |
| 1738 if (m_loadType == FrameLoadTypeStandard && m_documentLoader->isClientRedirec
t()) | 1738 if (m_loadType == FrameLoadTypeStandard && m_documentLoader->isClientRedirec
t()) |
| 1739 history()->updateForClientRedirect(); | 1739 history()->updateForClientRedirect(); |
| 1740 | 1740 |
| 1741 if (m_loadingFromCachedPage) { | 1741 if (m_loadingFromCachedPage) { |
| 1742 m_frame->document()->documentDidResumeFromPageCache(); | 1742 m_frame->document()->documentDidResumeFromPageCache(); |
| 1743 | 1743 |
| 1744 // Force a layout to update view size and thereby update scrollbars. | 1744 // Force a layout to update view size and thereby update scrollbars. |
| 1745 m_frame->view()->forceLayout(); | 1745 m_frame->view()->forceLayout(); |
| 1746 | 1746 |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2959 return false; | 2959 return false; |
| 2960 default: | 2960 default: |
| 2961 ASSERT_NOT_REACHED(); | 2961 ASSERT_NOT_REACHED(); |
| 2962 return false; | 2962 return false; |
| 2963 } | 2963 } |
| 2964 } | 2964 } |
| 2965 | 2965 |
| 2966 void FrameLoader::loadProvisionalItemFromCachedPage() | 2966 void FrameLoader::loadProvisionalItemFromCachedPage() |
| 2967 { | 2967 { |
| 2968 DocumentLoader* provisionalLoader = provisionalDocumentLoader(); | 2968 DocumentLoader* provisionalLoader = provisionalDocumentLoader(); |
| 2969 LOG(PageCache, "WebCorePageCache: Loading provisional DocumentLoader %p with
URL '%s' from CachedPage", provisionalDocumentLoader(), provisionalDocumentLoad
er()->url().elidedString().utf8().data()); | 2969 LOG_INFO(PageCache, "WebCorePageCache: Loading provisional DocumentLoader %p
with URL '%s' from CachedPage", provisionalDocumentLoader(), provisionalDocumen
tLoader()->url().elidedString().utf8().data()); |
| 2970 | 2970 |
| 2971 prepareForLoadStart(); | 2971 prepareForLoadStart(); |
| 2972 | 2972 |
| 2973 m_loadingFromCachedPage = true; | 2973 m_loadingFromCachedPage = true; |
| 2974 | 2974 |
| 2975 // Should have timing data from previous time(s) the page was shown. | 2975 // Should have timing data from previous time(s) the page was shown. |
| 2976 ASSERT(provisionalLoader->timing()->navigationStart()); | 2976 ASSERT(provisionalLoader->timing()->navigationStart()); |
| 2977 provisionalLoader->resetTiming(); | 2977 provisionalLoader->resetTiming(); |
| 2978 provisionalLoader->timing()->markNavigationStart(); | 2978 provisionalLoader->timing()->markNavigationStart(); |
| 2979 | 2979 |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3419 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); | 3419 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); |
| 3420 | 3420 |
| 3421 page->chrome()->setWindowRect(newWindowRect); | 3421 page->chrome()->setWindowRect(newWindowRect); |
| 3422 page->chrome()->show(); | 3422 page->chrome()->show(); |
| 3423 | 3423 |
| 3424 created = true; | 3424 created = true; |
| 3425 return frame; | 3425 return frame; |
| 3426 } | 3426 } |
| 3427 | 3427 |
| 3428 } // namespace WebCore | 3428 } // namespace WebCore |
| OLD | NEW |