Title: [195369] branches/safari-601.1.46-branch
- Revision
- 195369
- Author
- matthew_han...@apple.com
- Date
- 2016-01-20 12:59:44 -0800 (Wed, 20 Jan 2016)
Log Message
Merge r188377. rdar://problem/24208161
Modified Paths
Diff
Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (195368 => 195369)
--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog 2016-01-20 20:59:38 UTC (rev 195368)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog 2016-01-20 20:59:44 UTC (rev 195369)
@@ -1,3 +1,21 @@
+2016-01-20 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r188377. rdar://problem/24208161
+
+ 2015-08-12 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [Cocoa] [CJK-configured device] System font has vertical punctuation
+ https://bugs.webkit.org/show_bug.cgi?id=147964
+ <rdar://problem/22256660>
+
+ Reviewed by Dean Jackson.
+
+ Make sure punctuation isn't vertical.
+
+ * fast/text/system-font-punctuation.html: Added.
+ * platform/ios-simulator/fast/text/system-font-punctuation-expected.txt: Added
+ * platform/mac/fast/text/system-font-punctuation-expected.txt: Added
+
2016-01-19 Matthew Hanson <matthew_han...@apple.com>
Merge r188263. rdar://problem/24208161
Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (195368 => 195369)
--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2016-01-20 20:59:38 UTC (rev 195368)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2016-01-20 20:59:44 UTC (rev 195369)
@@ -1,3 +1,47 @@
+2016-01-20 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r188377. rdar://problem/24208161
+
+ 2015-08-12 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [Cocoa] [CJK-configured device] System font has vertical punctuation
+ https://bugs.webkit.org/show_bug.cgi?id=147964
+ <rdar://problem/22256660>
+
+ Reviewed by Dean Jackson.
+
+ GlyphPage::fill() has multiple code paths to accomplish its goal. It uses the shouldUseCoreText() helper
+ function to determine which one of the paths should be taken. However, not all of the code paths in
+ GlyphPage::fill() are able of handling all situations. Indeed, the CoreText code paths in GlyphPage::fill()
+ are only able to handle the situations which shouldUseCoreText() returns true for. This happens in the
+ following cases:
+
+ 1. If the font is a composite font
+ 2. If the font is used for text-combine
+ 3. If the font has vertical glyphs
+
+ In r187693, I added one more case to this list: If the font is the system font. However, I failed to add
+ the necessary support to GlyphPage::fill() for this case. Becasue of this, we just happened to fall into
+ the case of vertical fonts (just by coincidence), which causes us to use
+ CTFontGetVerticalGlyphsForCharacters() instead of CTFontGetGlyphsForCharacters().
+
+ The solution is to adopt the same behavior we were using before r187693. Back then, we were using
+ CGFontGetGlyphsForUnichars(), which always returned horizontal glyphs. We should simply adopt this same
+ behavior, except in the Core Text case. Therefore, this patch is just a simple check to see if we are
+ using the system font when determining which Core Text function to use.
+
+ Test: fast/text/system-font-punctuation.html
+
+ * platform/graphics/FontDescription.h:
+ (WebCore::FontDescription::setWidthVariant):
+ * platform/graphics/FontPlatformData.h:
+ (WebCore::FontPlatformData::isForTextCombine):
+ * platform/graphics/mac/GlyphPageMac.cpp:
+ (WebCore::shouldUseCoreText):
+ (WebCore::GlyphPage::fill):
+ * rendering/RenderCombineText.cpp:
+ (WebCore::RenderCombineText::combineText):
+
2016-01-19 Matthew Hanson <matthew_han...@apple.com>
Merge r188263. rdar://problem/24208161
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp (195368 => 195369)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp 2016-01-20 20:59:38 UTC (rev 195368)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp 2016-01-20 20:59:44 UTC (rev 195369)
@@ -93,10 +93,10 @@
} else if (!fontData->platformData().isCompositeFontReference()) {
// Because we know the implementation of shouldUseCoreText(), if the font isn't for text combine and it isn't a system font,
// we know it must have vertical glyphs.
- if (fontData->platformData().widthVariant() == RegularWidth)
+ if (fontData->platformData().isForTextCombine() || fontData->isSystemFont())
+ CTFontGetGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength);
+ else
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.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes