Title: [192428] branches/safari-601.1.46-branch

Diff

Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (192427 => 192428)


--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2015-11-13 17:03:43 UTC (rev 192427)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2015-11-13 17:03:47 UTC (rev 192428)
@@ -1,5 +1,19 @@
 2015-11-13  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r192120. rdar://problem/23189774
+
+    2015-11-06  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+            REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
+            https://bugs.webkit.org/show_bug.cgi?id=150923
+
+            Reviewed by Zalan Bujtas.
+
+            * fast/text/ruby-justify-tatechuyoko-expected.html: Added.
+            * fast/text/ruby-justify-tatechuyoko.html: Added.
+
+2015-11-13  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r192042. rdar://problem/23189765
 
     2015-11-03  Myles C. Maxfield  <mmaxfi...@apple.com>

Added: branches/safari-601.1.46-branch/LayoutTests/fast/text/ruby-justify-tatechuyoko-expected.html (0 => 192428)


--- branches/safari-601.1.46-branch/LayoutTests/fast/text/ruby-justify-tatechuyoko-expected.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/text/ruby-justify-tatechuyoko-expected.html	2015-11-13 17:03:47 UTC (rev 192428)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+</head>
+<body>
+This test makes sure that tatechuyoko which directly follows ruby is properly left-aligned.
+<div style="text-align: justify; max-height: 7em; font-size: 40px; -webkit-writing-mode: vertical-rl;" lang="ja">この文章<span style="-webkit-text-combine: horizontal;">99</span>は斜下付サンプルです。</div>
+</body>
+</html>
Property changes on: branches/safari-601.1.46-branch/LayoutTests/fast/text/ruby-justify-tatechuyoko-expected.html
___________________________________________________________________

Added: svn:executable

Added: branches/safari-601.1.46-branch/LayoutTests/fast/text/ruby-justify-tatechuyoko.html (0 => 192428)


--- branches/safari-601.1.46-branch/LayoutTests/fast/text/ruby-justify-tatechuyoko.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/text/ruby-justify-tatechuyoko.html	2015-11-13 17:03:47 UTC (rev 192428)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+</head>
+<body>
+This test makes sure that tatechuyoko which directly follows ruby is properly left-aligned.
+<div style="text-align: justify; max-height: 7em; font-size: 40px; -webkit-writing-mode: vertical-rl;" lang="ja">この<ruby>文章<rt style="color: white;">ルビ</rt></ruby><span style="-webkit-text-combine: horizontal;">99</span>は斜下付サンプルです。</div>
+</body>
+</html>
Property changes on: branches/safari-601.1.46-branch/LayoutTests/fast/text/ruby-justify-tatechuyoko.html
___________________________________________________________________

Added: svn:executable

Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (192427 => 192428)


--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-11-13 17:03:43 UTC (rev 192427)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-11-13 17:03:47 UTC (rev 192428)
@@ -1,5 +1,28 @@
 2015-11-13  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r192120. rdar://problem/23189774
+
+    2015-11-06  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+            REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
+            https://bugs.webkit.org/show_bug.cgi?id=150923
+
+            Reviewed by Zalan Bujtas.
+
+            Ever since r182286, expansion opportunities in justified ruby were moved to their neighboring
+            elements (thereby forbidding trailing nor leading expansions inside ruby). However, when the
+            neighboring element is tatechuyoko, we will erroneously honor the expansion opportunity inside
+            the tatechuyoko, thereby moving it horizontally.
+
+            Tatechuyoko should never have expansion opportunities inside it.
+
+            Test: fast/text/ruby-justify-tatechuyoko.html
+
+            * rendering/RenderBlockLineLayout.cpp:
+            (WebCore::expansionBehaviorForInlineTextBox):
+
+2015-11-13  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r192042. rdar://problem/23189765
 
     2015-11-03  Myles C. Maxfield  <mmaxfi...@apple.com>

Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (192427 => 192428)


--- branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2015-11-13 17:03:43 UTC (rev 192427)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2015-11-13 17:03:47 UTC (rev 192428)
@@ -720,12 +720,15 @@
 
 static inline ExpansionBehavior expansionBehaviorForInlineTextBox(RenderBlockFlow& block, InlineTextBox& textBox, BidiRun* previousRun, BidiRun* nextRun, ETextAlign textAlign, bool isAfterExpansion)
 {
+    // Tatechuyoko is modeled as the Object Replacement Character (U+FFFC), which can never have expansion opportunities inside nor intrinsically adjacent to it.
+    if (textBox.renderer().style().textCombine() == TextCombineHorizontal)
+        return ForbidLeadingExpansion | ForbidTrailingExpansion;
+
     ExpansionBehavior result = 0;
     bool setLeadingExpansion = false;
     bool setTrailingExpansion = false;
     if (textAlign == JUSTIFY) {
-        // If the next box is ruby, and we're justifying, and the first box in the ruby base has a leading expansion, and we are a text box, then
-        // force a trailing expansion.
+        // If the next box is ruby, and we're justifying, and the first box in the ruby base has a leading expansion, and we are a text box, then force a trailing expansion.
         if (nextRun && is<RenderRubyRun>(nextRun->renderer()) && downcast<RenderRubyRun>(nextRun->renderer()).rubyBase() && nextRun->renderer().style().collapseWhiteSpace()) {
             auto& rubyBase = *downcast<RenderRubyRun>(nextRun->renderer()).rubyBase();
             if (rubyBase.firstRootBox() && !rubyBase.firstRootBox()->nextRootBox()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to