- fix http://bugs.webkit.org/show_bug.cgi?id=16442
navigation policy delegate gets called twice for each load
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy.
That's handled by FrameLoader.
* loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy
and continueAfterNavigationPolicy.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28726
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=16442
+ navigation policy delegate gets called twice for each load
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy.
+ That's handled by FrameLoader.
+
+ * loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy
+ and continueAfterNavigationPolicy.
+
2007-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by Brady.
cancel(interruptionForPolicyChangeError());
}
-void MainResourceLoader::callContinueAfterNavigationPolicy(void* argument, const ResourceRequest& request, PassRefPtr<FormState>, bool shouldContinue)
-{
- static_cast<MainResourceLoader*>(argument)->continueAfterNavigationPolicy(request, shouldContinue);
-}
-
-void MainResourceLoader::continueAfterNavigationPolicy(const ResourceRequest& request, bool shouldContinue)
-{
- if (!shouldContinue)
- stopLoadingForPolicyChange();
- deref(); // balances ref in willSendRequest
-}
-
bool MainResourceLoader::isPostOrRedirectAfterPost(const ResourceRequest& newRequest, const ResourceResponse& redirectResponse)
{
if (newRequest.httpMethod() == "POST")
// Don't set this on the first request. It is set when the main load was started.
m_documentLoader->setRequest(newRequest);
-
- ref(); // balanced by deref in continueAfterNavigationPolicy
- frameLoader()->checkNavigationPolicy(newRequest, callContinueAfterNavigationPolicy, this);
}
static bool shouldLoadAsEmptyDocument(const KURL& url)
/*
- * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void stopLoadingForPolicyChange();
bool isPostOrRedirectAfterPost(const ResourceRequest& newRequest, const ResourceResponse& redirectResponse);
- static void callContinueAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue);
- void continueAfterNavigationPolicy(const ResourceRequest&, bool shouldContinue);
-
static void callContinueAfterContentPolicy(void*, PolicyAction);
void continueAfterContentPolicy(PolicyAction);
void continueAfterContentPolicy(PolicyAction, const ResourceResponse&);