Title: [117271] trunk
Revision
117271
Author
[email protected]
Date
2012-05-16 05:53:28 -0700 (Wed, 16 May 2012)

Log Message

"border: collapse" + "display: none" rows in the tbody while having thead or tfoot doesn't render the opposite border
https://bugs.webkit.org/show_bug.cgi?id=67877

Patch by Arpita Bahuguna <[email protected]> on 2012-05-16
Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/css/table-collapsed-borders.html

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeCollapsedBeforeBorder):
When getting the previous row group's after border, pass SkipEmptySections as the second param
to the RenderTable::sectionAbove() call. Thus if the currSection is the top most section of the
table passing SkipEmptySections to sectionAbove() would return null which should be the expected
behavior.

(WebCore::RenderTableCell::computeCollapsedAfterBorder):
When getting the following row group's before border, pass SkipEmptySections as the second param
to the RenderTable::sectionBelow() call. Thus if the currSection is the bottom most section of the
table passing SkipEmptySections to sectionBelow() would return null which should be the expected
behavior.

LayoutTests:

* fast/css/table-collapsed-borders-expected.html: Added.
* fast/css/table-collapsed-borders.html: Added.
Added new reftest for testing table with collapsed borders.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117270 => 117271)


--- trunk/LayoutTests/ChangeLog	2012-05-16 12:48:50 UTC (rev 117270)
+++ trunk/LayoutTests/ChangeLog	2012-05-16 12:53:28 UTC (rev 117271)
@@ -1,3 +1,14 @@
+2012-05-16  Arpita Bahuguna  <[email protected]>
+
+        "border: collapse" + "display: none" rows in the tbody while having thead or tfoot doesn't render the opposite border
+        https://bugs.webkit.org/show_bug.cgi?id=67877
+
+        Reviewed by Antti Koivisto.
+
+        * fast/css/table-collapsed-borders-expected.html: Added.
+        * fast/css/table-collapsed-borders.html: Added.
+        Added new reftest for testing table with collapsed borders.
+
 2012-05-16  Vsevolod Vlasov  <[email protected]>
 
         Web Inspector: Move edit/save script source logic to _javascript_Source.

Added: trunk/LayoutTests/fast/css/table-collapsed-borders-expected.html (0 => 117271)


--- trunk/LayoutTests/fast/css/table-collapsed-borders-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/table-collapsed-borders-expected.html	2012-05-16 12:53:28 UTC (rev 117271)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Expected Test Result for Buzilla Bug 67877: "border: collapse" + "display: none" rows in the tbody while having thead or tfoot doesn't render the opposite border.</title>
+
+<style>
+    table {
+        border: 3px solid;
+        width: 100%;
+		border-collapse: collapse;
+    }
+</style>
+
+</head>
+<body>
+  <table id="table1">
+        <tr>
+            <td></td>
+        </tr>
+</table>
+  
+
+  <table id="table2">
+        <tr>
+            <td></td>
+        </tr>
+</table>
+
+</body></html>
\ No newline at end of file

Added: trunk/LayoutTests/fast/css/table-collapsed-borders.html (0 => 117271)


--- trunk/LayoutTests/fast/css/table-collapsed-borders.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/table-collapsed-borders.html	2012-05-16 12:53:28 UTC (rev 117271)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Test for Buzilla Bug 67877: "border: collapse" + "display: none" rows in the tbody while having thead or tfoot doesn't render the opposite border.</title>
+
+<style>
+    table {
+        border: 3px solid;
+        width: 100%;
+        border-collapse: collapse;
+    }
+	tbody tr {
+        display: none;
+    }
+</style>
+
+</head>
+<body>
+
+  <table>
+    <thead>
+        <tr>
+            <th></th>
+        </tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td></td>
+        </tr>
+    </tbody>
+</table>
+  
+
+ <table>
+    <tbody>
+        <tr>
+            <td></td>
+        </tr>
+    </tbody>	
+    <tfoot>
+        <tr>
+            <td></td>
+        </tr>
+    </tfoot>	
+</table>
+
+</body></html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (117270 => 117271)


--- trunk/Source/WebCore/ChangeLog	2012-05-16 12:48:50 UTC (rev 117270)
+++ trunk/Source/WebCore/ChangeLog	2012-05-16 12:53:28 UTC (rev 117271)
@@ -1,3 +1,25 @@
+2012-05-16  Arpita Bahuguna  <[email protected]>
+
+        "border: collapse" + "display: none" rows in the tbody while having thead or tfoot doesn't render the opposite border
+        https://bugs.webkit.org/show_bug.cgi?id=67877
+
+        Reviewed by Antti Koivisto.
+
+        Test: fast/css/table-collapsed-borders.html
+
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::computeCollapsedBeforeBorder):
+        When getting the previous row group's after border, pass SkipEmptySections as the second param
+        to the RenderTable::sectionAbove() call. Thus if the currSection is the top most section of the
+        table passing SkipEmptySections to sectionAbove() would return null which should be the expected
+        behavior.
+
+        (WebCore::RenderTableCell::computeCollapsedAfterBorder):
+        When getting the following row group's before border, pass SkipEmptySections as the second param
+        to the RenderTable::sectionBelow() call. Thus if the currSection is the bottom most section of the
+        table passing SkipEmptySections to sectionBelow() would return null which should be the expected
+        behavior.
+
 2012-05-16  Pavel Feldman  <[email protected]>
 
         Web Inspector: follow up to r117267 - fixing typo and removing unnecessary dispatch.

Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (117270 => 117271)


--- trunk/Source/WebCore/rendering/RenderTableCell.cpp	2012-05-16 12:48:50 UTC (rev 117270)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp	2012-05-16 12:53:28 UTC (rev 117271)
@@ -604,7 +604,7 @@
             return result;
         
         // (6) Previous row group's after border.
-        currSection = table->sectionAbove(currSection);
+        currSection = table->sectionAbove(currSection, SkipEmptySections);
         if (currSection) {
             result = chooseBorder(CollapsedBorderValue(currSection->style()->borderAfter(), includeColor ? currSection->style()->visitedDependentColor(afterColorProperty) : Color(), BROWGROUP), result);
             if (!result.exists())
@@ -682,7 +682,7 @@
             return result;
         
         // (6) Following row group's before border.
-        currSection = table->sectionBelow(currSection);
+        currSection = table->sectionBelow(currSection, SkipEmptySections);
         if (currSection) {
             result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), includeColor ? currSection->style()->visitedDependentColor(beforeColorProperty) : Color(), BROWGROUP));
             if (!result.exists())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to