Title: [192042] trunk
Revision
192042
Author
mmaxfi...@apple.com
Date
2015-11-04 16:26:26 -0800 (Wed, 04 Nov 2015)

Log Message

Ruby base ending in tatechuyoko forces a line break before the tatechuyoko
https://bugs.webkit.org/show_bug.cgi?id=150883

Reviewed by Darin Adler.

Source/WebCore:

Asking the width of a 0-length tatechuyoko should return 0.

Test: fast/text/ruby-tatechuyoko.html

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::width):

LayoutTests:

* platform/mac/fast/text/international/text-combine-image-test-expected.txt: Updated.
* platform/mac/fast/text/tatechuyoko-expected.txt: Ditto.
* fast/text/ruby-tatechuyoko-expected.html: Added.
* fast/text/ruby-tatechuyoko.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (192041 => 192042)


--- trunk/LayoutTests/ChangeLog	2015-11-05 00:01:43 UTC (rev 192041)
+++ trunk/LayoutTests/ChangeLog	2015-11-05 00:26:26 UTC (rev 192042)
@@ -1,3 +1,15 @@
+2015-11-03  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Ruby base ending in tatechuyoko forces a line break before the tatechuyoko
+        https://bugs.webkit.org/show_bug.cgi?id=150883
+
+        Reviewed by Darin Adler.
+
+        * platform/mac/fast/text/international/text-combine-image-test-expected.txt: Updated.
+        * platform/mac/fast/text/tatechuyoko-expected.txt: Ditto.
+        * fast/text/ruby-tatechuyoko-expected.html: Added.
+        * fast/text/ruby-tatechuyoko.html: Added.
+
 2015-11-04  Ryan Haddad  <ryanhad...@apple.com>
 
         Updating expectations for fast/forms/HTMLOptionElement_label03.html on win

Added: trunk/LayoutTests/fast/text/ruby-tatechuyoko-expected.html (0 => 192042)


--- trunk/LayoutTests/fast/text/ruby-tatechuyoko-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/ruby-tatechuyoko-expected.html	2015-11-05 00:26:26 UTC (rev 192042)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<div>This test makes sure that a ruby base which ends in tatechuyoko doesn't force a line break before the tatechuyoko. The test passes if there is no horizontal space to the left of the vertical text below.</div>
+<ruby style="-webkit-writing-mode: vertical-rl;">abcdefghijkl<rt style="color: white;">a</rt></ruby>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/LayoutTests/fast/text/ruby-tatechuyoko-expected.html
___________________________________________________________________

Added: svn:executable

Added: trunk/LayoutTests/fast/text/ruby-tatechuyoko.html (0 => 192042)


--- trunk/LayoutTests/fast/text/ruby-tatechuyoko.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/ruby-tatechuyoko.html	2015-11-05 00:26:26 UTC (rev 192042)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<div>This test makes sure that a ruby base which ends in tatechuyoko doesn't force a line break before the tatechuyoko. The test passes if there is no horizontal space to the left of the vertical text below.</div>
+<ruby style="-webkit-writing-mode: vertical-rl;">abcdefghijkl<span style="-webkit-text-combine: horizontal; color: white;">21</span><rt style="color: white;">a</rt></ruby>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/LayoutTests/fast/text/ruby-tatechuyoko.html
___________________________________________________________________

Added: svn:executable

Modified: trunk/LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.txt (192041 => 192042)


--- trunk/LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.txt	2015-11-05 00:01:43 UTC (rev 192041)
+++ trunk/LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.txt	2015-11-05 00:26:26 UTC (rev 192042)
@@ -98,7 +98,7 @@
       RenderBlock (anonymous) at (317,0) size 274x584
         RenderBlock {HR} at (0,0) size 2x584 [border: (1px inset #000000)]
         RenderBlock {P} at (34,0) size 240x584
-          RenderBlock (floating) {SPAN} at (0,320) size 74x264 [border: (1px solid #FF0000)]
+          RenderBlock (floating) {SPAN} at (0,320) size 38x264 [border: (1px solid #FF0000)]
             RenderText {#text} at (7,1) size 24x118
               text run at (7,1) width 118: "float:right:"
             RenderInline {SPAN} at (0,0) size 24x25
@@ -109,20 +109,20 @@
             RenderInline {SPAN} at (0,0) size 24x25
               RenderCombineText {#text} at (7,166) size 24x25
                 text run at (7,166) width 24: "\x{FFFC}"
-            RenderText {#text} at (43,1) size 24x24
-              text run at (43,1) width 24: "\x{6708}"
-            RenderInline {SPAN} at (0,0) size 24x24
-              RenderCombineText {#text} at (43,25) size 24x24
-                text run at (43,25) width 24: "\x{FFFC}"
-            RenderText {#text} at (43,49) size 24x24
-              text run at (43,49) width 24: "\x{65E5}"
+            RenderText {#text} at (7,190) size 24x25
+              text run at (7,190) width 24: "\x{6708}"
+            RenderInline {SPAN} at (0,0) size 24x25
+              RenderCombineText {#text} at (7,214) size 24x25
+                text run at (7,214) width 24: "\x{FFFC}"
+            RenderText {#text} at (7,238) size 24x25
+              text run at (7,238) width 24: "\x{65E5}"
           RenderInline {SPAN} at (0,0) size 209x576
             RenderText {#text} at (15,0) size 209x576
               text run at (15,0) width 320: "\x{305D}\x{306E}\x{5973}\x{304C}\x{306D}\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}\x{3001}\x{308F}\x{305F}"
-              text run at (63,0) width 320: "\x{3057}\x{306F}\x{3051}\x{3063}\x{3057}\x{3066}\x{306D}\x{3069}\x{3053}\x{306B}\x{306F}\x{306F}\x{3044}\x{3089}\x{306A}\x{304B}\x{3063}\x{305F}\x{3002}\x{51AC}"
-              text run at (111,0) width 576: "\x{306E}\x{3042}\x{3089}\x{3057}\x{304C}\x{3060}\x{3093}\x{3054}\x{306E}\x{3088}\x{3046}\x{306A}\x{96EA}\x{3092}\x{3075}\x{304D}\x{3064}\x{3051}\x{3066}\x{7A93}\x{30AC}\x{30E9}\x{30B9}\x{3092}\x{767D}\x{304F}\x{3059}\x{308B}\x{3058}\x{3076}\x{3093}\x{306B}\x{306A}\x{308B}\x{3068}\x{3001}"
-              text run at (159,0) width 576: "\x{3053}\x{306E}\x{5973}\x{306E}\x{4EBA}\x{306F}\x{4E21}\x{624B}\x{306E}\x{9593}\x{306B}\x{308F}\x{305F}\x{3057}\x{306E}\x{8DB3}\x{3092}\x{304A}\x{3055}\x{3048}\x{3066}\x{3001}\x{6B4C}\x{3092}\x{6B4C}\x{3044}\x{306A}\x{304C}\x{3089}\x{6696}\x{3081}\x{3066}\x{304F}\x{308C}\x{305F}\x{3002}"
-              text run at (207,0) width 320: "\x{305D}\x{306E}\x{6B4C}\x{306E}\x{7BC0}\x{3082}\x{6587}\x{53E5}\x{3082}\x{3001}\x{3044}\x{307E}\x{306B}\x{5FD8}\x{308C}\x{305A}\x{306B}\x{3044}\x{308B}\x{3002}"
+              text run at (63,0) width 576: "\x{3057}\x{306F}\x{3051}\x{3063}\x{3057}\x{3066}\x{306D}\x{3069}\x{3053}\x{306B}\x{306F}\x{306F}\x{3044}\x{3089}\x{306A}\x{304B}\x{3063}\x{305F}\x{3002}\x{51AC}\x{306E}\x{3042}\x{3089}\x{3057}\x{304C}\x{3060}\x{3093}\x{3054}\x{306E}\x{3088}\x{3046}\x{306A}\x{96EA}\x{3092}\x{3075}\x{304D}"
+              text run at (111,0) width 576: "\x{3064}\x{3051}\x{3066}\x{7A93}\x{30AC}\x{30E9}\x{30B9}\x{3092}\x{767D}\x{304F}\x{3059}\x{308B}\x{3058}\x{3076}\x{3093}\x{306B}\x{306A}\x{308B}\x{3068}\x{3001}\x{3053}\x{306E}\x{5973}\x{306E}\x{4EBA}\x{306F}\x{4E21}\x{624B}\x{306E}\x{9593}\x{306B}\x{308F}\x{305F}\x{3057}\x{306E}\x{8DB3}"
+              text run at (159,0) width 576: "\x{3092}\x{304A}\x{3055}\x{3048}\x{3066}\x{3001}\x{6B4C}\x{3092}\x{6B4C}\x{3044}\x{306A}\x{304C}\x{3089}\x{6696}\x{3081}\x{3066}\x{304F}\x{308C}\x{305F}\x{3002}\x{305D}\x{306E}\x{6B4C}\x{306E}\x{7BC0}\x{3082}\x{6587}\x{53E5}\x{3082}\x{3001}\x{3044}\x{307E}\x{306B}\x{5FD8}\x{308C}\x{305A}"
+              text run at (207,0) width 64: "\x{306B}\x{3044}\x{308B}\x{3002}"
           RenderText {#text} at (0,0) size 0x0
       RenderBlock (anonymous) at (623,0) size 0x584
         RenderInline {SPAN} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac/fast/text/tatechuyoko-expected.txt (192041 => 192042)


--- trunk/LayoutTests/platform/mac/fast/text/tatechuyoko-expected.txt	2015-11-05 00:01:43 UTC (rev 192041)
+++ trunk/LayoutTests/platform/mac/fast/text/tatechuyoko-expected.txt	2015-11-05 00:26:26 UTC (rev 192042)
@@ -18,6 +18,6 @@
         RenderInline {SPAN} at (0,0) size 18x16
           RenderCombineText {#text} at (2,256) size 18x16
             text run at (2,256) width 16: "\x{FFFC}"
-        RenderText {#text} at (2,272) size 40x560
-          text run at (2,272) width 288: "\x{FF0C}\x{800C}\x{79D1}\x{689D}\x{5DDE}\x{90E1}\x{8CA1}\x{8CE6}\x{4E4B}\x{985E}\x{FF0C}\x{6B64}\x{56FA}\x{70BA}\x{6CBB}\x{4E4B}\x{5177}\x{3002}"
-          text run at (24,0) width 304: "\x{7136}\x{65BD}\x{4E4B}\x{7576}\x{6709}\x{6B21}\x{7B2C}\x{3002}\x{4ECA}\x{65E5}\x{5148}\x{52D9}\x{FF0C}\x{6050}\x{7576}\x{555F}\x{8FEA}\x{4E3B}\x{5FC3}"
+        RenderText {#text} at (2,272) size 40x576
+          text run at (2,272) width 304: "\x{FF0C}\x{800C}\x{79D1}\x{689D}\x{5DDE}\x{90E1}\x{8CA1}\x{8CE6}\x{4E4B}\x{985E}\x{FF0C}\x{6B64}\x{56FA}\x{70BA}\x{6CBB}\x{4E4B}\x{5177}\x{3002}\x{7136}"
+          text run at (24,0) width 288: "\x{65BD}\x{4E4B}\x{7576}\x{6709}\x{6B21}\x{7B2C}\x{3002}\x{4ECA}\x{65E5}\x{5148}\x{52D9}\x{FF0C}\x{6050}\x{7576}\x{555F}\x{8FEA}\x{4E3B}\x{5FC3}"

Modified: trunk/LayoutTests/platform/mac-mavericks/fast/text/international/text-combine-image-test-expected.txt (192041 => 192042)


--- trunk/LayoutTests/platform/mac-mavericks/fast/text/international/text-combine-image-test-expected.txt	2015-11-05 00:01:43 UTC (rev 192041)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/text/international/text-combine-image-test-expected.txt	2015-11-05 00:26:26 UTC (rev 192042)
@@ -98,7 +98,7 @@
       RenderBlock (anonymous) at (320,0) size 274x584
         RenderBlock {HR} at (0,0) size 2x584 [border: (1px inset #000000)]
         RenderBlock {P} at (34,0) size 240x584
-          RenderBlock (floating) {SPAN} at (0,320) size 74x264 [border: (1px solid #FF0000)]
+          RenderBlock (floating) {SPAN} at (0,320) size 38x264 [border: (1px solid #FF0000)]
             RenderText {#text} at (7,1) size 24x118
               text run at (7,1) width 118: "float:right:"
             RenderInline {SPAN} at (0,0) size 24x25
@@ -109,20 +109,20 @@
             RenderInline {SPAN} at (0,0) size 24x25
               RenderCombineText {#text} at (7,166) size 24x25
                 text run at (7,166) width 24: "\x{FFFC}"
-            RenderText {#text} at (43,1) size 24x24
-              text run at (43,1) width 24: "\x{6708}"
-            RenderInline {SPAN} at (0,0) size 24x24
-              RenderCombineText {#text} at (43,25) size 24x24
-                text run at (43,25) width 24: "\x{FFFC}"
-            RenderText {#text} at (43,49) size 24x24
-              text run at (43,49) width 24: "\x{65E5}"
+            RenderText {#text} at (7,190) size 24x25
+              text run at (7,190) width 24: "\x{6708}"
+            RenderInline {SPAN} at (0,0) size 24x25
+              RenderCombineText {#text} at (7,214) size 24x25
+                text run at (7,214) width 24: "\x{FFFC}"
+            RenderText {#text} at (7,238) size 24x25
+              text run at (7,238) width 24: "\x{65E5}"
           RenderInline {SPAN} at (0,0) size 209x576
             RenderText {#text} at (15,0) size 209x576
               text run at (15,0) width 320: "\x{305D}\x{306E}\x{5973}\x{304C}\x{306D}\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}\x{3001}\x{308F}\x{305F}"
-              text run at (63,0) width 320: "\x{3057}\x{306F}\x{3051}\x{3063}\x{3057}\x{3066}\x{306D}\x{3069}\x{3053}\x{306B}\x{306F}\x{306F}\x{3044}\x{3089}\x{306A}\x{304B}\x{3063}\x{305F}\x{3002}\x{51AC}"
-              text run at (111,0) width 576: "\x{306E}\x{3042}\x{3089}\x{3057}\x{304C}\x{3060}\x{3093}\x{3054}\x{306E}\x{3088}\x{3046}\x{306A}\x{96EA}\x{3092}\x{3075}\x{304D}\x{3064}\x{3051}\x{3066}\x{7A93}\x{30AC}\x{30E9}\x{30B9}\x{3092}\x{767D}\x{304F}\x{3059}\x{308B}\x{3058}\x{3076}\x{3093}\x{306B}\x{306A}\x{308B}\x{3068}\x{3001}"
-              text run at (159,0) width 576: "\x{3053}\x{306E}\x{5973}\x{306E}\x{4EBA}\x{306F}\x{4E21}\x{624B}\x{306E}\x{9593}\x{306B}\x{308F}\x{305F}\x{3057}\x{306E}\x{8DB3}\x{3092}\x{304A}\x{3055}\x{3048}\x{3066}\x{3001}\x{6B4C}\x{3092}\x{6B4C}\x{3044}\x{306A}\x{304C}\x{3089}\x{6696}\x{3081}\x{3066}\x{304F}\x{308C}\x{305F}\x{3002}"
-              text run at (207,0) width 320: "\x{305D}\x{306E}\x{6B4C}\x{306E}\x{7BC0}\x{3082}\x{6587}\x{53E5}\x{3082}\x{3001}\x{3044}\x{307E}\x{306B}\x{5FD8}\x{308C}\x{305A}\x{306B}\x{3044}\x{308B}\x{3002}"
+              text run at (63,0) width 576: "\x{3057}\x{306F}\x{3051}\x{3063}\x{3057}\x{3066}\x{306D}\x{3069}\x{3053}\x{306B}\x{306F}\x{306F}\x{3044}\x{3089}\x{306A}\x{304B}\x{3063}\x{305F}\x{3002}\x{51AC}\x{306E}\x{3042}\x{3089}\x{3057}\x{304C}\x{3060}\x{3093}\x{3054}\x{306E}\x{3088}\x{3046}\x{306A}\x{96EA}\x{3092}\x{3075}\x{304D}"
+              text run at (111,0) width 576: "\x{3064}\x{3051}\x{3066}\x{7A93}\x{30AC}\x{30E9}\x{30B9}\x{3092}\x{767D}\x{304F}\x{3059}\x{308B}\x{3058}\x{3076}\x{3093}\x{306B}\x{306A}\x{308B}\x{3068}\x{3001}\x{3053}\x{306E}\x{5973}\x{306E}\x{4EBA}\x{306F}\x{4E21}\x{624B}\x{306E}\x{9593}\x{306B}\x{308F}\x{305F}\x{3057}\x{306E}\x{8DB3}"
+              text run at (159,0) width 576: "\x{3092}\x{304A}\x{3055}\x{3048}\x{3066}\x{3001}\x{6B4C}\x{3092}\x{6B4C}\x{3044}\x{306A}\x{304C}\x{3089}\x{6696}\x{3081}\x{3066}\x{304F}\x{308C}\x{305F}\x{3002}\x{305D}\x{306E}\x{6B4C}\x{306E}\x{7BC0}\x{3082}\x{6587}\x{53E5}\x{3082}\x{3001}\x{3044}\x{307E}\x{306B}\x{5FD8}\x{308C}\x{305A}"
+              text run at (207,0) width 64: "\x{306B}\x{3044}\x{308B}\x{3002}"
           RenderText {#text} at (0,0) size 0x0
       RenderBlock (anonymous) at (626,0) size 0x584
         RenderInline {SPAN} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac-mavericks/fast/text/tatechuyoko-expected.txt (192041 => 192042)


--- trunk/LayoutTests/platform/mac-mavericks/fast/text/tatechuyoko-expected.txt	2015-11-05 00:01:43 UTC (rev 192041)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/text/tatechuyoko-expected.txt	2015-11-05 00:26:26 UTC (rev 192042)
@@ -18,6 +18,6 @@
         RenderInline {SPAN} at (0,0) size 18x16
           RenderCombineText {#text} at (3,256) size 18x16
             text run at (3,256) width 16: "\x{FFFC}"
-        RenderText {#text} at (3,272) size 42x560
-          text run at (3,272) width 288: "\x{FF0C}\x{800C}\x{79D1}\x{689D}\x{5DDE}\x{90E1}\x{8CA1}\x{8CE6}\x{4E4B}\x{985E}\x{FF0C}\x{6B64}\x{56FA}\x{70BA}\x{6CBB}\x{4E4B}\x{5177}\x{3002}"
-          text run at (27,0) width 304: "\x{7136}\x{65BD}\x{4E4B}\x{7576}\x{6709}\x{6B21}\x{7B2C}\x{3002}\x{4ECA}\x{65E5}\x{5148}\x{52D9}\x{FF0C}\x{6050}\x{7576}\x{555F}\x{8FEA}\x{4E3B}\x{5FC3}"
+        RenderText {#text} at (3,272) size 42x576
+          text run at (3,272) width 304: "\x{FF0C}\x{800C}\x{79D1}\x{689D}\x{5DDE}\x{90E1}\x{8CA1}\x{8CE6}\x{4E4B}\x{985E}\x{FF0C}\x{6B64}\x{56FA}\x{70BA}\x{6CBB}\x{4E4B}\x{5177}\x{3002}\x{7136}"
+          text run at (27,0) width 288: "\x{65BD}\x{4E4B}\x{7576}\x{6709}\x{6B21}\x{7B2C}\x{3002}\x{4ECA}\x{65E5}\x{5148}\x{52D9}\x{FF0C}\x{6050}\x{7576}\x{555F}\x{8FEA}\x{4E3B}\x{5FC3}"

Modified: trunk/Source/WebCore/ChangeLog (192041 => 192042)


--- trunk/Source/WebCore/ChangeLog	2015-11-05 00:01:43 UTC (rev 192041)
+++ trunk/Source/WebCore/ChangeLog	2015-11-05 00:26:26 UTC (rev 192042)
@@ -1,3 +1,17 @@
+2015-11-03  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Ruby base ending in tatechuyoko forces a line break before the tatechuyoko
+        https://bugs.webkit.org/show_bug.cgi?id=150883
+
+        Reviewed by Darin Adler.
+
+        Asking the width of a 0-length tatechuyoko should return 0.
+
+        Test: fast/text/ruby-tatechuyoko.html
+
+        * rendering/RenderCombineText.cpp:
+        (WebCore::RenderCombineText::width):
+
 2015-11-04  Tim Horton  <timothy_hor...@apple.com>
 
         Update the name of a Mail class that we hardcode

Modified: trunk/Source/WebCore/rendering/RenderCombineText.cpp (192041 => 192042)


--- trunk/Source/WebCore/rendering/RenderCombineText.cpp	2015-11-05 00:01:43 UTC (rev 192041)
+++ trunk/Source/WebCore/rendering/RenderCombineText.cpp	2015-11-05 00:26:26 UTC (rev 192042)
@@ -61,7 +61,7 @@
 float RenderCombineText::width(unsigned from, unsigned length, const FontCascade& font, float xPosition, HashSet<const Font*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
 {
     if (m_isCombined)
-        return font.size();
+        return !length ? 0 : font.size();
 
     return RenderText::width(from, length, font, xPosition, fallbackFonts, glyphOverflow);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to