Title: [124124] branches/safari-536.26-branch
- Revision
- 124124
- Author
- [email protected]
- Date
- 2012-07-30 17:35:57 -0700 (Mon, 30 Jul 2012)
Log Message
Merged r121643. <rdar://problem/11942168>
Modified Paths
Added Paths
Diff
Modified: branches/safari-536.26-branch/LayoutTests/ChangeLog (124123 => 124124)
--- branches/safari-536.26-branch/LayoutTests/ChangeLog 2012-07-31 00:33:53 UTC (rev 124123)
+++ branches/safari-536.26-branch/LayoutTests/ChangeLog 2012-07-31 00:35:57 UTC (rev 124124)
@@ -1,5 +1,19 @@
2012-07-30 Lucas Forschler <[email protected]>
+ Merge 121643
+
+ 2012-07-01 Kenichi Ishibashi <[email protected]>
+
+ Arabic shaping is incorrect if ZWNJ exist
+ https://bugs.webkit.org/show_bug.cgi?id=89843
+
+ Reviewed by Dan Bernstein.
+
+ * platform/mac/fast/text/arabic-zwj-and-zwnj-expected.html: Added.
+ * platform/mac/fast/text/arabic-zwj-and-zwnj.html: Added.
+
+2012-07-30 Lucas Forschler <[email protected]>
+
Merge 121391
2012-06-27 Filip Pizlo <[email protected]>
Copied: branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/arabic-zwj-and-zwnj-expected.html (from rev 121643, trunk/LayoutTests/platform/mac/fast/text/arabic-zwj-and-zwnj-expected.html) (0 => 124124)
--- branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/arabic-zwj-and-zwnj-expected.html (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/arabic-zwj-and-zwnj-expected.html 2012-07-31 00:35:57 UTC (rev 124124)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<head>
+</head>
+<p>The first word contains ZWJ. The first word should be identical with the second word.</p>
+<div style="font-size: 36pt;">
+میخور
+</div>
+<div style="font-size: 36pt;">
+میخور
+</div>
+
+<p>The last character of the first word is ZWNJ. The first word should be identical with the second word.</p>
+<div style="font-size: 36pt;">
+می
+</div>
+<div style="font-size: 36pt;">
+می
+</div>
Copied: branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/arabic-zwj-and-zwnj.html (from rev 121643, trunk/LayoutTests/platform/mac/fast/text/arabic-zwj-and-zwnj.html) (0 => 124124)
--- branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/arabic-zwj-and-zwnj.html (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/arabic-zwj-and-zwnj.html 2012-07-31 00:35:57 UTC (rev 124124)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<head>
+</head>
+<p>The first word contains ZWJ. The first word should be identical with the second word.</p>
+<div style="font-size: 36pt;">
+می‍خور
+</div>
+<div style="font-size: 36pt;">
+میخور
+</div>
+
+<p>The last character of the first word is ZWNJ. The first word should be identical with the second word.</p>
+<div style="font-size: 36pt;">
+می‌
+</div>
+<div style="font-size: 36pt;">
+می
+</div>
Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (124123 => 124124)
--- branches/safari-536.26-branch/Source/WebCore/ChangeLog 2012-07-31 00:33:53 UTC (rev 124123)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog 2012-07-31 00:35:57 UTC (rev 124124)
@@ -1,5 +1,31 @@
2012-07-30 Lucas Forschler <[email protected]>
+ Merge 121643
+
+ 2012-07-01 Kenichi Ishibashi <[email protected]>
+
+ Arabic shaping is incorrect if ZWNJ exist
+ https://bugs.webkit.org/show_bug.cgi?id=89843
+
+ Reviewed by Dan Bernstein.
+
+ mac port treats ZWJ (zero-width-joiner) and ZWNJ (zero-width-non-joiner) as a part of combining
+ character sequence. This could cause a problem when the font doesn't have glyph mapping of ZWJ and ZWNJ.
+ Suppose the text to be rendered is "U+0645(MEEM) U+06CC(FARSI YEH) U+200C(ZWNJ)". In this case, U+0645
+ and U+06CC are rendered in isolated form if the font doesn't have a glyph for ZWNJ. They should be joined.
+
+ This patch changes handling of ZWJ and ZWNJ. Treats ZWJ and ZWNJ as base characters so that a complex text
+ run isn't separate at the point of ZWJ and ZWNJ even the font doesn't contain glyphs for them.
+ If ComplexTextController finds ZWJ, it doesn't split the current complex text run.
+
+ Test: platform/mac/fast/text/arabic-zwj-and-zwnj.html
+
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::advanceByCombiningCharacterSequence): Don't treat ZWJ and ZWNJ as a part of combining character sequence.
+ (WebCore::ComplexTextController::collectComplexTextRuns): Set fontData to nextFontData if the baseCharacter is ZWJ.
+
+2012-07-30 Lucas Forschler <[email protected]>
+
Merge 121299
2012-06-26 Alice Cheng <[email protected]>
Modified: branches/safari-536.26-branch/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (124123 => 124124)
--- branches/safari-536.26-branch/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp 2012-07-31 00:33:53 UTC (rev 124123)
+++ branches/safari-536.26-branch/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp 2012-07-31 00:35:57 UTC (rev 124124)
@@ -208,7 +208,7 @@
UChar32 nextCharacter;
int markLength = 0;
U16_NEXT(iterator, markLength, end - iterator, nextCharacter);
- if (!(U_GET_GC_MASK(nextCharacter) & U_GC_M_MASK) && nextCharacter != zeroWidthJoiner && nextCharacter != zeroWidthNonJoiner)
+ if (!(U_GET_GC_MASK(nextCharacter) & U_GC_M_MASK))
break;
markCount += markLength;
iterator += markLength;
@@ -284,13 +284,17 @@
}
nextIsMissingGlyph = false;
+ if (baseCharacter == zeroWidthJoiner)
+ nextFontData = fontData;
#if !PLATFORM(WX)
- nextFontData = m_font.fontDataForCombiningCharacterSequence(cp + index, curr - cp - index, nextIsSmallCaps ? SmallCapsVariant : NormalVariant);
- if (!nextFontData) {
- if (markCount)
- nextFontData = systemFallbackFontData();
- else
- nextIsMissingGlyph = true;
+ else {
+ nextFontData = m_font.fontDataForCombiningCharacterSequence(cp + index, curr - cp - index, nextIsSmallCaps ? SmallCapsVariant : NormalVariant);
+ if (!nextFontData) {
+ if (markCount)
+ nextFontData = systemFallbackFontData();
+ else
+ nextIsMissingGlyph = true;
+ }
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes