WebCore:
2008-12-10 Brady Eidson <beidson@apple.com>
Reviewed by Darin
https://bugs.webkit.org/show_bug.cgi?id=22194 and <rdar://problem/6388378> -
Dialog when going back to a page from whence you submitted a form
http://trac.webkit.org/changeset/37317 changed the manner in which headers are added to
http requests, which caused the networking layer to have an incomplete set of headers
just before consulting the Policy Delegate. This caused a cache miss and incorrectly made
us believe we'd be resubmitting the form.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadItem): Being careful to maintain the new behavior required by
the Origin header mechanism as discussed in bug 22194, restore the previous behavior of
setting all the headers before the networking layer is asked about the cache lookup.
WebKitTools:
2008-12-10 Brady Eidson <beidson@apple.com>
Reviewed by Darin
Change the custom policy delegate to actually allow navigation for tests that need it.
The new behavior is opt-in and doesn't require any changes in old tests.
* DumpRenderTree/LayoutTestController.cpp:
(setCustomPolicyDelegateCallback): Allow for a second boolean argument to set the permissive flag on the custom
policy delegate, which will be false by default to maintain original behavior.
* DumpRenderTree/LayoutTestController.h:
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::setCustomPolicyDelegate):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::setCustomPolicyDelegate): Partially stubbed out for now.
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::setCustomPolicyDelegate): Still stubbed out, but with new param.
* DumpRenderTree/mac/PolicyDelegate.h:
* DumpRenderTree/mac/PolicyDelegate.mm:
(-[PolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): If the permissive flag
is set, allow the navigation.
(-[PolicyDelegate setPermissive:]): Change the behavior between "use" and "ignore" - allowing navigation or not.
LayoutTests:
2008-12-10 Brady Eidson <beidson@apple.com>
Reviewed by Darin
New layout tests for testing the fix for https://bugs.webkit.org/show_bug.cgi?id=22194:
* http/tests/navigation/post-goback-repost-policy-expected.txt: Added.
* http/tests/navigation/post-goback-repost-policy.html: Added.
* http/tests/navigation/resources/goback-with-policydelegate.html: Added.
* http/tests/navigation/resources/post-target-policy-test.html: Added.
Updated layout test results for the new "custom policy delegate" mechanism:
* fast/encoding/mailto-always-utf-8-expected.txt:
* fast/forms/mailto/advanced-get-expected.txt:
* fast/forms/mailto/advanced-put-expected.txt:
* fast/forms/mailto/get-multiple-items-expected.txt:
* fast/forms/mailto/get-multiple-items-text-plain-expected.txt:
* fast/forms/mailto/get-multiple-items-x-www-form-urlencoded-expected.txt:
* fast/forms/mailto/get-non-ascii-always-utf-8-expected.txt:
* fast/forms/mailto/get-non-ascii-expected.txt:
* fast/forms/mailto/get-non-ascii-text-plain-expected.txt:
* fast/forms/mailto/get-non-ascii-text-plain-latin-1-expected.txt:
* fast/forms/mailto/get-overwrite-query-expected.txt:
* fast/forms/mailto/post-append-query-expected.txt:
* fast/forms/mailto/post-multiple-items-expected.txt:
* fast/forms/mailto/post-multiple-items-multipart-form-data-expected.txt:
* fast/forms/mailto/post-multiple-items-text-plain-expected.txt:
* fast/forms/mailto/post-multiple-items-x-www-form-urlencoded-expected.txt:
* fast/forms/mailto/post-text-plain-expected.txt:
* fast/forms/mailto/post-text-plain-with-accept-charset-expected.txt:
* http/tests/security/feed-urls-from-remote-expected.txt:
Skip the new test on Windows until the policy delegate can be enhanced there:
* platform/win/Skipped:
(It is already implicitly skipped for qt and gtk)
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
35 files changed