summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-12-16 11:46:22 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-16 11:46:22 -0800
commit6fc858d42732739e4a3b628b4953a8a279e8dc3d (patch)
treeb1e25ab47f94b78dcf3491705c7e160c20ed27ca
parent45caa82c86fc13574e7a4c476b92c593e999ebac (diff)
parenteae4493cc3434169fc14b44b851dac62db492aa5 (diff)
downloadexternal_webkit-6fc858d42732739e4a3b628b4953a8a279e8dc3d.zip
external_webkit-6fc858d42732739e4a3b628b4953a8a279e8dc3d.tar.gz
external_webkit-6fc858d42732739e4a3b628b4953a8a279e8dc3d.tar.bz2
Merge "Pass redirects through canHandleRequest."
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp3
-rw-r--r--WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index 4053e56..c56348c 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -567,9 +567,8 @@ void FrameLoaderClientAndroid::dispatchDecidePolicyForNavigationAction(FramePoli
if (action.type() == NavigationTypeFormResubmitted) {
m_webFrame->decidePolicyForFormResubmission(func);
return;
- } else {
+ } else
(m_frame->loader()->policyChecker()->*func)(PolicyUse);
- }
}
void FrameLoaderClientAndroid::dispatchWillSubmitForm(FramePolicyFunction func, PassRefPtr<FormState>) {
diff --git a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
index 0d7981a..7bba3c2 100644
--- a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
+++ b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
@@ -33,6 +33,7 @@
#include "ResourceHandle.h"
#include "ResourceHandleClient.h"
#include "ResourceResponse.h"
+#include "UserGestureIndicator.h"
#include "WebCoreFrameBridge.h"
#include "WebRequest.h"
#include "WebResourceRequest.h"
@@ -331,6 +332,11 @@ void WebUrlLoaderClient::willSendRequest(PassOwnPtr<WebResponse> webResponse)
if (!isActive())
return;
+ // FIXME: This implies that the original request was from a user gesture.
+ // For now, this is probably ok as this is just here to get the auto-login
+ // demo working. b/3291580.
+ WebCore::UserGestureIndicator gesture(WebCore::DefinitelyProcessingUserGesture);
+
KURL url = webResponse->createKurl();
OwnPtr<WebCore::ResourceRequest> resourceRequest(new WebCore::ResourceRequest(url));
m_resourceHandle->client()->willSendRequest(m_resourceHandle.get(), *resourceRequest, webResponse->createResourceResponse());