Title: [163469] trunk
- Revision
- 163469
- Author
- [email protected]
- Date
- 2014-02-05 13:15:42 -0800 (Wed, 05 Feb 2014)
Log Message
Ruby base oddly justify its text when the text is ideograph and it contains <br> on Mac.
https://bugs.webkit.org/show_bug.cgi?id=106417
Patch by Yuki Sekiguchi <[email protected]> on 2014-02-05
Reviewed by David Hyatt.
Source/WebCore:
Ruby base always justify even if a line have hard break.
Even if next leaf child is line break, InlineTextBox allow trailing expansion.
This make <br> expanded, and there is odd space at the end of the line.
Test: fast/text/ruby-justification-br.html
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::expansionBehavior):
- If next leaf child is line break, we should forbid trailing expansion.
LayoutTests:
Test that <br> don't change justification behavior in ruby base.
* fast/text/ruby-justification-br-expected.html: Added.
* fast/text/ruby-justification-br.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (163468 => 163469)
--- trunk/LayoutTests/ChangeLog 2014-02-05 21:04:16 UTC (rev 163468)
+++ trunk/LayoutTests/ChangeLog 2014-02-05 21:15:42 UTC (rev 163469)
@@ -1,3 +1,15 @@
+2014-02-05 Yuki Sekiguchi <[email protected]>
+
+ Ruby base oddly justify its text when the text is ideograph and it contains <br> on Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=106417
+
+ Reviewed by David Hyatt.
+
+ Test that <br> don't change justification behavior in ruby base.
+
+ * fast/text/ruby-justification-br-expected.html: Added.
+ * fast/text/ruby-justification-br.html: Added.
+
2014-02-05 Yoav Weiss <[email protected]>
Fix srcset change test flakiness
Added: trunk/LayoutTests/fast/text/ruby-justification-br-expected.html (0 => 163469)
--- trunk/LayoutTests/fast/text/ruby-justification-br-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/ruby-justification-br-expected.html 2014-02-05 21:15:42 UTC (rev 163469)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<head><meta charset="UTF-8"></head>
+<body>
+<ruby>ああ<rt>aaaaaaaaaaaaaaaaaaaaaaaaaaa</ruby>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/ruby-justification-br.html (0 => 163469)
--- trunk/LayoutTests/fast/text/ruby-justification-br.html (rev 0)
+++ trunk/LayoutTests/fast/text/ruby-justification-br.html 2014-02-05 21:15:42 UTC (rev 163469)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<head><meta charset="UTF-8"></head>
+<body>
+<ruby>ああ<br><rt>aaaaaaaaaaaaaaaaaaaaaaaaaaa</ruby>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (163468 => 163469)
--- trunk/Source/WebCore/ChangeLog 2014-02-05 21:04:16 UTC (rev 163468)
+++ trunk/Source/WebCore/ChangeLog 2014-02-05 21:15:42 UTC (rev 163469)
@@ -1,3 +1,20 @@
+2014-02-05 Yuki Sekiguchi <[email protected]>
+
+ Ruby base oddly justify its text when the text is ideograph and it contains <br> on Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=106417
+
+ Reviewed by David Hyatt.
+
+ Ruby base always justify even if a line have hard break.
+ Even if next leaf child is line break, InlineTextBox allow trailing expansion.
+ This make <br> expanded, and there is odd space at the end of the line.
+
+ Test: fast/text/ruby-justification-br.html
+
+ * rendering/InlineTextBox.h:
+ (WebCore::InlineTextBox::expansionBehavior):
+ - If next leaf child is line break, we should forbid trailing expansion.
+
2014-02-05 Andreas Kling <[email protected]>
FrameLoader::stateMachine() should return a reference.
Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (163468 => 163469)
--- trunk/Source/WebCore/rendering/InlineTextBox.h 2014-02-05 21:04:16 UTC (rev 163468)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h 2014-02-05 21:15:42 UTC (rev 163469)
@@ -179,7 +179,7 @@
TextRun::ExpansionBehavior expansionBehavior() const
{
return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : TextRun::ForbidLeadingExpansion)
- | (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion);
+ | (expansion() && nextLeafChild() && !nextLeafChild()->isLineBreak() ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion);
}
void behavesLikeText() const = delete;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes