[CherryPick] To paint column-rules wider than column-gap
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2013 20:11:43 +0000 (20:11 +0000)
committerKyungTae Kim <kt@kt.(none)>
Wed, 22 May 2013 01:59:43 +0000 (10:59 +0900)
[Title] [CherryPick] To paint column-rules wider than column-gap
[Issue] TWEB-1032
[Problem] If column-rule-width > column-gap, the column-rule is not painted
[Cause] WebKit ignored column-rules wider than column-gap
[Solution] Cherry-pick the opensource patch.
[Cherry-Picker] KyungTae Kim <ktf.kim@samsung.com>

WebKit ignores column-rules wider than column-gap
https://bugs.webkit.org/show_bug.cgi?id=15553

Paint column rules even if they are wider than the gap.
Rules wider than the gap should just overlap with column contents.

Patch by Morten Stenshorne <mstensho@opera.com> on 2013-02-13
Reviewed by Eric Seidel.

Source/WebCore:

Test: fast/multicol/rule-thicker-than-gap.html

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

LayoutTests:

* fast/multicol/rule-thicker-than-gap-expected.html: Added.
* fast/multicol/rule-thicker-than-gap.html: Added.

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

Change-Id: I3881829f6d2fe71236ff909699d165c1997b3664

LayoutTests/fast/multicol/rule-thicker-than-gap-expected.html [new file with mode: 0644]
LayoutTests/fast/multicol/rule-thicker-than-gap.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp

diff --git a/LayoutTests/fast/multicol/rule-thicker-than-gap-expected.html b/LayoutTests/fast/multicol/rule-thicker-than-gap-expected.html
new file mode 100644 (file)
index 0000000..6d36e6a
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Column rule thicker than gap</title>
+    <style>
+      .mc {
+        border-left: 31px solid;
+        margin-left: 35px;
+        height: 100px;
+      }
+    </style>
+  </head>
+  <body>
+    <p>There should be a filled rectangle below.</p>
+    <div class="mc"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/multicol/rule-thicker-than-gap.html b/LayoutTests/fast/multicol/rule-thicker-than-gap.html
new file mode 100644 (file)
index 0000000..096be0a
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Column rule thicker than gap</title>
+    <style>
+      .mc {
+        columns: 2;
+        column-gap: 15px;
+        column-rule: 31px solid;
+        -moz-columns: 2;
+        -moz-column-gap: 15px;
+        -moz-column-rule: 31px solid;
+        -webkit-columns: 2;
+        -webkit-column-gap: 15px;
+        -webkit-column-rule: 31px solid;
+        width: 101px;
+      }
+    </style>
+  </head>
+  <body>
+    <p>There should be a filled rectangle below.</p>
+    <div class="mc">
+      <div style="height:200px;"></div>
+    </div>
+  </body>
+</html>
index 7c3be98..1a1078c 100644 (file)
         * css/CSSParser.cpp:
         (WebCore::CSSParser::parseFlex):
 
+2013-02-13  Morten Stenshorne  <mstensho@opera.com>
+
+        WebKit ignores column-rules wider than column-gap
+        https://bugs.webkit.org/show_bug.cgi?id=15553
+
+        Paint column rules even if they are wider than the gap.
+        Rules wider than the gap should just overlap with column contents.
+
+        Reviewed by Eric Seidel.
+
+        Test: fast/multicol/rule-thicker-than-gap.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintColumnRules):
+
 2013-03-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         [EFL] Cancel mark on search field is not displayed
index 2472f69..5565313 100755 (executable)
@@ -2710,7 +2710,7 @@ void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const LayoutPoint& pain
     EBorderStyle ruleStyle = style()->columnRuleStyle();
     LayoutUnit ruleThickness = style()->columnRuleWidth();
     LayoutUnit colGap = columnGap();
-    bool renderRule = ruleStyle > BHIDDEN && !ruleTransparent && ruleThickness <= colGap;
+    bool renderRule = ruleStyle > BHIDDEN && !ruleTransparent;
     if (!renderRule)
         return;