Title: [139040] trunk
Revision
139040
Author
[email protected]
Date
2013-01-08 00:12:49 -0800 (Tue, 08 Jan 2013)

Log Message

Float block's logical top margin is illegal in vertical writing mode.
https://bugs.webkit.org/show_bug.cgi?id=96597

Patch by Yuki Sekiguchi <[email protected]> on 2013-01-08
Reviewed by Hajime Morita.

Source/WebCore:

flipFloatForWritingModeForChild() should use child->renderer()->width() not child->width() like horizontal writing mode.

Test: fast/writing-mode/vertical-float-margin.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::flipFloatForWritingModeForChild):

LayoutTests:

Specify margin to float block in vertical writing mode.

* fast/writing-mode/vertical-float-margin-expected.html: Added.
* fast/writing-mode/vertical-float-margin.html: Added.
* platform/chromium/TestExpectations: Add need rebaseline.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (139039 => 139040)


--- trunk/LayoutTests/ChangeLog	2013-01-08 07:53:05 UTC (rev 139039)
+++ trunk/LayoutTests/ChangeLog	2013-01-08 08:12:49 UTC (rev 139040)
@@ -1,3 +1,16 @@
+2013-01-08  Yuki Sekiguchi  <[email protected]>
+
+        Float block's logical top margin is illegal in vertical writing mode.
+        https://bugs.webkit.org/show_bug.cgi?id=96597
+
+        Reviewed by Hajime Morita.
+
+        Specify margin to float block in vertical writing mode.
+
+        * fast/writing-mode/vertical-float-margin-expected.html: Added.
+        * fast/writing-mode/vertical-float-margin.html: Added.
+        * platform/chromium/TestExpectations: Add need rebaseline.
+
 2013-01-07  Kent Tamura  <[email protected]>
 
         REGRESSION(r137406): Text inside an empty optgroup prevents subsequent options from appearing

Added: trunk/LayoutTests/fast/writing-mode/vertical-float-margin-expected.html (0 => 139040)


--- trunk/LayoutTests/fast/writing-mode/vertical-float-margin-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/vertical-float-margin-expected.html	2013-01-08 08:12:49 UTC (rev 139040)
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><body>
+  	There should be a blue block at the center of a black border.<br>
+<div style="border: solid 5px black; display: inline-block">
+  <div style="float: left; margin: 50px; width: 50px; height: 50px; background-color: blue;">
+  </div>
+</div>
+</body></html>

Added: trunk/LayoutTests/fast/writing-mode/vertical-float-margin.html (0 => 139040)


--- trunk/LayoutTests/fast/writing-mode/vertical-float-margin.html	                        (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/vertical-float-margin.html	2013-01-08 08:12:49 UTC (rev 139040)
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><body>
+	There should be a blue block at the center of a black border.
+<div style="-webkit-writing-mode: vertical-rl; border: solid 5px black">
+  <div style="float: left; margin: 50px; width: 50px; height: 50px; background-color: blue;">
+  </div>
+</div>
+</body></html>

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (139039 => 139040)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2013-01-08 07:53:05 UTC (rev 139039)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2013-01-08 08:12:49 UTC (rev 139040)
@@ -4302,3 +4302,7 @@
 webkit.org/b/106238 [ Win ] svg/dynamic-updates/SVGUseElement-svgdom-href1-prop.html [ ImageOnlyFailure Pass ]
 webkit.org/b/106249 [ Win ] fast/speech/scripted/navigate-away.html [ Failure Pass ]
 
+# Needs rebaseline. Reducing yellow box top margin is intentional. Looks good on Chromium Linux.
+webkit.org/b/96597 fast/multicol/vertical-rl/float-multicol.html [ Failure ImageOnlyFailure ]
+# Needs rebaseline. Current expectation is wrong because margin of body don't collapse with margin of 1st child.
+webkit.org/b/96597 fast/text/emphasis-vertical.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (139039 => 139040)


--- trunk/Source/WebCore/ChangeLog	2013-01-08 07:53:05 UTC (rev 139039)
+++ trunk/Source/WebCore/ChangeLog	2013-01-08 08:12:49 UTC (rev 139040)
@@ -1,3 +1,17 @@
+2013-01-08  Yuki Sekiguchi  <[email protected]>
+
+        Float block's logical top margin is illegal in vertical writing mode.
+        https://bugs.webkit.org/show_bug.cgi?id=96597
+
+        Reviewed by Hajime Morita.
+
+        flipFloatForWritingModeForChild() should use child->renderer()->width() not child->width() like horizontal writing mode.
+
+        Test: fast/writing-mode/vertical-float-margin.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::flipFloatForWritingModeForChild):
+
 2013-01-07  Kent Tamura  <[email protected]>
 
         REGRESSION(r137406): Text inside an empty optgroup prevents subsequent options from appearing

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (139039 => 139040)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2013-01-08 07:53:05 UTC (rev 139039)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2013-01-08 08:12:49 UTC (rev 139040)
@@ -3071,7 +3071,7 @@
     // case.
     if (isHorizontalWritingMode())
         return LayoutPoint(point.x(), point.y() + height() - child->renderer()->height() - 2 * yPositionForFloatIncludingMargin(child));
-    return LayoutPoint(point.x() + width() - child->width() - 2 * xPositionForFloatIncludingMargin(child), point.y());
+    return LayoutPoint(point.x() + width() - child->renderer()->width() - 2 * xPositionForFloatIncludingMargin(child), point.y());
 }
 
 void RenderBlock::paintFloats(PaintInfo& paintInfo, const LayoutPoint& paintOffset, bool preservePhase)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to