Title: [192120] trunk
- Revision
- 192120
- Author
- [email protected]
- Date
- 2015-11-06 15:20:12 -0800 (Fri, 06 Nov 2015)
Log Message
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.
Source/WebCore:
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):
LayoutTests:
* fast/text/ruby-justify-tatechuyoko-expected.html: Added.
* fast/text/ruby-justify-tatechuyoko.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (192119 => 192120)
--- trunk/LayoutTests/ChangeLog 2015-11-06 20:58:17 UTC (rev 192119)
+++ trunk/LayoutTests/ChangeLog 2015-11-06 23:20:12 UTC (rev 192120)
@@ -1,3 +1,13 @@
+2015-11-06 Myles C. Maxfield <[email protected]>
+
+ 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-06 Ryan Haddad <[email protected]>
Marking fast/canvas/webgl/oes-texture-half-float-linear.html as flaky on mac
Added: trunk/LayoutTests/fast/text/ruby-justify-tatechuyoko-expected.html (0 => 192120)
--- trunk/LayoutTests/fast/text/ruby-justify-tatechuyoko-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/ruby-justify-tatechuyoko-expected.html 2015-11-06 23:20:12 UTC (rev 192120)
@@ -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: trunk/LayoutTests/fast/text/ruby-justify-tatechuyoko-expected.html
___________________________________________________________________
Added: svn:executable
Added: trunk/LayoutTests/fast/text/ruby-justify-tatechuyoko.html (0 => 192120)
--- trunk/LayoutTests/fast/text/ruby-justify-tatechuyoko.html (rev 0)
+++ trunk/LayoutTests/fast/text/ruby-justify-tatechuyoko.html 2015-11-06 23:20:12 UTC (rev 192120)
@@ -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: trunk/LayoutTests/fast/text/ruby-justify-tatechuyoko.html
___________________________________________________________________
Added: svn:executable
Modified: trunk/Source/WebCore/ChangeLog (192119 => 192120)
--- trunk/Source/WebCore/ChangeLog 2015-11-06 20:58:17 UTC (rev 192119)
+++ trunk/Source/WebCore/ChangeLog 2015-11-06 23:20:12 UTC (rev 192120)
@@ -1,3 +1,22 @@
+2015-11-06 Myles C. Maxfield <[email protected]>
+
+ 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-06 Mario Sanchez Prada <[email protected]>
Layout Test accessibility/win/linked-elements.html is crashing on win debug
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (192119 => 192120)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2015-11-06 20:58:17 UTC (rev 192119)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2015-11-06 23:20:12 UTC (rev 192120)
@@ -717,12 +717,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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes