REGRESSION: Downloaded file name fallback encodings are not set correctly
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 06:43:26 +0000 (06:43 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 06:43:26 +0000 (06:43 +0000)
commit582671967b32af165e681ded1e29dde25e791c00
tree58024119f1abaa36d212f0b9a0c459313ef4172b
parenta625ad3ab64e52062de1a98c40d7e98a74bba330
REGRESSION: Downloaded file name fallback encodings are not set correctly
https://bugs.webkit.org/show_bug.cgi?id=76862

Reviewed by Adam Barth.

Source/WebCore:

Tests: http/tests/download/default-encoding.html
       http/tests/download/form-submission-result.html
       http/tests/download/inherited-encoding.html
       http/tests/download/literal-utf-8.html

* loader/DocumentWriter.cpp:
* loader/DocumentWriter.h:
Removed deprecatedFrameEncoding. Due to changes in Document::encoding behavior, it can now
be used in its place.

* loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): Instead of hunting
down a correct loader (and active one is not always correct any more), just use opening document's
encoding.

LayoutTests:

* http/tests/download/default-encoding-expected.txt: Added.
* http/tests/download/default-encoding.html: Added.
* http/tests/download/inherited-encoding-expected.txt: Added.
* http/tests/download/inherited-encoding.html: Added.
* http/tests/download/literal-utf-8-expected.txt: Added.
* http/tests/download/literal-utf-8.html: Added.
* http/tests/download/resources/literal-koi8-r.php: Added.
* http/tests/download/resources/literal-utf-8.php: Added.
* http/tests/download/inherited-encoding-form-submission-result-expected.txt: Added.
* http/tests/download/inherited-encoding-form-submission-result.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/download/default-encoding-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/download/default-encoding.html [new file with mode: 0644]
LayoutTests/http/tests/download/inherited-encoding-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/download/inherited-encoding-form-submission-result-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/download/inherited-encoding-form-submission-result.html [new file with mode: 0644]
LayoutTests/http/tests/download/inherited-encoding.html [new file with mode: 0644]
LayoutTests/http/tests/download/literal-utf-8-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/download/literal-utf-8.html [new file with mode: 0644]
LayoutTests/http/tests/download/resources/basic-ascii.php [changed mode: 0755->0644]
LayoutTests/http/tests/download/resources/literal-koi8-r.php [new file with mode: 0644]
LayoutTests/http/tests/download/resources/literal-utf-8.php [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentWriter.cpp
Source/WebCore/loader/DocumentWriter.h
Source/WebCore/loader/FrameLoader.cpp
Tools/DumpRenderTree/mac/DumpRenderTree.mm