<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[214848] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/214848">214848</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2017-04-03 15:28:45 -0700 (Mon, 03 Apr 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Japanese fonts in vertical text should support synthesized italics
https://bugs.webkit.org/show_bug.cgi?id=169301

Reviewed by Simon Fraser.

Source/WebCore:

Updated test in fast/text/international.

* platform/graphics/Font.cpp:
(WebCore::Font::nonSyntheticItalicFont): Deleted.
* platform/graphics/Font.h:
Removed the non-synthetic italic font member, since it's not used.

* platform/graphics/FontCascadeFonts.cpp:
(WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
Patched to ensure that a text-orientation-fallback font data is always
returned in the synthetic oblique case, so that non-CJK and CJK are
guaranteed to be broken up so that their slants can be applied differently.

(WebCore::FontCascadeFonts::glyphDataForSystemFallback):
(WebCore::FontCascadeFonts::glyphDataForNormalVariant):
(WebCore::glyphDataForCJKCharacterWithoutSyntheticItalic): Deleted.
Patched to no longer turn off synthetic oblique for CJK.

* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):
Apply the correct italic transform to CJK when in vertical text.

LayoutTests:

* fast/text/international/synthesized-italic-vertical-expected.html:
* fast/text/international/synthesized-italic-vertical.html:
* platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.png: Removed.
* platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.txt: Removed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasttextinternationalsynthesizeditalicverticalexpectedhtml">trunk/LayoutTests/fast/text/international/synthesized-italic-vertical-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttextinternationalsynthesizeditalicverticalhtml">trunk/LayoutTests/fast/text/international/synthesized-italic-vertical.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontcpp">trunk/Source/WebCore/platform/graphics/Font.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFonth">trunk/Source/WebCore/platform/graphics/Font.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadeFontscpp">trunk/Source/WebCore/platform/graphics/FontCascadeFonts.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCascadeCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacfasttextinternationalsynthesizeditalicverticallatinexpectedpng">trunk/LayoutTests/platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfasttextinternationalsynthesizeditalicverticallatinexpectedtxt">trunk/LayoutTests/platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/LayoutTests/ChangeLog        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-04-03  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        Japanese fonts in vertical text should support synthesized italics
+        https://bugs.webkit.org/show_bug.cgi?id=169301
+
+        Reviewed by Simon Fraser.
+
+        * fast/text/international/synthesized-italic-vertical-expected.html:
+        * fast/text/international/synthesized-italic-vertical.html:
+        * platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.png: Removed.
+        * platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.txt: Removed.
+
</ins><span class="cx"> 2017-04-03  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r206744): CSS background-image in style attribute ignored when using createHTMLDocument method of DOM parsing
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextinternationalsynthesizeditalicverticalexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/international/synthesized-italic-vertical-expected.html (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/international/synthesized-italic-vertical-expected.html        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/LayoutTests/fast/text/international/synthesized-italic-vertical-expected.html        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -12,6 +12,6 @@
</span><span class="cx">   &lt;/style&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><del>-  &lt;p&gt;丹羽 亮介&lt;/p&gt;
</del><ins>+  
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextinternationalsynthesizeditalicverticalhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/international/synthesized-italic-vertical.html (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/international/synthesized-italic-vertical.html        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/LayoutTests/fast/text/international/synthesized-italic-vertical.html        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx">   html {
</span><span class="cx">     -webkit-writing-mode: vertical-lr;
</span><span class="cx">   }
</span><del>-  p {
</del><ins>+  div {
</ins><span class="cx">     font-size: 40px;
</span><span class="cx">     font-style: italic;
</span><span class="cx">   }
</span><span class="lines">@@ -13,6 +13,6 @@
</span><span class="cx">   &lt;/style&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><del>-  &lt;p&gt;丹羽 亮介&lt;/p&gt;
</del><ins>+  &lt;div style=&quot;position:absolute;color:red; top:0; left:0; clip:rect(32px, auto, auto, 32px)&quot;&gt;丹&lt;/div&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttextinternationalsynthesizeditalicverticallatinexpectedpng"></a>
<div class="binary"><h4>Deleted: trunk/LayoutTests/platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttextinternationalsynthesizeditalicverticallatinexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.txt (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.txt        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/LayoutTests/platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.txt        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -1,8 +0,0 @@
</span><del>-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 102x600
-  RenderBlock {HTML} at (0,0) size 102x600
-    RenderBody {BODY} at (30,8) size 42x584
-      RenderBlock {P} at (0,0) size 42x584
-        RenderText {#text} at (3,0) size 36x369
-          text run at (3,0) width 369: &quot;ABC\x{4E39}\x{7FBD} \x{4EAE}\x{4ECB}ABC\x{4E39}\x{7FBD} \x{4EAE}\x{4ECB}&quot;
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/Source/WebCore/ChangeLog        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2017-04-03  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        Japanese fonts in vertical text should support synthesized italics
+        https://bugs.webkit.org/show_bug.cgi?id=169301
+
+        Reviewed by Simon Fraser.
+
+        Updated test in fast/text/international.
+
+        * platform/graphics/Font.cpp:
+        (WebCore::Font::nonSyntheticItalicFont): Deleted.
+        * platform/graphics/Font.h:
+        Removed the non-synthetic italic font member, since it's not used.
+
+        * platform/graphics/FontCascadeFonts.cpp:
+        (WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
+        Patched to ensure that a text-orientation-fallback font data is always
+        returned in the synthetic oblique case, so that non-CJK and CJK are
+        guaranteed to be broken up so that their slants can be applied differently.
+
+        (WebCore::FontCascadeFonts::glyphDataForSystemFallback):
+        (WebCore::FontCascadeFonts::glyphDataForNormalVariant):
+        (WebCore::glyphDataForCJKCharacterWithoutSyntheticItalic): Deleted.
+        Patched to no longer turn off synthetic oblique for CJK.
+
+        * platform/graphics/cocoa/FontCascadeCocoa.mm:
+        (WebCore::FontCascade::drawGlyphs):
+        Apply the correct italic transform to CJK when in vertical text.
+
</ins><span class="cx"> 2017-04-03  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r206744): CSS background-image in style attribute ignored when using createHTMLDocument method of DOM parsing
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.cpp        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -328,22 +328,6 @@
</span><span class="cx">     return *m_derivedFontData-&gt;brokenIdeograph;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const Font&amp; Font::nonSyntheticItalicFont() const
-{
-    if (!m_derivedFontData)
-        m_derivedFontData = std::make_unique&lt;DerivedFonts&gt;(isCustomFont());
-    if (!m_derivedFontData-&gt;nonSyntheticItalic) {
-#if PLATFORM(COCOA) || USE(CAIRO)
-        FontPlatformData nonSyntheticItalicFontPlatformData = FontPlatformData::cloneWithSyntheticOblique(m_platformData, false);
-#else
-        FontPlatformData nonSyntheticItalicFontPlatformData(m_platformData);
-#endif
-        m_derivedFontData-&gt;nonSyntheticItalic = create(nonSyntheticItalicFontPlatformData, isCustomFont());
-    }
-    ASSERT(m_derivedFontData-&gt;nonSyntheticItalic != this);
-    return *m_derivedFontData-&gt;nonSyntheticItalic;
-}
-
</del><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> String Font::description() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFonth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.h (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.h        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/Source/WebCore/platform/graphics/Font.h        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -95,7 +95,6 @@
</span><span class="cx">     const Font&amp; noSynthesizableFeaturesFont() const;
</span><span class="cx">     const Font* emphasisMarkFont(const FontDescription&amp;) const;
</span><span class="cx">     const Font&amp; brokenIdeographFont() const;
</span><del>-    const Font&amp; nonSyntheticItalicFont() const;
</del><span class="cx"> 
</span><span class="cx">     const Font* variantFont(const FontDescription&amp; description, FontVariant variant) const
</span><span class="cx">     {
</span><span class="lines">@@ -272,7 +271,6 @@
</span><span class="cx">         RefPtr&lt;Font&gt; brokenIdeograph;
</span><span class="cx">         RefPtr&lt;Font&gt; verticalRightOrientation;
</span><span class="cx">         RefPtr&lt;Font&gt; uprightOrientation;
</span><del>-        RefPtr&lt;Font&gt; nonSyntheticItalic;
</del><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     mutable std::unique_ptr&lt;DerivedFonts&gt; m_derivedFontData;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadeFontscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCascadeFonts.cpp (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascadeFonts.cpp        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/Source/WebCore/platform/graphics/FontCascadeFonts.cpp        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -281,23 +281,18 @@
</span><span class="cx"> 
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><del>-
-#if PLATFORM(COCOA) || USE(CAIRO)
-static GlyphData glyphDataForCJKCharacterWithoutSyntheticItalic(UChar32 character, GlyphData&amp; data)
-{
-    GlyphData nonItalicData = data.font-&gt;nonSyntheticItalicFont().glyphDataForCharacter(character);
-    if (nonItalicData.font)
-        return nonItalicData;
-    return data;
-}
-#endif
</del><span class="cx">     
</span><span class="cx"> static GlyphData glyphDataForNonCJKCharacterWithGlyphOrientation(UChar32 character, NonCJKGlyphOrientation orientation, const GlyphData&amp; data)
</span><span class="cx"> {
</span><ins>+    bool syntheticOblique = data.font-&gt;platformData().syntheticOblique();
</ins><span class="cx">     if (orientation == NonCJKGlyphOrientation::Upright || shouldIgnoreRotation(character)) {
</span><span class="cx">         GlyphData uprightData = data.font-&gt;uprightOrientationFont().glyphDataForCharacter(character);
</span><del>-        // If the glyphs are the same, then we know we can just use the horizontal glyph rotated vertically to be upright.
-        if (data.glyph == uprightData.glyph)
</del><ins>+        // If the glyphs are the same, then we know we can just use the horizontal glyph rotated vertically
+        // to be upright. For synthetic oblique, however, we will always return the uprightData to ensure
+        // that non-CJK and CJK runs are broken up. This guarantees that vertical
+        // fonts without isTextOrientationFallback() set contain CJK characters only and thus we can get
+        // the oblique slant correct.
+        if (data.glyph == uprightData.glyph &amp;&amp; !syntheticOblique)
</ins><span class="cx">             return data;
</span><span class="cx">         // The glyphs are distinct, meaning that the font has a vertical-right glyph baked into it. We can't use that
</span><span class="cx">         // glyph, so we fall back to the upright data and use the horizontal glyph.
</span><span class="lines">@@ -305,10 +300,14 @@
</span><span class="cx">             return uprightData;
</span><span class="cx">     } else if (orientation == NonCJKGlyphOrientation::Mixed) {
</span><span class="cx">         GlyphData verticalRightData = data.font-&gt;verticalRightOrientationFont().glyphDataForCharacter(character);
</span><del>-        // If the glyphs are distinct, we will make the assumption that the font has a vertical-right glyph baked
-        // into it.
-        if (data.glyph != verticalRightData.glyph)
</del><ins>+        
+        // If there is a baked-in rotated glyph, we will use it unless syntheticOblique is set. If
+        // synthetic oblique is set, we fall back to the horizontal glyph. This guarantees that vertical
+        // fonts without isTextOrientationFallback() set contain CJK characters only and thus we can get
+        // the oblique slant correct.
+        if (data.glyph != verticalRightData.glyph &amp;&amp; !syntheticOblique)
</ins><span class="cx">             return data;
</span><ins>+
</ins><span class="cx">         // The glyphs are identical, meaning that we should just use the horizontal glyph.
</span><span class="cx">         if (verticalRightData.font)
</span><span class="cx">             return verticalRightData;
</span><span class="lines">@@ -340,10 +339,6 @@
</span><span class="cx">     if (fallbackGlyphData.font &amp;&amp; fallbackGlyphData.font-&gt;platformData().orientation() == Vertical &amp;&amp; !fallbackGlyphData.font-&gt;isTextOrientationFallback()) {
</span><span class="cx">         if (variant == NormalVariant &amp;&amp; !FontCascade::isCJKIdeographOrSymbol(c))
</span><span class="cx">             fallbackGlyphData = glyphDataForNonCJKCharacterWithGlyphOrientation(c, description.nonCJKGlyphOrientation(), fallbackGlyphData);
</span><del>-#if PLATFORM(COCOA) || USE(CAIRO)
-        if (fallbackGlyphData.font-&gt;platformData().syntheticOblique() &amp;&amp; FontCascade::isCJKIdeographOrSymbol(c))
-            fallbackGlyphData = glyphDataForCJKCharacterWithoutSyntheticItalic(c, fallbackGlyphData);
-#endif
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Keep the system fallback fonts we use alive.
</span><span class="lines">@@ -390,10 +385,6 @@
</span><span class="cx">                 // to make sure you get a square (even for broken glyphs like symbols used for punctuation).
</span><span class="cx">                 return glyphDataForVariant(c, description, BrokenIdeographVariant, fallbackIndex);
</span><span class="cx">             }
</span><del>-#if PLATFORM(COCOA) || USE(CAIRO)
-            if (data.font-&gt;platformData().syntheticOblique())
-                return glyphDataForCJKCharacterWithoutSyntheticItalic(c, data);
-#endif
</del><span class="cx">         }
</span><span class="cx">         return data;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCascadeCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm (214847 => 214848)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm        2017-04-03 22:10:52 UTC (rev 214847)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm        2017-04-03 22:28:45 UTC (rev 214848)
</span><span class="lines">@@ -243,9 +243,12 @@
</span><span class="cx">     matrix.d = -matrix.d;
</span><span class="cx">     if (platformData.syntheticOblique()) {
</span><span class="cx">         static float obliqueSkew = tanf(syntheticObliqueAngle() * piFloat / 180);
</span><del>-        if (platformData.orientation() == Vertical)
-            matrix = CGAffineTransformConcat(matrix, CGAffineTransformMake(1, obliqueSkew, 0, 1, 0, 0));
-        else
</del><ins>+        if (platformData.orientation() == Vertical) {
+            if (font.isTextOrientationFallback())
+                matrix = CGAffineTransformConcat(matrix, CGAffineTransformMake(1, obliqueSkew, 0, 1, 0, 0));
+            else
+                matrix = CGAffineTransformConcat(matrix, CGAffineTransformMake(1, -obliqueSkew, 0, 1, 0, 0));
+        } else
</ins><span class="cx">             matrix = CGAffineTransformConcat(matrix, CGAffineTransformMake(1, 0, -obliqueSkew, 1, 0, 0));
</span><span class="cx">     }
</span><span class="cx">     ScopedTextMatrix restorer(matrix, cgContext);
</span></span></pre>
</div>
</div>

</body>
</html>