Remove TEC decoders that duplicate ICU decoders
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2017 19:26:25 +0000 (19:26 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2017 19:26:25 +0000 (19:26 +0000)
commit66c711da218198ea00a243f3c80729ca2eecdfad
tree0f04309568624f4e05d56d7151b392cd1e2a61e2
parent0faac86e1176d26525fe7c2bc2c653a9ced13f16
Remove TEC decoders that duplicate ICU decoders
https://bugs.webkit.org/show_bug.cgi?id=179460

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/encoding/duplicate-tec-encodings.html

* platform/text/TextEncodingRegistry.cpp:
(WebCore::checkExistingName): Deleted.
(WebCore::addToTextEncodingNameMap): Move the check from checkExistingName here,
and make it an ASSERT, since we should now be guaranteed no duplicate encodings.
* platform/text/mac/mac-encodings.txt: Remove encodings that duplicate ones we
implement with ICU.
* platform/text/TextCodecICU.cpp: Add some extra encoding aliases that only TEC
knew about.

LayoutTests:

* fast/encoding/duplicate-tec-encodings-expected.txt: Added.
* fast/encoding/duplicate-tec-encodings.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/encoding/duplicate-tec-encodings-expected.txt [new file with mode: 0644]
LayoutTests/fast/encoding/duplicate-tec-encodings.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/text/TextCodecICU.cpp
Source/WebCore/platform/text/TextEncodingRegistry.cpp
Source/WebCore/platform/text/mac/mac-encodings.txt