- Revision
- 264714
- Author
- mmaxfi...@apple.com
- Date
- 2020-07-22 11:28:32 -0700 (Wed, 22 Jul 2020)
Log Message
REGRESSION(r205826): narrowNoBreakSpace (U+202F) has zero width, regardless of font
https://bugs.webkit.org/show_bug.cgi?id=214626
<rdar://problem/65193790>
Reviewed by Timothy Hatcher.
Source/WebCore:
There's no reason to overwrite narrowNoBreakSpace with zeroWidthSpace.
This is becoming much more prominent now because a lot of the French unit formatting data in CLDR - and hence in e.g. NSMeasurementFormatter - uses 202F between numeric value and unit, e.g. "37 km"
It works in native content on macOS, and in all other browsers on macOS, but not in WebKit.
Test: fast/text/narrowNoBreakSpace.html
* platform/graphics/Font.cpp:
(WebCore::overrideControlCharacters):
LayoutTests:
* fast/text/narrowNoBreakSpace-expected-mismatch.html: Added.
* fast/text/narrowNoBreakSpace.html: Added.
* fast/text/narrow-non-breaking-space-expected-mismatch.html: Renamed from fast/text/narrow-non-breaking-space-expected.html.
* fast/text/narrow-non-breaking-space.html: Made the test more robust.
Modified Paths
Added Paths
Removed Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (264713 => 264714)
--- trunk/LayoutTests/ChangeLog 2020-07-22 18:25:43 UTC (rev 264713)
+++ trunk/LayoutTests/ChangeLog 2020-07-22 18:28:32 UTC (rev 264714)
@@ -1,3 +1,16 @@
+2020-07-22 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ REGRESSION(r205826): narrowNoBreakSpace (U+202F) has zero width, regardless of font
+ https://bugs.webkit.org/show_bug.cgi?id=214626
+ <rdar://problem/65193790>
+
+ Reviewed by Timothy Hatcher.
+
+ * fast/text/narrowNoBreakSpace-expected-mismatch.html: Added.
+ * fast/text/narrowNoBreakSpace.html: Added.
+ * fast/text/narrow-non-breaking-space-expected-mismatch.html: Renamed from fast/text/narrow-non-breaking-space-expected.html.
+ * fast/text/narrow-non-breaking-space.html: Made the test more robust.
+
2020-07-21 Simon Fraser <simon.fra...@apple.com>
Scrolling tesla.com on iPad is not smooth
Added: trunk/LayoutTests/fast/text/narrow-non-breaking-space-expected-mismatch.html (0 => 264714)
--- trunk/LayoutTests/fast/text/narrow-non-breaking-space-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/text/narrow-non-breaking-space-expected-mismatch.html 2020-07-22 18:28:32 UTC (rev 264714)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html style="-webkit-writing-mode: vertical-rl; font: 48px STHeitiTC-Light, 'Heiti TC';">
+<body>
+"؝"
+</body>
+</html>
+
Deleted: trunk/LayoutTests/fast/text/narrow-non-breaking-space-expected.html (264713 => 264714)
--- trunk/LayoutTests/fast/text/narrow-non-breaking-space-expected.html 2020-07-22 18:25:43 UTC (rev 264713)
+++ trunk/LayoutTests/fast/text/narrow-non-breaking-space-expected.html 2020-07-22 18:28:32 UTC (rev 264714)
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<html style="-webkit-writing-mode: vertical-rl; font-family: STHeitiTC-Light, 'Heiti TC';">
-<body>
-This test makes sure that a narrow non-breaking space does not draw as a .notdef character.
-This character is a U+202f narrow non-breaking space: ""
-</body>
-</html>
-
Modified: trunk/LayoutTests/fast/text/narrow-non-breaking-space.html (264713 => 264714)
--- trunk/LayoutTests/fast/text/narrow-non-breaking-space.html 2020-07-22 18:25:43 UTC (rev 264713)
+++ trunk/LayoutTests/fast/text/narrow-non-breaking-space.html 2020-07-22 18:28:32 UTC (rev 264714)
@@ -1,8 +1,7 @@
<!DOCTYPE html>
-<html style="-webkit-writing-mode: vertical-rl; font-family: STHeitiTC-Light, 'Heiti TC';">
+<html style="-webkit-writing-mode: vertical-rl; font: 48px STHeitiTC-Light, 'Heiti TC';">
<body>
-This test makes sure that a narrow non-breaking space does not draw as a .notdef character.
-This character is a U+202f narrow non-breaking space: " "
+" "
</body>
</html>
Added: trunk/LayoutTests/fast/text/narrowNoBreakSpace-expected-mismatch.html (0 => 264714)
--- trunk/LayoutTests/fast/text/narrowNoBreakSpace-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/text/narrowNoBreakSpace-expected-mismatch.html 2020-07-22 18:28:32 UTC (rev 264714)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body style="font: 48px Helvetica;">
+1000
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/narrowNoBreakSpace.html (0 => 264714)
--- trunk/LayoutTests/fast/text/narrowNoBreakSpace.html (rev 0)
+++ trunk/LayoutTests/fast/text/narrowNoBreakSpace.html 2020-07-22 18:28:32 UTC (rev 264714)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body style="font: 48px Helvetica;">
+1 000
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (264713 => 264714)
--- trunk/Source/WebCore/ChangeLog 2020-07-22 18:25:43 UTC (rev 264713)
+++ trunk/Source/WebCore/ChangeLog 2020-07-22 18:28:32 UTC (rev 264714)
@@ -1,3 +1,22 @@
+2020-07-22 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ REGRESSION(r205826): narrowNoBreakSpace (U+202F) has zero width, regardless of font
+ https://bugs.webkit.org/show_bug.cgi?id=214626
+ <rdar://problem/65193790>
+
+ Reviewed by Timothy Hatcher.
+
+ There's no reason to overwrite narrowNoBreakSpace with zeroWidthSpace.
+
+ This is becoming much more prominent now because a lot of the French unit formatting data in CLDR - and hence in e.g. NSMeasurementFormatter - uses 202F between numeric value and unit, e.g. "37 km"
+
+ It works in native content on macOS, and in all other browsers on macOS, but not in WebKit.
+
+ Test: fast/text/narrowNoBreakSpace.html
+
+ * platform/graphics/Font.cpp:
+ (WebCore::overrideControlCharacters):
+
2020-07-22 James Darpinian <jdarpin...@chromium.org>
Fix validation of deleted WebGL objects
Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (264713 => 264714)
--- trunk/Source/WebCore/platform/graphics/Font.cpp 2020-07-22 18:25:43 UTC (rev 264713)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp 2020-07-22 18:28:32 UTC (rev 264714)
@@ -301,7 +301,6 @@
overwriteCodePoint('\n', space);
overwriteCodePoint('\t', space);
overwriteCodePoint(noBreakSpace, space);
- overwriteCodePoint(narrowNoBreakSpace, zeroWidthSpace);
overwriteCodePoint(leftToRightMark, zeroWidthSpace);
overwriteCodePoint(rightToLeftMark, zeroWidthSpace);
overwriteCodePoint(leftToRightEmbed, zeroWidthSpace);