Diff
Modified: trunk/LayoutTests/ChangeLog (247673 => 247674)
--- trunk/LayoutTests/ChangeLog 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/LayoutTests/ChangeLog 2019-07-21 17:23:54 UTC (rev 247674)
@@ -1,3 +1,20 @@
+2019-07-21 Myles C. Maxfield <[email protected]>
+
+ [iOS] Fast and complex text codepaths disagree about how to lay out bopomofo with tone marks
+ https://bugs.webkit.org/show_bug.cgi?id=199912
+ <rdar://problem/52182454>
+
+ Reviewed by Simon Fraser.
+
+ * css3/font-feature-font-face-local-expected.html:
+ * css3/font-feature-font-face-local.html:
+ * editing/mac/selection/word-thai-expected.txt:
+ * editing/mac/selection/word-thai.html:
+ * fast/text/international/system-language/composition-expected.txt: Added.
+ * fast/text/international/system-language/composition.html: Added.
+ * platform/ios/fast/text/crash-complex-text-surrogate-expected.txt:
+ * svg/custom/glyph-selection-arabic-forms-expected.txt:
+
2019-07-20 Andres Gonzalez <[email protected]>
Add accessibilityInsertText for text insertion in edit fields.
Modified: trunk/LayoutTests/css3/font-feature-font-face-local-expected.html (247673 => 247674)
--- trunk/LayoutTests/css3/font-feature-font-face-local-expected.html 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/LayoutTests/css3/font-feature-font-face-local-expected.html 2019-07-21 17:23:54 UTC (rev 247674)
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
+<meta charset="utf-8">
<style>
@font-face {
font-family: HigaginoSans-fixed;
@@ -19,4 +20,4 @@
WWWWWW</span>
あいう</pre>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/LayoutTests/css3/font-feature-font-face-local.html (247673 => 247674)
--- trunk/LayoutTests/css3/font-feature-font-face-local.html 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/LayoutTests/css3/font-feature-font-face-local.html 2019-07-21 17:23:54 UTC (rev 247674)
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
+<meta charset="utf-8">
<style>
@font-face {
font-family: HigaginoSans-fixed;
@@ -19,4 +20,4 @@
WWWWWW
あいう</pre>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/LayoutTests/editing/mac/selection/word-thai-expected.txt (247673 => 247674)
--- trunk/LayoutTests/editing/mac/selection/word-thai-expected.txt 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/LayoutTests/editing/mac/selection/word-thai-expected.txt 2019-07-21 17:23:54 UTC (rev 247674)
@@ -1,4 +1,5 @@
-Double-clicking anywhere on this word: เพชรบุรี should select it in its entirety.
-
+Double-clicking anywhere on this word:
+เพชรบุรี
+should select it in its entirety.
PASS
Modified: trunk/LayoutTests/editing/mac/selection/word-thai.html
(Binary files differ)
Added: trunk/LayoutTests/fast/text/international/system-language/composition-expected.txt (0 => 247674)
--- trunk/LayoutTests/fast/text/international/system-language/composition-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/international/system-language/composition-expected.txt 2019-07-21 17:23:54 UTC (rev 247674)
@@ -0,0 +1,6 @@
+PASS target1.offsetWidth is target2.offsetWidth
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ㄔˉㄔˉㄔˉㄔˉㄔˉㄔˉ
+ㄔˉㄔˉㄔˉㄔˉㄔˉㄔˉ
Added: trunk/LayoutTests/fast/text/international/system-language/composition.html (0 => 247674)
--- trunk/LayoutTests/fast/text/international/system-language/composition.html (rev 0)
+++ trunk/LayoutTests/fast/text/international/system-language/composition.html 2019-07-21 17:23:54 UTC (rev 247674)
@@ -0,0 +1,16 @@
+<!DOCTYPE html><!-- webkit-test-runner [ language=zh-Hans ] -->
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<div style="font: 48px system-ui;"><span id="target1">ㄔˉㄔˉㄔˉㄔˉㄔˉㄔˉ</span></div>
+<div style="font: 48px system-ui; font-feature-settings: 'abcd';"><span id="target2">ㄔˉㄔˉㄔˉㄔˉㄔˉㄔˉ</span></div>
+<script>
+const target1 = document.getElementById("target1");
+const target2 = document.getElementById("target2");
+shouldBe("target1.offsetWidth", "target2.offsetWidth");
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios/fast/text/crash-complex-text-surrogate-expected.txt (247673 => 247674)
--- trunk/LayoutTests/platform/ios/fast/text/crash-complex-text-surrogate-expected.txt 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/LayoutTests/platform/ios/fast/text/crash-complex-text-surrogate-expected.txt 2019-07-21 17:23:54 UTC (rev 247674)
@@ -35,10 +35,10 @@
RenderBR {BR} at (0,0) size 0x0
RenderInline {ACRONYM} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
- RenderText {#text} at (0,406) size 118x46
+ RenderText {#text} at (0,406) size 137x46
text run at (0,406) width 45: "s is:"
text run at (0,420) width 27: "{,}"
- text run at (0,438) width 118: "\x{A888}{0}P{P}\\7H\\8"
+ text run at (0,438) width 137: "\x{A888}{0}P{P}\\7H\\8"
RenderBR {BR} at (0,0) size 0x0
RenderText {#text} at (0,452) size 71x14
text run at (0,452) width 71: "f is: gi"
Modified: trunk/LayoutTests/platform/ios/legacy-animation-engine/fast/text/crash-complex-text-surrogate-expected.txt (247673 => 247674)
--- trunk/LayoutTests/platform/ios/legacy-animation-engine/fast/text/crash-complex-text-surrogate-expected.txt 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/LayoutTests/platform/ios/legacy-animation-engine/fast/text/crash-complex-text-surrogate-expected.txt 2019-07-21 17:23:54 UTC (rev 247674)
@@ -35,10 +35,10 @@
RenderBR {BR} at (0,0) size 0x0
RenderInline {ACRONYM} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
- RenderText {#text} at (0,406) size 118x46
+ RenderText {#text} at (0,406) size 137x46
text run at (0,406) width 45: "s is:"
text run at (0,420) width 27: "{,}"
- text run at (0,438) width 118: "\x{A888}{0}P{P}\\7H\\8"
+ text run at (0,438) width 137: "\x{A888}{0}P{P}\\7H\\8"
RenderBR {BR} at (0,0) size 0x0
RenderText {#text} at (0,452) size 71x14
text run at (0,452) width 71: "f is: gi"
Modified: trunk/LayoutTests/svg/custom/glyph-selection-arabic-forms-expected.txt (247673 => 247674)
--- trunk/LayoutTests/svg/custom/glyph-selection-arabic-forms-expected.txt 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/LayoutTests/svg/custom/glyph-selection-arabic-forms-expected.txt 2019-07-21 17:23:54 UTC (rev 247674)
@@ -1,10 +1,10 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 400x50
- RenderSVGRoot {svg} at (10,7) size 348x18
+ RenderSVGRoot {svg} at (10,7) size 366x18
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
- RenderSVGContainer {g} at (10,7) size 348x18
- RenderSVGText {text} at (10,7) size 348x18 contains 1 chunk(s)
- RenderSVGInlineText {#text} at (0,0) size 348x18
- chunk 1 text run 1 at (10.00,20.00) startOffset 0 endOffset 56 width 340.79 RTL: "\x{62E}] [\x{62E}][\x{62E}][\x{62E}] | [\x{62E}] [\x{62E}\x{62E}][\x{62E}] | [\x{62E}] [\x{62E}\x{62E}\x{62E}] | [\x{62E} \x{62E}\x{62E}\x{62E}] | \x{62E} \x{62E}\x{62E}\x{62E}"
- chunk 1 text run 1 at (350.79,20.00) startOffset 0 endOffset 1 width 6.88: "]"
+ RenderSVGContainer {g} at (10,7) size 366x18
+ RenderSVGText {text} at (10,7) size 366x18 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,0) size 366x18
+ chunk 1 text run 1 at (10.00,20.00) startOffset 0 endOffset 56 width 358.79 RTL: "\x{62E}] [\x{62E}][\x{62E}][\x{62E}] | [\x{62E}] [\x{62E}\x{62E}][\x{62E}] | [\x{62E}] [\x{62E}\x{62E}\x{62E}] | [\x{62E} \x{62E}\x{62E}\x{62E}] | \x{62E} \x{62E}\x{62E}\x{62E}"
+ chunk 1 text run 1 at (368.79,20.00) startOffset 0 endOffset 1 width 6.88: "]"
Modified: trunk/Source/WebCore/ChangeLog (247673 => 247674)
--- trunk/Source/WebCore/ChangeLog 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/Source/WebCore/ChangeLog 2019-07-21 17:23:54 UTC (rev 247674)
@@ -1,3 +1,20 @@
+2019-07-21 Myles C. Maxfield <[email protected]>
+
+ [iOS] Fast and complex text codepaths disagree about how to lay out bopomofo with tone marks
+ https://bugs.webkit.org/show_bug.cgi?id=199912
+ <rdar://problem/52182454>
+
+ Reviewed by Simon Fraser.
+
+ This is because CoreText has special composition rules for CJK languages, which we don't have in our simple
+ text codepath. Rather than implementing the composition rules in WebKit, we can simply disable them in
+ CoreText.
+
+ Test: fast/text/international/system-language/composition.html
+
+ * platform/graphics/mac/SimpleFontDataCoreText.cpp:
+ (WebCore::Font::getCFStringAttributes const):
+
2019-07-20 Andres Gonzalez <[email protected]>
Add accessibilityInsertText for text insertion in edit fields.
Modified: trunk/Source/WebCore/PAL/ChangeLog (247673 => 247674)
--- trunk/Source/WebCore/PAL/ChangeLog 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/Source/WebCore/PAL/ChangeLog 2019-07-21 17:23:54 UTC (rev 247674)
@@ -1,3 +1,13 @@
+2019-07-21 Myles C. Maxfield <[email protected]>
+
+ [iOS] Fast and complex text codepaths disagree about how to lay out bopomofo with tone marks
+ https://bugs.webkit.org/show_bug.cgi?id=199912
+ <rdar://problem/52182454>
+
+ Reviewed by Simon Fraser.
+
+ * pal/spi/cocoa/CoreTextSPI.h:
+
2019-07-17 Antoine Quint <[email protected]>
Disable Pointer Events prior to watchOS 6
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/CoreTextSPI.h (247673 => 247674)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/CoreTextSPI.h 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/CoreTextSPI.h 2019-07-21 17:23:54 UTC (rev 247674)
@@ -62,6 +62,15 @@
kCTFontFallbackOptionDefault = kCTFontFallbackOptionSystem | kCTFontFallbackOptionUserInstalled,
};
+typedef CF_ENUM(uint8_t, CTCompositionLanguage)
+{
+ kCTCompositionLanguageUnset,
+ kCTCompositionLanguageNone,
+ kCTCompositionLanguageJapanese,
+ kCTCompositionLanguageSimplifiedChinese,
+ kCTCompositionLanguageTraditionalChinese,
+};
+
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED == 120000)
extern const CFStringRef kCTTypesetterOptionAllowUnboundedLayout;
#endif
@@ -106,6 +115,8 @@
CFArrayRef CTFontManagerCreateFontDescriptorsFromData(CFDataRef);
+void CTParagraphStyleSetCompositionLanguage(CTParagraphStyleRef, CTCompositionLanguage);
+
extern const CFStringRef kCTFontCSSWeightAttribute;
extern const CFStringRef kCTFontCSSWidthAttribute;
extern const CFStringRef kCTFontDescriptorTextStyleAttribute;
Modified: trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp (247673 => 247674)
--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp 2019-07-21 03:53:31 UTC (rev 247673)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp 2019-07-21 17:23:54 UTC (rev 247674)
@@ -41,6 +41,9 @@
attributesDictionary = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 4, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
CFDictionarySetValue(attributesDictionary.get(), kCTFontAttributeName, platformData().ctFont());
+ auto paragraphStyle = adoptCF(CTParagraphStyleCreate(nullptr, 0));
+ CTParagraphStyleSetCompositionLanguage(paragraphStyle.get(), kCTCompositionLanguageNone);
+ CFDictionarySetValue(attributesDictionary.get(), kCTParagraphStyleAttributeName, paragraphStyle.get());
if (!enableKerning) {
const float zero = 0;