diff options
author | Ben Murdoch <benm@google.com> | 2011-05-16 16:25:10 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-23 18:54:14 +0100 |
commit | ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch) | |
tree | db769fadd053248f85db67434a5b275224defef7 /Source/WebCore/loader/FrameLoader.cpp | |
parent | 52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff) | |
download | external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2 |
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebCore/loader/FrameLoader.cpp')
-rw-r--r-- | Source/WebCore/loader/FrameLoader.cpp | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp index 9c6257b..3a19791 100644 --- a/Source/WebCore/loader/FrameLoader.cpp +++ b/Source/WebCore/loader/FrameLoader.cpp @@ -101,10 +101,6 @@ #include <wtf/text/CString.h> #include <wtf/text/StringConcatenate.h> -#if ENABLE(PLUGIN_PROXY_FOR_VIDEO) -#include "HTMLMediaElement.h" -#endif - #if ENABLE(SHARED_WORKERS) #include "SharedWorkerRepository.h" #endif @@ -1003,6 +999,18 @@ ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const S return WebCore::ObjectContentNone; } +#if ENABLE(PLUGIN_PROXY_FOR_VIDEO) +void FrameLoader::hideMediaPlayerProxyPlugin(Widget* widget) +{ + m_client->hideMediaPlayerProxyPlugin(widget); +} + +void FrameLoader::showMediaPlayerProxyPlugin(Widget* widget) +{ + m_client->showMediaPlayerProxyPlugin(widget); +} +#endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO) + String FrameLoader::outgoingReferrer() const { return m_outgoingReferrer; @@ -1692,13 +1700,13 @@ bool FrameLoader::shouldAllowNavigation(Frame* targetFrame) const return false; } -void FrameLoader::stopLoadingSubframes() +void FrameLoader::stopLoadingSubframes(DatabasePolicy databasePolicy, ClearProvisionalItemPolicy clearProvisionalItemPolicy) { for (RefPtr<Frame> child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) - child->loader()->stopAllLoaders(); + child->loader()->stopAllLoaders(databasePolicy, clearProvisionalItemPolicy); } -void FrameLoader::stopAllLoaders(DatabasePolicy databasePolicy) +void FrameLoader::stopAllLoaders(DatabasePolicy databasePolicy, ClearProvisionalItemPolicy clearProvisionalItemPolicy) { ASSERT(!m_frame->document() || !m_frame->document()->inPageCache()); if (m_pageDismissalEventBeingDispatched) @@ -1712,7 +1720,12 @@ void FrameLoader::stopAllLoaders(DatabasePolicy databasePolicy) policyChecker()->stopCheck(); - stopLoadingSubframes(); + // If no new load is in progress, we should clear the provisional item from history + // before we call stopLoading. + if (clearProvisionalItemPolicy == ShouldClearProvisionalItem) + history()->setProvisionalItem(0); + + stopLoadingSubframes(databasePolicy, clearProvisionalItemPolicy); if (m_provisionalDocumentLoader) m_provisionalDocumentLoader->stopLoading(databasePolicy); if (m_documentLoader) @@ -2370,7 +2383,8 @@ void FrameLoader::checkLoadCompleteForThisFrame() // Reset the back forward list to the last committed history item at the top level. item = page->mainFrame()->loader()->history()->currentItem(); - bool shouldReset = true; + // Only reset if we aren't already going to a new provisional item. + bool shouldReset = !history()->provisionalItem(); if (!(pdl->isLoadingInAPISense() && !pdl->isStopping())) { m_delegateIsHandlingProvisionalLoadError = true; m_client->dispatchDidFailProvisionalLoad(error); @@ -2379,7 +2393,7 @@ void FrameLoader::checkLoadCompleteForThisFrame() // FIXME: can stopping loading here possibly have any effect, if isLoading is false, // which it must be to be in this branch of the if? And is it OK to just do a full-on // stopAllLoaders instead of stopLoadingSubframes? - stopLoadingSubframes(); + stopLoadingSubframes(DatabasePolicyStop, ShouldNotClearProvisionalItem); pdl->stopLoading(); // If we're in the middle of loading multipart data, we need to restore the document loader. @@ -2987,7 +3001,8 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, Pass } FrameLoadType type = policyChecker()->loadType(); - stopAllLoaders(); + // A new navigation is in progress, so don't clear the history's provisional item. + stopAllLoaders(DatabasePolicyStop, ShouldNotClearProvisionalItem); // <rdar://problem/6250856> - In certain circumstances on pages with multiple frames, stopAllLoaders() // might detach the current FrameLoader, in which case we should bail on this newly defunct load. |