WebCore:
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2008 18:37:32 +0000 (18:37 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2008 18:37:32 +0000 (18:37 +0000)
commit6e7a7e6eb0c7df2dff77b94dc0364b6362b56aa8
treece3a0bd7b41d610ebb1d919716bc09bd63032655
parentd5a1cf25b8ef614e540e3a6c1cbaceb22cf3b807
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: https://svn.webkit.org/repository/webkit/trunk@39178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
35 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/encoding/mailto-always-utf-8-expected.txt
LayoutTests/fast/forms/mailto/advanced-get-expected.txt
LayoutTests/fast/forms/mailto/advanced-put-expected.txt
LayoutTests/fast/forms/mailto/get-multiple-items-expected.txt
LayoutTests/fast/forms/mailto/get-multiple-items-text-plain-expected.txt
LayoutTests/fast/forms/mailto/get-multiple-items-x-www-form-urlencoded-expected.txt
LayoutTests/fast/forms/mailto/get-non-ascii-always-utf-8-expected.txt
LayoutTests/fast/forms/mailto/get-non-ascii-expected.txt
LayoutTests/fast/forms/mailto/get-non-ascii-text-plain-expected.txt
LayoutTests/fast/forms/mailto/get-non-ascii-text-plain-latin-1-expected.txt
LayoutTests/fast/forms/mailto/get-overwrite-query-expected.txt
LayoutTests/fast/forms/mailto/post-append-query-expected.txt
LayoutTests/fast/forms/mailto/post-multiple-items-expected.txt
LayoutTests/fast/forms/mailto/post-multiple-items-multipart-form-data-expected.txt
LayoutTests/fast/forms/mailto/post-multiple-items-text-plain-expected.txt
LayoutTests/fast/forms/mailto/post-multiple-items-x-www-form-urlencoded-expected.txt
LayoutTests/fast/forms/mailto/post-text-plain-expected.txt
LayoutTests/fast/forms/mailto/post-text-plain-with-accept-charset-expected.txt
LayoutTests/http/tests/navigation/post-goback-repost-policy-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/post-goback-repost-policy.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/goback-with-policydelegate.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/post-target-policy-test.html [new file with mode: 0644]
LayoutTests/http/tests/security/feed-urls-from-remote-expected.txt
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/loader/FrameLoader.cpp
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/LayoutTestController.cpp
WebKitTools/DumpRenderTree/LayoutTestController.h
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
WebKitTools/DumpRenderTree/mac/PolicyDelegate.h
WebKitTools/DumpRenderTree/mac/PolicyDelegate.mm
WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp