Title: [97794] trunk
Revision
97794
Author
[email protected]
Date
2011-10-18 15:14:00 -0700 (Tue, 18 Oct 2011)

Log Message

Certain column-rule styles render incorrectly in vertical writing modes
https://bugs.webkit.org/show_bug.cgi?id=70362

Reviewed by Darin Adler.

Source/WebCore: 

Test: fast/multicol/vertical-rl/rule-style.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintColumnRules): Use the correct border sides for vertical writing modes.

LayoutTests: 

* fast/multicol/vertical-rl/rule-style-expected.png: Added.
* fast/multicol/vertical-rl/rule-style-expected.txt: Added.
* fast/multicol/vertical-rl/rule-style.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (97793 => 97794)


--- trunk/LayoutTests/ChangeLog	2011-10-18 22:07:23 UTC (rev 97793)
+++ trunk/LayoutTests/ChangeLog	2011-10-18 22:14:00 UTC (rev 97794)
@@ -1,3 +1,14 @@
+2011-10-18  Dan Bernstein  <[email protected]>
+
+        Certain column-rule styles render incorrectly in vertical writing modes
+        https://bugs.webkit.org/show_bug.cgi?id=70362
+
+        Reviewed by Darin Adler.
+
+        * fast/multicol/vertical-rl/rule-style-expected.png: Added.
+        * fast/multicol/vertical-rl/rule-style-expected.txt: Added.
+        * fast/multicol/vertical-rl/rule-style.html: Added.
+
 2011-10-18  Gavin Barraclough  <[email protected]>
 
         Array.prototype methods missing exception checks

Added: trunk/LayoutTests/fast/multicol/vertical-rl/rule-style-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/fast/multicol/vertical-rl/rule-style-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/fast/multicol/vertical-rl/rule-style-expected.txt (0 => 97794)


--- trunk/LayoutTests/fast/multicol/vertical-rl/rule-style-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/vertical-rl/rule-style-expected.txt	2011-10-18 22:14:00 UTC (rev 97794)
@@ -0,0 +1,44 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderText {#text} at (186,20) size 18x4
+        text run at (186,20) width 4: " "
+      RenderText {#text} at (186,44) size 18x4
+        text run at (186,44) width 4: " "
+      RenderText {#text} at (186,68) size 18x4
+        text run at (186,68) width 4: " "
+      RenderText {#text} at (186,92) size 18x4
+        text run at (186,92) width 4: " "
+      RenderText {#text} at (186,116) size 18x4
+        text run at (186,116) width 4: " "
+      RenderText {#text} at (186,140) size 18x4
+        text run at (186,140) width 4: " "
+      RenderText {#text} at (186,164) size 18x4
+        text run at (186,164) width 4: " "
+      RenderText {#text} at (0,0) size 0x0
+layer at (592,8) size 200x20
+  RenderBlock {DIV} at (0,0) size 200x20
+    RenderBlock {DIV} at (0,0) size 400x2
+layer at (592,32) size 200x20
+  RenderBlock {DIV} at (0,24) size 200x20
+    RenderBlock {DIV} at (0,0) size 400x2
+layer at (592,56) size 200x20
+  RenderBlock {DIV} at (0,48) size 200x20
+    RenderBlock {DIV} at (0,0) size 400x2
+layer at (592,80) size 200x20
+  RenderBlock {DIV} at (0,72) size 200x20
+    RenderBlock {DIV} at (0,0) size 400x2
+layer at (592,104) size 200x20
+  RenderBlock {DIV} at (0,96) size 200x20
+    RenderBlock {DIV} at (0,0) size 400x2
+layer at (592,128) size 200x20
+  RenderBlock {DIV} at (0,120) size 200x20
+    RenderBlock {DIV} at (0,0) size 400x2
+layer at (592,152) size 200x20
+  RenderBlock {DIV} at (0,144) size 200x20
+    RenderBlock {DIV} at (0,0) size 400x2
+layer at (592,176) size 200x20
+  RenderBlock {DIV} at (0,168) size 200x20
+    RenderBlock {DIV} at (0,0) size 400x2

Added: trunk/LayoutTests/fast/multicol/vertical-rl/rule-style.html (0 => 97794)


--- trunk/LayoutTests/fast/multicol/vertical-rl/rule-style.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/vertical-rl/rule-style.html	2011-10-18 22:14:00 UTC (rev 97794)
@@ -0,0 +1,50 @@
+<style>
+    body {
+        -webkit-writing-mode: vertical-rl;
+    }
+
+    div.columns {
+        -webkit-columns: 2;
+        width: 200px;
+        height: 20px;
+        -webkit-column-rule-color: gray;
+        -webkit-column-rule-width: 12px;
+        display: inline-block;
+    }
+
+    div.columns div {
+        width: 400px;
+    }
+</style>
+
+<div class="columns" style="-webkit-column-rule-style: solid;">
+    <div></div>
+</div>
+
+<div class="columns" style="-webkit-column-rule-style: dotted;">
+    <div></div>
+</div>
+
+<div class="columns" style="-webkit-column-rule-style: dashed;">
+    <div></div>
+</div>
+
+<div class="columns" style="-webkit-column-rule-style: groove;">
+    <div></div>
+</div>
+
+<div class="columns" style="-webkit-column-rule-style: ridge;">
+    <div></div>
+</div>
+
+<div class="columns" style="-webkit-column-rule-style: inset;">
+    <div></div>
+</div>
+
+<div class="columns" style="-webkit-column-rule-style: outset;">
+    <div></div>
+</div>
+
+<div class="columns" style="-webkit-column-rule-style: double;">
+    <div></div>
+</div>

Modified: trunk/Source/WebCore/ChangeLog (97793 => 97794)


--- trunk/Source/WebCore/ChangeLog	2011-10-18 22:07:23 UTC (rev 97793)
+++ trunk/Source/WebCore/ChangeLog	2011-10-18 22:14:00 UTC (rev 97794)
@@ -1,3 +1,15 @@
+2011-10-18  Dan Bernstein  <[email protected]>
+
+        Certain column-rule styles render incorrectly in vertical writing modes
+        https://bugs.webkit.org/show_bug.cgi?id=70362
+
+        Reviewed by Darin Adler.
+
+        Test: fast/multicol/vertical-rl/rule-style.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintColumnRules): Use the correct border sides for vertical writing modes.
+
 2011-10-18  Anna Cavender  <[email protected]>
 
         Fix broken binding tests by changing G_MAXUSHORT to G_MAXUINT in WebKitDOMTestObj.cpp.

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (97793 => 97794)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-10-18 22:07:23 UTC (rev 97793)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-10-18 22:14:00 UTC (rev 97794)
@@ -2416,8 +2416,10 @@
             LayoutUnit ruleRight = isHorizontalWritingMode() ? ruleLeft + ruleWidth : ruleLeft + contentWidth();
             LayoutUnit ruleTop = isHorizontalWritingMode() ? paintOffset.y() + borderTop() + paddingTop() : paintOffset.y() + ruleLogicalLeft - ruleWidth / 2 + ruleAdd;
             LayoutUnit ruleBottom = isHorizontalWritingMode() ? ruleTop + contentHeight() : ruleTop + ruleWidth;
-            drawLineForBoxSide(paintInfo.context, ruleLeft, ruleTop, ruleRight, ruleBottom,
-                               style()->isLeftToRightDirection() ? BSLeft : BSRight, ruleColor, ruleStyle, 0, 0, antialias);
+            BoxSide side = isHorizontalWritingMode()
+                ? style()->isLeftToRightDirection() ? BSLeft : BSRight
+                : style()->isLeftToRightDirection() ? BSTop : BSBottom;
+            drawLineForBoxSide(paintInfo.context, ruleLeft, ruleTop, ruleRight, ruleBottom, side, ruleColor, ruleStyle, 0, 0, antialias);
         }
         
         ruleLogicalLeft = currLogicalLeftOffset;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to