Diff
Modified: branches/safari-601-branch/LayoutTests/ChangeLog (195401 => 195402)
--- branches/safari-601-branch/LayoutTests/ChangeLog 2016-01-21 07:16:57 UTC (rev 195401)
+++ branches/safari-601-branch/LayoutTests/ChangeLog 2016-01-21 07:57:07 UTC (rev 195402)
@@ -1,3 +1,22 @@
+2016-01-20 Babak Shafiei <[email protected]>
+
+ Merge r188263.
+
+ 2015-08-11 Myles C. Maxfield <[email protected]>
+
+ [iOS] Arabic letter Yeh is drawn in LastResort
+ https://bugs.webkit.org/show_bug.cgi?id=147862
+ <rdar://problem/22202935>
+
+ Reviewed by Darin Adler.
+
+ * fast/text/arabic-glyph-cache-fill-combine-expected.html: Added.
+ * fast/text/arabic-glyph-cache-fill-combine.html: Added.
+ * platform/mac/TestExpectations: Mark test as iOS-specific
+ * platform/gtk/TestExpectations: Mark test as iOS-specific
+ * platform/efl/TestExpectations: Mark test as iOS-specific
+ * platform/efl/TestExpectations: Mark test as iOS-specific
+
2016-01-20 Matthew Hanson <[email protected]>
Rollout r192200 via r195067. rdar://problem/24154288
Copied: branches/safari-601-branch/LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html (from rev 188263, trunk/LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html) (0 => 195402)
--- branches/safari-601-branch/LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html 2016-01-21 07:57:07 UTC (rev 195402)
@@ -0,0 +1,10 @@
+<!DOCTYPE>
+<html>
+<body>
+This test hits a codepath where codepoints were being combined before they were being input into our glyph cache.
+This character occurs just before combining marks in Unicode, and therefore was being erroneously combined. The test
+passes if the glyph is drawn in a font other than LastResort (if the test fails, the character looks like a box or like
+three horizontal lines).
+<div style="font: 50px 'Geeza Pro';">ي</div>
+</body>
+</html>
Copied: branches/safari-601-branch/LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html (from rev 188263, trunk/LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html) (0 => 195402)
--- branches/safari-601-branch/LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html 2016-01-21 07:57:07 UTC (rev 195402)
@@ -0,0 +1,10 @@
+<!DOCTYPE>
+<html>
+<body>
+This test hits a codepath where codepoints were being combined before they were being input into our glyph cache.
+This character occurs just before combining marks in Unicode, and therefore was being erroneously combined. The test
+passes if the glyph is drawn in a font other than LastResort (if the test fails, the character looks like a box or like
+three horizontal lines).
+<div style="font: 50px UICTFontTextStyleBody;">ي</div>
+</body>
+</html>
Modified: branches/safari-601-branch/LayoutTests/platform/efl/TestExpectations (195401 => 195402)
--- branches/safari-601-branch/LayoutTests/platform/efl/TestExpectations 2016-01-21 07:16:57 UTC (rev 195401)
+++ branches/safari-601-branch/LayoutTests/platform/efl/TestExpectations 2016-01-21 07:57:07 UTC (rev 195402)
@@ -2301,3 +2301,6 @@
# This test uses an MPEG-4 video
media/video-seek-to-current-time.html [ Skip ]
+
+# This test relies on iOS-specific font fallback.
+fast/text/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
\ No newline at end of file
Modified: branches/safari-601-branch/LayoutTests/platform/gtk/TestExpectations (195401 => 195402)
--- branches/safari-601-branch/LayoutTests/platform/gtk/TestExpectations 2016-01-21 07:16:57 UTC (rev 195401)
+++ branches/safari-601-branch/LayoutTests/platform/gtk/TestExpectations 2016-01-21 07:57:07 UTC (rev 195402)
@@ -2403,3 +2403,6 @@
# This test uses an MPEG-4 video
media/video-seek-to-current-time.html [ Skip ]
+
+# This test relies on iOS-specific font fallback.
+fast/text/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
Modified: branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations (195401 => 195402)
--- branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations 2016-01-21 07:16:57 UTC (rev 195401)
+++ branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations 2016-01-21 07:57:07 UTC (rev 195402)
@@ -1376,3 +1376,6 @@
# Yosemite and El Capitan do not support font feature coverage queries.
[ Yosemite ElCapitan ] css3/font-variant-small-caps-synthesis-coverage.html [ ImageOnlyFailure ]
[ Yosemite ElCapitan ] css3/font-variant-petite-caps-synthesis-coverage.html [ ImageOnlyFailure ]
+
+# This test relies on iOS-specific font fallback.
+[ Mavericks Yosemite ElCapitan ] fast/text/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
\ No newline at end of file
Modified: branches/safari-601-branch/LayoutTests/platform/win/TestExpectations (195401 => 195402)
--- branches/safari-601-branch/LayoutTests/platform/win/TestExpectations 2016-01-21 07:16:57 UTC (rev 195401)
+++ branches/safari-601-branch/LayoutTests/platform/win/TestExpectations 2016-01-21 07:57:07 UTC (rev 195402)
@@ -3140,3 +3140,6 @@
# This test uses an MPEG-4 video
media/video-seek-to-current-time.html [ Skip ]
+
+# This test relies on iOS-specific font fallback.
+fast/text/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (195401 => 195402)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2016-01-21 07:16:57 UTC (rev 195401)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2016-01-21 07:57:07 UTC (rev 195402)
@@ -1,3 +1,44 @@
+2016-01-20 Babak Shafiei <[email protected]>
+
+ Merge r188263.
+
+ 2015-08-11 Myles C. Maxfield <[email protected]>
+
+ [iOS] Arabic letter Yeh is drawn in LastResort
+ https://bugs.webkit.org/show_bug.cgi?id=147862
+ <rdar://problem/22202935>
+
+ Reviewed by Darin Adler.
+
+ In order to perform font fallback, we must know which fonts support which characters. We
+ perform this check by asking each font to map a sequence of codepoints to glyphs, and
+ any glyphs which end up with a 0 value are unsupported by the font.
+
+ One of the mechanisms that we use to do this is to combine the code points into a string,
+ and tell Core Text to lay out the string. However, this is fundamentally a different
+ operation than the one we are trying to perform. Strings combine adjacent codepoints into
+ grapheme clusters, and CoreText operates on these. However, we are trying to gain
+ information regarding codepoints, not grapheme clusters.
+
+ Instead of taking this string-based approach, we should try harder to use Core Text
+ functions which operate on ordered collections of characters, rather than strings. In
+ particular, CTFontGetGlyphsForCharacters() and CTFontGetVerticalGlyphsForCharacters()
+ have the behavior we want where any unmapped characters end up with a 0 value glyph.
+
+ Previously, we were only using the result of those functions if they were successfully
+ able to map their entire input. However, given the fact that we can degrade gracefully
+ in the case of a partial mapping, we shouldn't need to bail completely to the
+ string-based approach should a partial mapping occur.
+
+ At some point we should delete the string-based approach entirely. However, this path
+ is still explicitly used for composite fonts. Fixing that use case is out of scope
+ for this patch.
+
+ Test: fast/text/arabic-glyph-cache-fill-combine.html
+
+ * platform/graphics/mac/GlyphPageMac.cpp:
+ (WebCore::GlyphPage::fill):
+
2016-01-20 Timothy Hatcher <[email protected]>
<rdar://problem/24242600> CrashTracer: com.apple.WebKit.WebContent at …pector::CSSFrontendDispatcher::mediaQueryResultChanged + 316
Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp (195401 => 195402)
--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp 2016-01-21 07:16:57 UTC (rev 195401)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp 2016-01-21 07:57:07 UTC (rev 195402)
@@ -87,9 +87,11 @@
haveGlyphs = true;
}
}
- } else if (!fontData->platformData().isCompositeFontReference() && ((fontData->platformData().widthVariant() == RegularWidth)
- ? CTFontGetVerticalGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength)
- : CTFontGetGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength))) {
+ } else if (!fontData->platformData().isCompositeFontReference()) {
+ if (fontData->platformData().widthVariant() == RegularWidth)
+ CTFontGetVerticalGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength);
+ else
+ CTFontGetGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength);
// When buffer consists of surrogate pairs, CTFontGetVerticalGlyphsForCharacters and CTFontGetGlyphsForCharacters
// place the glyphs at indices corresponding to the first character of each pair.
ASSERT(!(bufferLength % length) && (bufferLength / length == 1 || bufferLength / length == 2));
@@ -103,6 +105,9 @@
}
}
} else {
+ // FIXME: webkit.org/b/147859 This code is fundamentally broken. A string is not the same as an ordered sequence of codepoints. In particular, strings
+ // combine adjacent codepoints into grapheme clusters. We should delete this entire else {} block.
+
// We ask CoreText for possible vertical variant glyphs
RetainPtr<CFStringRef> string = adoptCF(CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, buffer, bufferLength, kCFAllocatorNull));
RetainPtr<CFAttributedStringRef> attributedString = adoptCF(CFAttributedStringCreate(kCFAllocatorDefault, string.get(), fontData->getCFStringAttributes(false, fontData->hasVerticalGlyphs() ? Vertical : Horizontal)));