Title: [145451] trunk
- Revision
- 145451
- Author
- commit-qu...@webkit.org
- Date
- 2013-03-11 18:12:11 -0700 (Mon, 11 Mar 2013)
Log Message
Ruby text is incorrectly positioned when its writing-mode is changed to vertical after layout is done
https://bugs.webkit.org/show_bug.cgi?id=96592
Patch by Yuki Sekiguchi <yuki.sekigu...@access-company.com> on 2013-03-11
Reviewed by Hajime Morrita.
Source/WebCore:
Fixed logical left of RenderRubyText is not cleared.
This causes trouble when RenderRubyTest is laid out vertically after horizontally.
Horizontal layout set logical top(== y).
Vertical layout don't set logical left(== y).
RenderRubyText::y remain old one.
We clear old RenderRubyText::y at the first part of layout().
Test: fast/writing-mode/ruby-text-logical-left.html
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::layout): Reset logicalLeft not to reuse old one.
LayoutTests:
* fast/writing-mode/ruby-text-logical-left-expected.html: Added.
* fast/writing-mode/ruby-text-logical-left.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (145450 => 145451)
--- trunk/LayoutTests/ChangeLog 2013-03-12 01:10:35 UTC (rev 145450)
+++ trunk/LayoutTests/ChangeLog 2013-03-12 01:12:11 UTC (rev 145451)
@@ -1,3 +1,13 @@
+2013-03-11 Yuki Sekiguchi <yuki.sekigu...@access-company.com>
+
+ Ruby text is incorrectly positioned when its writing-mode is changed to vertical after layout is done
+ https://bugs.webkit.org/show_bug.cgi?id=96592
+
+ Reviewed by Hajime Morrita.
+
+ * fast/writing-mode/ruby-text-logical-left-expected.html: Added.
+ * fast/writing-mode/ruby-text-logical-left.html: Added.
+
2013-03-11 Lamarque V. Souza <lamarque.so...@basyskom.com>
[css3-text] Add partial parsing support for text-underline-position property from CSS3 Text
Added: trunk/LayoutTests/fast/writing-mode/ruby-text-logical-left-expected.html (0 => 145451)
--- trunk/LayoutTests/fast/writing-mode/ruby-text-logical-left-expected.html (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/ruby-text-logical-left-expected.html 2013-03-12 01:12:11 UTC (rev 145451)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ ruby { border: solid 5px cyan; }
+ .vert { -webkit-writing-mode: vertical-rl; }
+ </style>
+ </head>
+ <body>
+ Ruby text should be at the center of ruby base.
+ <div class="vert">
+ <ruby>aaaaa<rt>b</rt></ruby><br>
+ </div>
+ <hr>
+ <div class="vert">
+ <ruby>a<rt>bbbb</rt></ruby><br>
+ </div>
+ <hr>
+ <div>
+ <ruby>aaaaa<rt>b</rt></ruby><br>
+ </div>
+ <hr>
+ <div>
+ <ruby>a<rt>bbbb</rt></ruby><br>
+ </div>
+ </body>
+</html>
Added: trunk/LayoutTests/fast/writing-mode/ruby-text-logical-left.html (0 => 145451)
--- trunk/LayoutTests/fast/writing-mode/ruby-text-logical-left.html (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/ruby-text-logical-left.html 2013-03-12 01:12:11 UTC (rev 145451)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ ruby { border: solid 5px cyan; }
+ </style>
+ </head>
+ <body>
+ Ruby text should be at the center of ruby base.
+ <div id="test1" >
+ <ruby>aaaaa<rt>b</rt></ruby><br>
+ </div>
+ <hr>
+ <div id="test2" >
+ <ruby>a<rt>bbbb</rt></ruby><br>
+ </div>
+ <hr>
+ <div id="test3" style="-webkit-writing-mode: vertical-rl;">
+ <ruby>aaaaa<rt>b</rt></ruby><br>
+ </div>
+ <hr>
+ <div id="test4" style="-webkit-writing-mode: vertical-rl;">
+ <ruby>a<rt>bbbb</rt></ruby><br>
+ </div>
+ <script>
+ setTimeout(function () {
+ var verticalElement = document.getElementById("test1");
+ verticalElement.setAttribute("style", "-webkit-writing-mode: vertical-rl;");
+ verticalElement = document.getElementById("test2");
+ verticalElement.setAttribute("style", "-webkit-writing-mode: vertical-rl;");
+ var horizontalElement = document.getElementById("test3");
+ horizontalElement.setAttribute("style", "");
+ horizontalElement = document.getElementById("test4");
+ horizontalElement.setAttribute("style", "");
+ if (window.testRunner) {
+ testRunner.notifyDone();
+ }
+ }, 0);
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ }
+ </script>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (145450 => 145451)
--- trunk/Source/WebCore/ChangeLog 2013-03-12 01:10:35 UTC (rev 145450)
+++ trunk/Source/WebCore/ChangeLog 2013-03-12 01:12:11 UTC (rev 145451)
@@ -1,3 +1,23 @@
+2013-03-11 Yuki Sekiguchi <yuki.sekigu...@access-company.com>
+
+ Ruby text is incorrectly positioned when its writing-mode is changed to vertical after layout is done
+ https://bugs.webkit.org/show_bug.cgi?id=96592
+
+ Reviewed by Hajime Morrita.
+
+ Fixed logical left of RenderRubyText is not cleared.
+
+ This causes trouble when RenderRubyTest is laid out vertically after horizontally.
+ Horizontal layout set logical top(== y).
+ Vertical layout don't set logical left(== y).
+ RenderRubyText::y remain old one.
+ We clear old RenderRubyText::y at the first part of layout().
+
+ Test: fast/writing-mode/ruby-text-logical-left.html
+
+ * rendering/RenderRubyRun.cpp:
+ (WebCore::RenderRubyRun::layout): Reset logicalLeft not to reuse old one.
+
2013-03-11 Lamarque V. Souza <lamarque.so...@basyskom.com>
[css3-text] Add partial parsing support for text-underline-position property from CSS3 Text
Modified: trunk/Source/WebCore/rendering/RenderRubyRun.cpp (145450 => 145451)
--- trunk/Source/WebCore/rendering/RenderRubyRun.cpp 2013-03-12 01:10:35 UTC (rev 145450)
+++ trunk/Source/WebCore/rendering/RenderRubyRun.cpp 2013-03-12 01:12:11 UTC (rev 145451)
@@ -233,11 +233,13 @@
{
RenderBlock::layout();
- // Place the RenderRubyText such that its bottom is flush with the lineTop of the first line of the RenderRubyBase.
RenderRubyText* rt = rubyText();
if (!rt)
return;
+
+ rt->setLogicalLeft(0);
+ // Place the RenderRubyText such that its bottom is flush with the lineTop of the first line of the RenderRubyBase.
LayoutUnit lastLineRubyTextBottom = rt->logicalHeight();
LayoutUnit firstLineRubyTextTop = 0;
RootInlineBox* rootBox = rt->lastRootBox();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes