Diff
Modified: trunk/LayoutTests/ChangeLog (224635 => 224636)
--- trunk/LayoutTests/ChangeLog 2017-11-09 18:33:34 UTC (rev 224635)
+++ trunk/LayoutTests/ChangeLog 2017-11-09 18:37:09 UTC (rev 224636)
@@ -1,3 +1,17 @@
+2017-11-09 Maciej Stachowiak <m...@apple.com>
+
+ Remove support for iOS-only softbank-sjis encoding if possible
+ https://bugs.webkit.org/show_bug.cgi?id=179416
+
+ Reviewed by Darin Adler.
+
+ * fast/encoding/charset-softbank-sjis.html: Added. Test that <meta charset>
+ declaration for softbank-sjis is ignored.
+ * fast/encoding/charset-softbank-sjis-expected.txt: Added.
+ * fast/encoding/resources/softbank-sjis-iframe.html: Added. Helper for above test.
+ * fast/encoding/legacy-ios-encodings.html: Add a case for softbank-sjis.
+ * fast/encoding/legacy-ios-encodings-expected.txt: Result for above.
+
2017-11-09 Carlos Alberto Lopez Perez <clo...@igalia.com>
[GTK] Gardening 09 nov
Added: trunk/LayoutTests/fast/encoding/charset-softbank-sjis-expected.txt (0 => 224636)
--- trunk/LayoutTests/fast/encoding/charset-softbank-sjis-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/encoding/charset-softbank-sjis-expected.txt 2017-11-09 18:37:09 UTC (rev 224636)
@@ -0,0 +1,6 @@
+PASS document.characterSet is 'UTF-8'
+PASS 'é' is 'é'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/encoding/charset-softbank-sjis.html (0 => 224636)
--- trunk/LayoutTests/fast/encoding/charset-softbank-sjis.html (rev 0)
+++ trunk/LayoutTests/fast/encoding/charset-softbank-sjis.html 2017-11-09 18:37:09 UTC (rev 224636)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<script src=""
+</head>
+<body>
+<div id=contents>
+</div>
+<iframe id=frame src=""
+</iframe>
+</body>
+</html>
Modified: trunk/LayoutTests/fast/encoding/legacy-ios-encodings-expected.txt (224635 => 224636)
--- trunk/LayoutTests/fast/encoding/legacy-ios-encodings-expected.txt 2017-11-09 18:33:34 UTC (rev 224635)
+++ trunk/LayoutTests/fast/encoding/legacy-ios-encodings-expected.txt 2017-11-09 18:37:09 UTC (rev 224636)
@@ -9,6 +9,7 @@
PASS new TextDecoder("macos-35-10.2").encoding threw exception RangeError: Bad value.
PASS new TextDecoder("macos-29-10.2").encoding threw exception RangeError: Bad value.
PASS new TextDecoder("macos-7_3-10.2").encoding threw exception RangeError: Bad value.
+PASS new TextDecoder("softbank-sjis").encoding threw exception RangeError: Bad value.
The following encoding names are supported by WebKit cross-platform, but some may be removed at a later time.
PASS new TextDecoder("x-mac-greek").encoding is "x-mac-greek"
PASS new TextDecoder("windows-10006").encoding is "x-mac-greek"
Modified: trunk/LayoutTests/fast/encoding/legacy-ios-encodings.html (224635 => 224636)
--- trunk/LayoutTests/fast/encoding/legacy-ios-encodings.html 2017-11-09 18:33:34 UTC (rev 224635)
+++ trunk/LayoutTests/fast/encoding/legacy-ios-encodings.html 2017-11-09 18:37:09 UTC (rev 224636)
@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
-<script src=""
+<script src=""
</head>
<body>
<script>
@@ -9,7 +9,7 @@
description("This test verifies that certain legacy iOS text encodings are not supported.");
debug("The following encodings should not be supported");
-let iosLegacyEncodings = ['macos-6-10.2','macos-6_2-10.4', 'macos-35-10.2', 'macos-29-10.2', 'macos-7_3-10.2'];
+let iosLegacyEncodings = ['macos-6-10.2','macos-6_2-10.4', 'macos-35-10.2', 'macos-29-10.2', 'macos-7_3-10.2', 'softbank-sjis'];
for (let encoding of iosLegacyEncodings) {
let canonical_name_expr = 'new TextDecoder("' + encoding + '").encoding';
@@ -33,8 +33,6 @@
}
}
-
</script>
-<script src=""
</body>
</html>
Added: trunk/LayoutTests/fast/encoding/resources/softbank-sjis-iframe.html (0 => 224636)
--- trunk/LayoutTests/fast/encoding/resources/softbank-sjis-iframe.html (rev 0)
+++ trunk/LayoutTests/fast/encoding/resources/softbank-sjis-iframe.html 2017-11-09 18:37:09 UTC (rev 224636)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=softbank-sjis>
+</head>
+<body>
+<script>
+parent.shouldBe("document.characterSet", "'UTF-8'");
+parent.shouldBe("'\xe9'", "'é'");
+</script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (224635 => 224636)
--- trunk/Source/WebCore/ChangeLog 2017-11-09 18:33:34 UTC (rev 224635)
+++ trunk/Source/WebCore/ChangeLog 2017-11-09 18:37:09 UTC (rev 224636)
@@ -1,3 +1,15 @@
+2017-11-09 Maciej Stachowiak <m...@apple.com>
+
+ Remove support for iOS-only softbank-sjis encoding if possible
+ https://bugs.webkit.org/show_bug.cgi?id=179416
+
+ Reviewed by Darin Adler.
+
+ * platform/text/TextCodecICU.cpp:
+ (WebCore::TextCodecICU::registerEncodingNames): Remove support for softbank-sjis
+ codec, because by code inspection it couldn't have possibly worked.
+ (WebCore::TextCodecICU::registerCodecs): Ditto.
+
2017-11-09 Christopher Reid <chris.r...@sony.com>
Use enum classes within FileSystem
Modified: trunk/Source/WebCore/platform/text/TextCodecICU.cpp (224635 => 224636)
--- trunk/Source/WebCore/platform/text/TextCodecICU.cpp 2017-11-09 18:33:34 UTC (rev 224635)
+++ trunk/Source/WebCore/platform/text/TextCodecICU.cpp 2017-11-09 18:37:09 UTC (rev 224636)
@@ -168,11 +168,6 @@
for (size_t i = 0; i < encodingName.aliasCount; ++i)
registrar(encodingName.aliases[i], encodingName.name);
}
-
-#if PLATFORM(IOS)
- // FIXME: This may not be needed any more. <https://bugs.webkit.org/show_bug.cgi?id=179416>
- registrar("softbank-sjis", "softbank-sjis");
-#endif
}
void TextCodecICU::registerCodecs(TextCodecRegistrar registrar)
@@ -214,11 +209,6 @@
ASSERT(U_SUCCESS(error));
registrar(encodingName.name, create, canonicalConverterName);
}
-
-#if PLATFORM(IOS)
- // FIXME: This may not be needed any more. <https://bugs.webkit.org/show_bug.cgi?id=179416>
- registrar("softbank-sjis", create, 0);
-#endif
}
TextCodecICU::TextCodecICU(const char* encoding, const char* canonicalConverterName)