Title: [117412] trunk
Revision
117412
Author
commit-qu...@webkit.org
Date
2012-05-17 01:14:33 -0700 (Thu, 17 May 2012)

Log Message

CSS3 Multicolumn: Content in normal flow extending into column gaps should be clipped at middle of column-gap
https://bugs.webkit.org/show_bug.cgi?id=86441

Patch by Uday Kiran <udayki...@motorola.com> on 2012-05-17
Reviewed by Eric Seidel.

Source/WebCore:

Content in the normal flow that extends into column gaps (e.g., long words or images)
is clipped in the middle of the column gap.
http://www.w3.org/TR/css3-multicol/#overflow-inside-multicol-elements

Test: fast/multicol/overflow-into-columngap.html

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

LayoutTests:

Test for content in normal flow that extends into column gaps.
http://www.w3.org/TR/css3-multicol/#overflow-inside-multicol-elements

* fast/multicol/overflow-into-columngap-expected.html: Added.
* fast/multicol/overflow-into-columngap.html: Added.
* platform/chromium/test_expectations.txt:
* platform/efl/test_expectations.txt:
* platform/gtk/test_expectations.txt:
* platform/mac/test_expectations.txt:
* platform/qt/test_expectations.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117411 => 117412)


--- trunk/LayoutTests/ChangeLog	2012-05-17 08:06:38 UTC (rev 117411)
+++ trunk/LayoutTests/ChangeLog	2012-05-17 08:14:33 UTC (rev 117412)
@@ -1,3 +1,21 @@
+2012-05-17  Uday Kiran  <udayki...@motorola.com>
+
+        CSS3 Multicolumn: Content in normal flow extending into column gaps should be clipped at middle of column-gap
+        https://bugs.webkit.org/show_bug.cgi?id=86441
+
+        Reviewed by Eric Seidel.
+
+        Test for content in normal flow that extends into column gaps.
+        http://www.w3.org/TR/css3-multicol/#overflow-inside-multicol-elements
+
+        * fast/multicol/overflow-into-columngap-expected.html: Added.
+        * fast/multicol/overflow-into-columngap.html: Added.
+        * platform/chromium/test_expectations.txt:
+        * platform/efl/test_expectations.txt:
+        * platform/gtk/test_expectations.txt:
+        * platform/mac/test_expectations.txt:
+        * platform/qt/test_expectations.txt:
+
 2012-05-17  Li Yin  <li....@intel.com>
 
         [Worker] Web Worker lacks test to check the name attribute of SharedWorker

Added: trunk/LayoutTests/fast/multicol/overflow-into-columngap-expected.html (0 => 117412)


--- trunk/LayoutTests/fast/multicol/overflow-into-columngap-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/overflow-into-columngap-expected.html	2012-05-17 08:14:33 UTC (rev 117412)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>MultiColumn: Reference test for overflow into column gaps in column boxes</title>
+        <link rel="help" href=""
+        <style>
+            #parent
+            {
+                font: 20px/1 monospace;
+                position: relative;
+            }
+            #reference
+            {
+                height: 6em;
+                width: 11em;
+                position: absolute;
+            }
+            #reference div
+            {
+                position: absolute;
+                top: 0;
+                background: green;
+                height: 6em;
+            }
+            #right
+            {
+                right: 0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is no red visible on the page.</p>
+        <div id="parent">
+            <div id="reference">
+                <div style="width:5.5em;"></div>
+                <div id="right" style="width:5em;"></div>
+            </div>
+        </div>
+    </body>
+</html>

Added: trunk/LayoutTests/fast/multicol/overflow-into-columngap.html (0 => 117412)


--- trunk/LayoutTests/fast/multicol/overflow-into-columngap.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/overflow-into-columngap.html	2012-05-17 08:14:33 UTC (rev 117412)
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>MultiColumn: Content in normal flow that extends into column gaps is clipped in middle of column gap</title>
+        <link rel="help" href=""
+        <style>
+            #parent
+            {
+                font: 20px/1 monospace;
+                position: relative;
+            }
+            #multicolumn
+            {
+                -moz-column-width: 5em;
+                -o-column-width: 5em;
+                -webkit-column-width: 5em;
+                column-width: 5em;
+                position: absolute;
+            }
+            #multicolumn, #reference
+            {
+                height: 6em;
+                width: 11em;
+            }
+            #multicolumn div
+            {
+                background: green;
+                height: 6em;
+            }
+            #reference
+            {
+                position: absolute;
+                top: 0;
+            }
+            #reference div
+            {
+                position: absolute;
+                top: 0;
+                background:red;
+                height: 6em;
+            }
+            #right
+            {
+                right: 0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is no red visible on the page.</p>
+        <div id="parent">
+            <div id="reference">
+                <div style="width:5.5em;"></div>
+                <div id="right" style="width:5em;"></div>
+            </div>
+            <div id="multicolumn">
+                <div style="width:5.5em;"></div>
+                <div style="width:5em;"></div>
+            </div>
+        </div>
+    </body>
+</html>

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (117411 => 117412)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-05-17 08:06:38 UTC (rev 117411)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-05-17 08:14:33 UTC (rev 117412)
@@ -3825,3 +3825,6 @@
 BUGWK86712 : tables/mozilla/marvin/backgr_position-table.html = IMAGE
 BUGWK86712 : tables/mozilla_expected_failures/marvin/backgr_border-table-row.html = IMAGE
 
+// Needs rebaseline after bug 86441
+BUGWK86441 WIN LINUX MAC : fast/borders/border-antialiasing.html = IMAGE
+BUGWK86441 WIN LINUX MAC : fast/multicol/shadow-breaking.html = IMAGE

Modified: trunk/LayoutTests/platform/efl/test_expectations.txt (117411 => 117412)


--- trunk/LayoutTests/platform/efl/test_expectations.txt	2012-05-17 08:06:38 UTC (rev 117411)
+++ trunk/LayoutTests/platform/efl/test_expectations.txt	2012-05-17 08:14:33 UTC (rev 117412)
@@ -482,3 +482,7 @@
 BUGWK84167 : fast/css-generated-content/nested-tables-with-before-after-content-crash.html = IMAGE+TEXT
 BUGWK84167 : fast/inline-block/001.html = IMAGE+TEXT
 BUGWK84167 : tables/mozilla/bugs/bug2479-2.html = IMAGE+TEXT
+
+// Needs rebaseline after bug 86441
+BUGWK86441 : fast/borders/border-antialiasing.html = IMAGE
+BUGWK86441 : fast/multicol/shadow-breaking.html = IMAGE

Modified: trunk/LayoutTests/platform/gtk/test_expectations.txt (117411 => 117412)


--- trunk/LayoutTests/platform/gtk/test_expectations.txt	2012-05-17 08:06:38 UTC (rev 117411)
+++ trunk/LayoutTests/platform/gtk/test_expectations.txt	2012-05-17 08:14:33 UTC (rev 117412)
@@ -1329,6 +1329,10 @@
 BUGWK86284 : svg/text/add-tspan-position-bug.html = IMAGE
 BUGWK86284 : svg/text/modify-tspan-position-bug.html = IMAGE
 
+// Needs rebaseline after bug 86441
+BUGWK86441 : fast/borders/border-antialiasing.html = IMAGE
+BUGWK86441 : fast/multicol/shadow-breaking.html = IMAGE
+
 //////////////////////////////////////////////////////////////////////////////////////////
 // End of Tests failing
 //////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/mac/test_expectations.txt (117411 => 117412)


--- trunk/LayoutTests/platform/mac/test_expectations.txt	2012-05-17 08:06:38 UTC (rev 117411)
+++ trunk/LayoutTests/platform/mac/test_expectations.txt	2012-05-17 08:14:33 UTC (rev 117412)
@@ -40,7 +40,7 @@
 
 BUGWK73766 : css3/unicode-bidi-isolate-aharon-failing.html = FAIL
 
-// Need rebaselining after 71244
+// Need rebaselining after 71244. Also needs rebaseline after 86441.
 BUGWK74432 : fast/borders/border-antialiasing.html = IMAGE
 
 
@@ -227,3 +227,6 @@
 BUGWK84167 : fast/css-generated-content/nested-tables-with-before-after-content-crash.html = IMAGE+TEXT
 BUGWK84167 : fast/inline-block/001.html = IMAGE+TEXT
 BUGWK84167 : tables/mozilla/bugs/bug2479-2.html = IMAGE+TEXT
+
+// Needs rebaseline after bug 86441
+BUGWK86441 : fast/multicol/shadow-breaking.html = IMAGE

Modified: trunk/LayoutTests/platform/qt/test_expectations.txt (117411 => 117412)


--- trunk/LayoutTests/platform/qt/test_expectations.txt	2012-05-17 08:06:38 UTC (rev 117411)
+++ trunk/LayoutTests/platform/qt/test_expectations.txt	2012-05-17 08:14:33 UTC (rev 117412)
@@ -68,3 +68,7 @@
 
 // CSS Variables are not yet enabled.
 BUGWK85580 SKIP : fast/css/variables = PASS FAIL
+
+// Needs rebaseline after bug 86441
+BUGWK86441 : fast/borders/border-antialiasing.html = IMAGE
+BUGWK86441 : fast/multicol/shadow-breaking.html = IMAGE

Modified: trunk/Source/WebCore/ChangeLog (117411 => 117412)


--- trunk/Source/WebCore/ChangeLog	2012-05-17 08:06:38 UTC (rev 117411)
+++ trunk/Source/WebCore/ChangeLog	2012-05-17 08:14:33 UTC (rev 117412)
@@ -1,3 +1,19 @@
+2012-05-17  Uday Kiran  <udayki...@motorola.com>
+
+        CSS3 Multicolumn: Content in normal flow extending into column gaps should be clipped at middle of column-gap
+        https://bugs.webkit.org/show_bug.cgi?id=86441
+
+        Reviewed by Eric Seidel.
+
+        Content in the normal flow that extends into column gaps (e.g., long words or images)
+        is clipped in the middle of the column gap.
+        http://www.w3.org/TR/css3-multicol/#overflow-inside-multicol-elements
+
+        Test: fast/multicol/overflow-into-columngap.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintColumnContents):
+
 2012-05-16  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r117372.

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (117411 => 117412)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2012-05-17 08:06:38 UTC (rev 117411)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2012-05-17 08:14:33 UTC (rev 117412)
@@ -2621,6 +2621,7 @@
     if (!colCount)
         return;
     LayoutUnit currLogicalTopOffset = 0;
+    LayoutUnit colGap = columnGap();
     for (unsigned i = 0; i < colCount; i++) {
         // For each rect, we clip to the rect, and then we adjust our coords.
         LayoutRect colRect = columnRectAt(colInfo, i);
@@ -2639,10 +2640,19 @@
         
         if (!info.rect.isEmpty()) {
             GraphicsContextStateSaver stateSaver(*context);
+            LayoutRect clipRect(colRect);
             
+            if (i < colCount - 1) {
+                if (isHorizontalWritingMode())
+                    clipRect.expand(colGap / 2, 0);
+                else
+                    clipRect.expand(0, colGap / 2);
+            }
             // Each strip pushes a clip, since column boxes are specified as being
             // like overflow:hidden.
-            context->clip(colRect);
+            // FIXME: Content and column rules that extend outside column boxes at the edges of the multi-column element
+            // are clipped according to the 'overflow' property.
+            context->clip(clipRect);
 
             // Adjust our x and y when painting.
             LayoutPoint adjustedPaintOffset = paintOffset + offset;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to