Reviewed by Eric.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Sep 2006 16:59:12 +0000 (16:59 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Sep 2006 16:59:12 +0000 (16:59 +0000)
commitd0c4a483db63c34e12d18399ab0ac358d8cf1507
treeb86fbd7891f1510bc4cf84ff6dca47b575fcda0a
parent607117a29e1c9fdf4d77dbc4f975c2aa3b57987d
    Reviewed by Eric.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=10697
        REGRESSION (r16175): Errors in incremental decoding of UTF-8

        Tests:
        - http/tests/incremental/slow-utf8-html.pl
        - fast/encoding/charset-invalid.html

        * loader/Decoder.cpp:
        (Decoder::Decoder): Ensure that we have a valid encoding. Get its name via TextEncoding, to match
        the logic in setEncodingName().
        (Decoder::setEncodingName): Only set m_encodingName if the encoding is valid. Rely on TextEncoding
        constructor to lowercase it if necessary.
        (Decoder::decode): Use setEncodingName() to apply encoding from BOM. Don't try to ensure the
        validity of encoding - it is enforced by class constructor and setEncodingName().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/encoding/charset-invalid-expected.txt [new file with mode: 0644]
LayoutTests/fast/encoding/charset-invalid.html [new file with mode: 0644]
LayoutTests/http/tests/incremental/slow-utf8-html-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/incremental/slow-utf8-html.pl [new file with mode: 0644]
WebCore/ChangeLog
WebCore/loader/Decoder.cpp