CSS 2.1 failure: table-columns-example-001 fails
authorrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 19:03:44 +0000 (19:03 +0000)
committerrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 19:03:44 +0000 (19:03 +0000)
commit3e903609ff489154d53948db19a2c91a0043a09e
treedfd6967e668f8d0d54c7d3164edb4cd6af4fdbfd
parente9ce4b0ad9aa4e122c7fed00ace1cb78798d42c3
CSS 2.1 failure: table-columns-example-001 fails
https://bugs.webkit.org/show_bug.cgi?id=83978

Reviewed by David Hyatt.

Source/WebCore:

Tests: css2.1/20110323/table-columns-example-001.html
       fast/css/table-rules-attribute-groups-with-frame.html
       fast/css/table-rules-attribute-groups.html
       fast/css/table-rules-attribute-none-with-frame.html
       fast/css/table-rules-attribute-with-frame1.html
       fast/css/table-rules-attribute-with-frame2.html
       fast/css/table-rules-attribute.html

WebKit does not implement the 'cols', 'rows', and 'all' rules attributes correctly
for cells that are adjacent to the table's edges. The solution is to follow the hint in the
spec at http://www.w3.org/TR/CSS21/tables.html#columns and set the table's border to
hidden when the rules attribute is set to one of 'cols', 'rows' or 'all', and the table itself
has no explicit border. Border collapsing will take care of the rest as 'hidden' always wins in
border-conflict resolution. It's not completely clear from the spec that an explicit table border
should trump a cols rule but doing so is consistent with FF and Opera at least. A 'rules' attribute
is trumped by anything specified for the 'frame' attribute so need to ensure that is respected too.

In short, any 'rules' attribute means a hidden table border unless there's a frame or border attribute.

* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::additionalAttributeStyle):

LayoutTests:

* css2.1/20110323/table-columns-example-001-expected.html: Added.
* css2.1/20110323/table-columns-example-001.htm: Added.
* fast/css/table-rules-attribute-expected.html: Added.
* fast/css/table-rules-attribute-groups-expected.html: Added.
* fast/css/table-rules-attribute-groups-with-frame-expected.png: Added.
* fast/css/table-rules-attribute-groups-with-frame-expected.txt: Added.
* fast/css/table-rules-attribute-groups-with-frame.html: Added.
* fast/css/table-rules-attribute-groups.html: Added.
* fast/css/table-rules-attribute-none-with-frame-expected.html: Added.
* fast/css/table-rules-attribute-none-with-frame.html: Added.
* fast/css/table-rules-attribute-with-frame1-expected.png: Added.
* fast/css/table-rules-attribute-with-frame1-expected.txt: Added.
* fast/css/table-rules-attribute-with-frame1.html: Added.
* fast/css/table-rules-attribute-with-frame2-expected.png: Added.
* fast/css/table-rules-attribute-with-frame2-expected.txt: Added.
* fast/css/table-rules-attribute-with-frame2.html: Added.
  These test the correct interaction of a rules attribute with a frame attribute. 'cols' is used
  for the test, but each of cols, rows, and all have the same effect on the table's borders. It wasn't
  possible to create reftests for all of them because of the different behaviour of the frame attr to
  a simple border, probably due to painting order.
* fast/css/table-rules-attribute.html: Added.
  This tests correct rendering of the rules attribute on a table without its own border. It
  also tests border collapsing on tables with a rules attribute.
* platform/chromium-linux/tables/mozilla_expected_failures/collapsing_borders/bug41262-5-expected.png:
* platform/chromium-linux/tables/mozilla_expected_failures/collapsing_borders/bug41262-5-expected.txt:
   This is a progression - the table's border is hidden.
* platform/chromium/test_expectations.txt:
* platform/gtk/test_expectations.txt:
* platform/mac/Skipped:
* platform/mac/test_expectations.txt:
* platform/qt/test_expectations.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/css2.1/20110323/table-columns-example-001-expected.html [new file with mode: 0644]
LayoutTests/css2.1/20110323/table-columns-example-001.htm [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-expected.html [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-groups-expected.html [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-groups-with-frame-expected.png [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-groups-with-frame-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-groups-with-frame.html [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-groups.html [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-none-with-frame-expected.html [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-none-with-frame.html [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-with-frame1-expected.png [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-with-frame1-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-with-frame1.html [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-with-frame2-expected.png [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-with-frame2-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute-with-frame2.html [new file with mode: 0644]
LayoutTests/fast/css/table-rules-attribute.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/collapsing_borders/bug41262-5-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/collapsing_borders/bug41262-5-expected.txt
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/gtk/test_expectations.txt
LayoutTests/platform/mac/Skipped
LayoutTests/platform/mac/test_expectations.txt
LayoutTests/platform/qt/test_expectations.txt
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLTableElement.cpp