summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 16:15:42 +0100
committerBen Murdoch <benm@google.com>2011-06-02 10:37:19 +0100
commitd591474a98e82c78f1c85464d9c77b67cfa7d059 (patch)
tree71cb9b26450f4a64671b1dcfbea500e360bf8b34 /Source/WebKit/android
parentd937470c29d31833299da3bb47599e43db82852b (diff)
downloadexternal_webkit-d591474a98e82c78f1c85464d9c77b67cfa7d059.zip
external_webkit-d591474a98e82c78f1c85464d9c77b67cfa7d059.tar.gz
external_webkit-d591474a98e82c78f1c85464d9c77b67cfa7d059.tar.bz2
Merge WebKit at r80534: Fix FrameLoaderClientAndroid.
Add new shouldStopLoadingForHistoryItem() stub. See http://trac.webkit.org/changeset/79107 Rename FrameLoaderClient::decidePolicyForMIMEType to decidePolicyForResponse. See http://trac.webkit.org/changeset/80475 Change-Id: If094cc923b5d3b56c25a79847961bb11790f50d1
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r--Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp12
-rw-r--r--Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h3
2 files changed, 10 insertions, 5 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index e94b35c..af54fee 100644
--- a/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -467,8 +467,8 @@ static bool TreatAsAttachment(const String& content_disposition) {
return true;
}
-void FrameLoaderClientAndroid::dispatchDecidePolicyForMIMEType(FramePolicyFunction func,
- const String& MIMEType, const ResourceRequest& request) {
+void FrameLoaderClientAndroid::dispatchDecidePolicyForResponse(FramePolicyFunction func,
+ const ResourceResponse& response, const ResourceRequest& request) {
ASSERT(m_frame);
ASSERT(func);
if (!func)
@@ -483,7 +483,6 @@ void FrameLoaderClientAndroid::dispatchDecidePolicyForMIMEType(FramePolicyFuncti
// Default to Use (display internally).
PolicyAction action = PolicyUse;
// Check if we should Download instead.
- const ResourceResponse& response = m_frame->loader()->activeDocumentLoader()->response();
const String& content_disposition = response.httpHeaderField("Content-Disposition");
if (!content_disposition.isEmpty() &&
TreatAsAttachment(content_disposition)) {
@@ -498,7 +497,7 @@ void FrameLoaderClientAndroid::dispatchDecidePolicyForMIMEType(FramePolicyFuncti
}
// Ask if it can be handled internally.
- if (!canShowMIMEType(MIMEType)) {
+ if (!canShowMIMEType(response.mimeType())) {
// Check to see if we are a sub frame (main frame has no owner element)
if (m_frame->ownerElement() != 0)
action = PolicyIgnore;
@@ -701,6 +700,11 @@ bool FrameLoaderClientAndroid::shouldGoToHistoryItem(HistoryItem* item) const {
return item != NULL;
}
+bool FrameLoaderClientAndroid::shouldStopLoadingForHistoryItem(HistoryItem* item) const
+{
+ return true;
+}
+
void FrameLoaderClientAndroid::didDisplayInsecureContent()
{
notImplemented();
diff --git a/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h b/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
index 046fc73..9615041 100644
--- a/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
+++ b/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
@@ -100,7 +100,7 @@ namespace android {
virtual Frame* dispatchCreatePage(const NavigationAction&);
virtual void dispatchShow();
- virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String& MIMEType, const ResourceRequest&);
+ virtual void dispatchDecidePolicyForResponse(FramePolicyFunction, const ResourceResponse&, const ResourceRequest&);
virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName);
virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>);
virtual void cancelPolicyCheck();
@@ -133,6 +133,7 @@ namespace android {
virtual void updateGlobalHistoryRedirectLinks();
virtual bool shouldGoToHistoryItem(HistoryItem*) const;
+ virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const;
virtual void didDisplayInsecureContent();
virtual void didRunInsecureContent(SecurityOrigin*, const KURL&);