https://bugs.webkit.org/show_bug.cgi?id=138328
rdar://problem/
18801907
Reviewed by Simon Fraser.
Source/WebCore:
FontCache::createFontPlatformData doesn’t set the oblique flag if
the requested font isn’t oblique, but
FontCache::systemFallbackForCharacters() does. This patch simply
adopts this behavior in both places.
Test: fast/text/font-cursive-italic-cjk.html
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
LayoutTests:
Make sure that the text matches the output of a different codepath.
* platform/mac/fast/text/font-cursive-italic-cjk-expected.html: Added.
* platform/mac/fast/text/font-cursive-italic-cjk.html: Added.
* platform/mac/TestExpectations: Skipped test on non-Yosemite platforms.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175579
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-11-04 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [OSX] CJK characters styled with font-family: cursive are italicized
+ https://bugs.webkit.org/show_bug.cgi?id=138328
+ rdar://problem/18801907
+
+ Reviewed by Simon Fraser.
+
+ Make sure that the text matches the output of a different codepath.
+
+ * platform/mac/fast/text/font-cursive-italic-cjk-expected.html: Added.
+ * platform/mac/fast/text/font-cursive-italic-cjk.html: Added.
+ * platform/mac/TestExpectations: Skipped test on non-Yosemite platforms.
+
2014-11-04 Benjamin Poulain <bpoulain@apple.com>
When computing the specificity of selectors, use saturated arithmetic per component
webkit.org/b/137882 http/tests/media/hls/video-controls-live-stream.html [ Failure ]
webkit.org/b/137882 http/tests/media/track-in-band-hls-metadata.html [ Failure ]
webkit.org/b/137882 media/track/audio-track.html [ Pass Failure ]
+
+# Specific to Yosemite's font fallback
+webkit.org/b/138328 [ Mavericks MountainLion ] platform/mac/fast/text/font-cursive-italic-cjk.html [ Skip ]
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test makes sure that CJK characters styled with font-family: cursive aren't italicized.
+<div>
+<span style="font-size: 50px;">Look at this character: </span><span style="font-family: STKaiti;">年</span>
+</div>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test makes sure that CJK characters styled with font-family: cursive aren't italicized.
+<div>
+<span style="font-size: 50px;">Look at this character: </span><span style="font-family: cursive;">年</span>
+</div>
+</body>
+</html>
+2014-11-04 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [OSX] CJK characters styled with font-family: cursive are italicized
+ https://bugs.webkit.org/show_bug.cgi?id=138328
+ rdar://problem/18801907
+
+ Reviewed by Simon Fraser.
+
+ FontCache::createFontPlatformData doesn’t set the oblique flag if
+ the requested font isn’t oblique, but
+ FontCache::systemFallbackForCharacters() does. This patch simply
+ adopts this behavior in both places.
+
+ Test: fast/text/font-cursive-italic-cjk.html
+
+ * platform/graphics/mac/FontCacheMac.mm:
+ (WebCore::FontCache::systemFallbackForCharacters):
+
2014-11-04 Benjamin Poulain <bpoulain@apple.com>
When computing the specificity of selectors, use saturated arithmetic per component
NSFontManager *fontManager = [NSFontManager sharedFontManager];
- NSFontTraitMask traits;
+ NSFontTraitMask traits = 0;
NSInteger weight;
CGFloat size;
if (nsFont) {
- traits = [fontManager traitsOfFont:nsFont];
+ if (description.italic())
+ traits = [fontManager traitsOfFont:nsFont];
if (platformData.m_syntheticBold)
traits |= NSBoldFontMask;
if (platformData.m_syntheticOblique)