Reviewed by Eric Seidel.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 18:36:58 +0000 (18:36 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 18:36:58 +0000 (18:36 +0000)
commitdeabee3af5a96bc58cc0534b520f896b07ffac86
tree6bc18b149c8bd5bf853240d38046f92bed583058
parent656262cb75af588aa89b432ca0a38da212597ef5
    Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=18681
        <rdar://problem/5888130> WebKit should not remove BOM characters from content.

        We were only trying to match Firefox, and it doesn't do this any more.

        Tests: fast/encoding/bom-in-content.html
               fast/encoding/bom-in-content-utf16.html

        * platform/text/TextDecoder.cpp: (WebCore::TextDecoder::checkForBOM): Skip the BOM if it's
        at the start of input stream.

        * platform/text/TextCodec.cpp:
        * platform/text/TextCodec.h:
        * platform/text/TextCodecICU.cpp:
        (WebCore::TextCodecICU::decode):
        * platform/text/TextCodecUTF16.cpp:
        (WebCore::TextCodecUTF16::decode):
        * platform/text/mac/TextCodecMac.cpp:
        (WebCore::TextCodecMac::decode):
        Don't remove the BOM.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/encoding/bom-in-content-expected.txt [new file with mode: 0644]
LayoutTests/fast/encoding/bom-in-content-utf16-expected.txt [new file with mode: 0644]
LayoutTests/fast/encoding/bom-in-content-utf16.html [new file with mode: 0644]
LayoutTests/fast/encoding/bom-in-content.html [new file with mode: 0644]
LayoutTests/http/tests/incremental/resources/slow-utf8-css.pl [moved from LayoutTests/http/tests/incremental/slow-utf8-css.pl with 63% similarity]
LayoutTests/http/tests/incremental/slow-utf8-css-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/incremental/slow-utf8-css.html [new file with mode: 0644]
LayoutTests/platform/mac/http/tests/incremental/slow-utf8-css-expected.checksum [deleted file]
LayoutTests/platform/mac/http/tests/incremental/slow-utf8-css-expected.png [deleted file]
LayoutTests/platform/mac/http/tests/incremental/slow-utf8-css-expected.txt [deleted file]
WebCore/ChangeLog
WebCore/platform/text/TextCodec.cpp
WebCore/platform/text/TextCodec.h
WebCore/platform/text/TextCodecICU.cpp
WebCore/platform/text/TextCodecUTF16.cpp
WebCore/platform/text/TextDecoder.cpp
WebCore/platform/text/mac/TextCodecMac.cpp