Column rules positioned incorrectly in vertical-rl block with horizontal border or...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Oct 2011 18:03:16 +0000 (18:03 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Oct 2011 18:03:16 +0000 (18:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=70622

Reviewed by Beth Dakin.

Source/WebCore:

Tests: fast/multicol/vertical-lr/rules-with-border-before.html
       fast/multicol/vertical-rl/rules-with-border-before.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintColumnRules): Changed to use the physical left border and padding for the
left edge of the horizontal column rule.

LayoutTests:

* fast/multicol/vertical-lr/rules-with-border-before-expected.png: Added.
* fast/multicol/vertical-lr/rules-with-border-before-expected.txt: Added.
* fast/multicol/vertical-lr/rules-with-border-before.html: Added.
* fast/multicol/vertical-rl/rules-with-border-before-expected.png: Added.
* fast/multicol/vertical-rl/rules-with-border-before-expected.txt: Added.
* fast/multicol/vertical-rl/rules-with-border-before.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98115 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/multicol/vertical-lr/rules-with-border-before-expected.png [new file with mode: 0644]
LayoutTests/fast/multicol/vertical-lr/rules-with-border-before-expected.txt [new file with mode: 0644]
LayoutTests/fast/multicol/vertical-lr/rules-with-border-before.html [new file with mode: 0644]
LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.png [new file with mode: 0644]
LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.txt [new file with mode: 0644]
LayoutTests/fast/multicol/vertical-rl/rules-with-border-before.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp

index a743794897fc881a3de7943e65296369413cc9dc..6184e940e7981fdaef9e0a8cfd7defc73f1b85b6 100644 (file)
@@ -1,3 +1,17 @@
+2011-10-21  Dan Bernstein  <mitz@apple.com>
+
+        Column rules positioned incorrectly in vertical-rl block with horizontal border or padding
+        https://bugs.webkit.org/show_bug.cgi?id=70622
+
+        Reviewed by Beth Dakin.
+
+        * fast/multicol/vertical-lr/rules-with-border-before-expected.png: Added.
+        * fast/multicol/vertical-lr/rules-with-border-before-expected.txt: Added.
+        * fast/multicol/vertical-lr/rules-with-border-before.html: Added.
+        * fast/multicol/vertical-rl/rules-with-border-before-expected.png: Added.
+        * fast/multicol/vertical-rl/rules-with-border-before-expected.txt: Added.
+        * fast/multicol/vertical-rl/rules-with-border-before.html: Added.
+
 2011-10-21  Elliot Poger  <epoger@google.com>
 
         re-enable layout tests against chromium-mac-snowleopard (Skia) baselines
diff --git a/LayoutTests/fast/multicol/vertical-lr/rules-with-border-before-expected.png b/LayoutTests/fast/multicol/vertical-lr/rules-with-border-before-expected.png
new file mode 100644 (file)
index 0000000..dfd2676
Binary files /dev/null and b/LayoutTests/fast/multicol/vertical-lr/rules-with-border-before-expected.png differ
diff --git a/LayoutTests/fast/multicol/vertical-lr/rules-with-border-before-expected.txt b/LayoutTests/fast/multicol/vertical-lr/rules-with-border-before-expected.txt
new file mode 100644 (file)
index 0000000..b01b3f5
--- /dev/null
@@ -0,0 +1,11 @@
+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
+layer at (8,8) size 150x100
+  RenderBlock {DIV} at (0,0) size 150x100 [border: (50px solid #0000FF)]
+    RenderBlock {DIV} at (50,0) size 200x25
+layer at (8,108) size 150x100
+  RenderBlock {DIV} at (0,100) size 150x100 [border: (50px solid #0000FF) none]
+    RenderBlock {DIV} at (0,0) size 200x25
diff --git a/LayoutTests/fast/multicol/vertical-lr/rules-with-border-before.html b/LayoutTests/fast/multicol/vertical-lr/rules-with-border-before.html
new file mode 100644 (file)
index 0000000..f3a8bfc
--- /dev/null
@@ -0,0 +1,16 @@
+<style>
+    div.test {
+        -webkit-writing-mode: vertical-lr;
+        -webkit-columns: 2;
+        width: 100px;
+        -webkit-column-rule-style: solid;
+        -webkit-column-rule-width: 50px;
+        -webkit-column-rule-color: orange;
+        -webkit-column-gap: 50px;
+        height: 100px;
+    }
+
+    div.test div { width: 200px; }
+</style>
+<div class="test" style="-webkit-border-before: 50px solid blue;"><div></div></div>
+<div class="test" style="-webkit-border-after: 50px solid blue;"><div></div></div>
diff --git a/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.png b/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.png
new file mode 100644 (file)
index 0000000..a0e513d
Binary files /dev/null and b/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.png differ
diff --git a/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.txt b/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before-expected.txt
new file mode 100644 (file)
index 0000000..b9c2a88
--- /dev/null
@@ -0,0 +1,11 @@
+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
+layer at (8,8) size 150x100
+  RenderBlock {DIV} at (0,0) size 150x100 [border: (50px solid #0000FF) none]
+    RenderBlock {DIV} at (50,0) size 200x25
+layer at (8,108) size 150x100
+  RenderBlock {DIV} at (0,100) size 150x100 [border: (50px solid #0000FF)]
+    RenderBlock {DIV} at (0,0) size 200x25
diff --git a/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before.html b/LayoutTests/fast/multicol/vertical-rl/rules-with-border-before.html
new file mode 100644 (file)
index 0000000..28abe62
--- /dev/null
@@ -0,0 +1,16 @@
+<style>
+    div.test {
+        -webkit-writing-mode: vertical-rl;
+        -webkit-columns: 2;
+        width: 100px;
+        -webkit-column-rule-style: solid;
+        -webkit-column-rule-width: 50px;
+        -webkit-column-rule-color: orange;
+        -webkit-column-gap: 50px;
+        height: 100px;
+    }
+
+    div.test div { width: 200px; }
+</style>
+<div class="test" style="-webkit-border-before: 50px solid blue;"><div></div></div>
+<div class="test" style="-webkit-border-after: 50px solid blue;"><div></div></div>
index fb50a5d76d22b94816f91af0e1b450e2ac99b75f..761425d6a8c362cd5adc1f39ae237288492ab894 100755 (executable)
@@ -1,3 +1,17 @@
+2011-10-21  Dan Bernstein  <mitz@apple.com>
+
+        Column rules positioned incorrectly in vertical-rl block with horizontal border or padding
+        https://bugs.webkit.org/show_bug.cgi?id=70622
+
+        Reviewed by Beth Dakin.
+
+        Tests: fast/multicol/vertical-lr/rules-with-border-before.html
+               fast/multicol/vertical-rl/rules-with-border-before.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintColumnRules): Changed to use the physical left border and padding for the
+        left edge of the horizontal column rule.
+
 2011-10-21  Simon Fraser  <simon.fraser@apple.com>
 
         Fix Windows build.
index 58e0f1f606b33533b1778095449637ab30a8fd99..0b4bc1ed24cf62e4bac5f52b16d09063fb27d1e4 100644 (file)
@@ -2412,7 +2412,7 @@ void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const LayoutPoint& pain
        
         // Now paint the column rule.
         if (i < colCount - 1) {
-            LayoutUnit ruleLeft = isHorizontalWritingMode() ? paintOffset.x() + ruleLogicalLeft - ruleWidth / 2 + ruleAdd : paintOffset.x() + borderBefore() + paddingBefore();
+            LayoutUnit ruleLeft = isHorizontalWritingMode() ? paintOffset.x() + ruleLogicalLeft - ruleWidth / 2 + ruleAdd : paintOffset.x() + borderLeft() + paddingLeft();
             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;