Title: [124125] branches/safari-536.26-branch

Diff

Modified: branches/safari-536.26-branch/LayoutTests/ChangeLog (124124 => 124125)


--- branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-07-31 00:35:57 UTC (rev 124124)
+++ branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-07-31 00:42:17 UTC (rev 124125)
@@ -1,5 +1,20 @@
 2012-07-30  Lucas Forschler  <[email protected]>
 
+    Merge 121645
+
+    2012-07-01  Dan Bernstein  <[email protected]>
+
+            <rdar://problem/11785743> [mac] Non-BMP characters in vertical text appear as missing glyphs
+            https://bugs.webkit.org/show_bug.cgi?id=90349
+
+            Reviewed by Dean Jackson.
+
+            * platform/mac/fast/text/vertical-surrogate-pair.html: Added.
+            * platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.png: Added.
+            * platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.txt: Added.
+
+2012-07-30  Lucas Forschler  <[email protected]>
+
     Merge 121643
 
     2012-07-01  Kenichi Ishibashi  <[email protected]>

Copied: branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/vertical-surrogate-pair.html (from rev 121645, trunk/LayoutTests/platform/mac/fast/text/vertical-surrogate-pair.html) (0 => 124125)


--- branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/vertical-surrogate-pair.html	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/platform/mac/fast/text/vertical-surrogate-pair.html	2012-07-31 00:42:17 UTC (rev 124125)
@@ -0,0 +1,8 @@
+<style>
+    div { font-family: 'hiragino mincho pro'; font-size: 48px; }
+</style>
+<p>
+    These two glyphs should look the same:
+</p>
+<div>&#x20b9f;</div>
+<div style="-webkit-writing-mode: vertical-lr;">&#x20b9f;</div>

Copied: branches/safari-536.26-branch/LayoutTests/platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.png (from rev 121645, trunk/LayoutTests/platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.png)


(Binary files differ)

Copied: branches/safari-536.26-branch/LayoutTests/platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.txt (from rev 121645, trunk/LayoutTests/platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.txt) (0 => 124125)


--- branches/safari-536.26-branch/LayoutTests/platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.txt	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.txt	2012-07-31 00:42:17 UTC (rev 124125)
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 253x18
+          text run at (0,0) width 253: "These two glyphs should look the same:"
+      RenderBlock {DIV} at (0,34) size 784x72
+        RenderText {#text} at (0,12) size 48x48
+          text run at (0,12) width 48: "\x{D842}\x{DF9F}"
+      RenderBlock {DIV} at (0,106) size 72x49
+        RenderText {#text} at (12,0) size 48x49
+          text run at (12,0) width 49: "\x{D842}\x{DF9F}"

Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (124124 => 124125)


--- branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-07-31 00:35:57 UTC (rev 124124)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-07-31 00:42:17 UTC (rev 124125)
@@ -1,5 +1,24 @@
 2012-07-30  Lucas Forschler  <[email protected]>
 
+    Merge 121645
+
+    2012-07-01  Dan Bernstein  <[email protected]>
+
+            <rdar://problem/11785743> [mac] Non-BMP characters in vertical text appear as missing glyphs
+            https://bugs.webkit.org/show_bug.cgi?id=90349
+
+            Reviewed by Dean Jackson.
+
+            Test: platform/mac/fast/text/vertical-surrogate-pair.html
+
+            * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
+            (WebCore::GlyphPage::fill): When calling wkGetVerticalGlyphsForCharacters or
+            CTFontGetGlyphsForCharacters with a buffer consisting of surrogate pair, account for those
+            functions’ behavior of placing glyphs at indices corresponding to the first character of
+            each pair.
+
+2012-07-30  Lucas Forschler  <[email protected]>
+
     Merge 121643
 
     2012-07-01  Kenichi Ishibashi  <[email protected]>

Modified: branches/safari-536.26-branch/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp (124124 => 124125)


--- branches/safari-536.26-branch/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp	2012-07-31 00:35:57 UTC (rev 124124)
+++ branches/safari-536.26-branch/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp	2012-07-31 00:42:17 UTC (rev 124125)
@@ -68,11 +68,14 @@
         }
     } else if (!fontData->platformData().isCompositeFontReference() && ((fontData->platformData().widthVariant() == RegularWidth) ? wkGetVerticalGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength)
                : CTFontGetGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength))) {
+        // When buffer consists of surrogate pairs, wkGetVerticalGlyphsForCharacters and CTFontGetGlyphsForCharacters
+        // place the glyphs at indices corresponding to the first character of each pair.
+        unsigned glyphStep = bufferLength / length;
         for (unsigned i = 0; i < length; ++i) {
-            if (!glyphs[i])
+            if (!glyphs[i * glyphStep])
                 setGlyphDataForIndex(offset + i, 0, 0);
             else {
-                setGlyphDataForIndex(offset + i, glyphs[i], fontData);
+                setGlyphDataForIndex(offset + i, glyphs[i * glyphStep], fontData);
                 haveGlyphs = true;
             }
         }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to