CSS 2.1 failure: fixed-table-layout-006 fails
authorrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 19:07:32 +0000 (19:07 +0000)
committerrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 19:07:32 +0000 (19:07 +0000)
commit1759c7271696e130f29ff5d897fd3a1661e94a0f
treee9f02a6414031e2bf102cfe90a889707e3b5f303
parent5b262945390e9a86a2827a4e1ed1643b2de98522
CSS 2.1 failure: fixed-table-layout-006 fails
https://bugs.webkit.org/show_bug.cgi?id=78412

Reviewed by Julien Chaffraix.

Source/WebCore:

Tests: css2.1/20110323/fixed-table-layout-006.htm
       fast/css/fixed-table-layout-cell-padding.htm

In fixed tables, positive width specified on a column should include borders and padding.
See the thread at http://lists.w3.org/Archives/Public/www-style/2011Oct/0502.html. The discussion
there resulted in a whole new set of tests for section 17.5.2.1 in the CSS 2.1 spec. See
http://test.csswg.org/harness/test/CSS21_DEV/section/17.5.2.1/. This patch allows WebKit
to pass all of them, and all tests for the 17.5.2.1 section as a whole. I'll land them all separately.

* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray): Include border width and cell padding in the width of the column.
 Note that borderAndPaddingLogicalWidth() returns the border width for separate and collapsed borders as appropriate.

LayoutTests:

* css2.1/20110323/fixed-table-layout-006-expected.html: Added.
* css2.1/20110323/fixed-table-layout-006.htm: Added.
* css2.1/20110323/fixed-table-layout-013-expected.html: The reference test relied on the broken behaviour we're fixing here.
* fast/css/fixed-table-layout-cell-padding-expected.html: Added.
* fast/css/fixed-table-layout-cell-padding.htm: Added.
* platform/chromium-linux/fast/repaint/scroll-inside-table-cell-expected.png:
* platform/chromium-linux/fast/repaint/scroll-relative-table-inside-table-cell-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug2123-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug2509-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug34176-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug44505-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug44505-expected.txt:
   Progression against FF is most evident in this test. The table with the black 'div' cell
   content is proportioned the same as mozilla now.
* platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug59252-expected.png:
* platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug7243-expected.png:
* platform/chromium-win/fast/table/cell-pref-width-invalidation-expected.txt:
* platform/chromium-win/tables/mozilla/bugs/bug2123-expected.txt:
* platform/chromium-win/tables/mozilla/bugs/bug2509-expected.txt:
* platform/chromium-win/tables/mozilla/bugs/bug34176-expected.txt:
* platform/chromium-win/tables/mozilla_expected_failures/bugs/bug59252-expected.txt:
* platform/chromium-win/tables/mozilla_expected_failures/bugs/bug7243-expected.txt:
* platform/chromium/test_expectations.txt: Update expectations until rebaseline
* platform/gtk/test_expectations.txt: ditto
* platform/mac/Skipped: Skip until rebaselined
* platform/qt/test_expectations.txt: Update expectations until rebaseline
* platform/win/Skipped: Skip until rebaselined
* tables/hittesting/filltable-stress.html: Adjusted to traverse the cells for hit-testing given their new dimensions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
LayoutTests/ChangeLog
LayoutTests/css2.1/20110323/fixed-table-layout-006-expected.html [new file with mode: 0644]
LayoutTests/css2.1/20110323/fixed-table-layout-006.htm [new file with mode: 0644]
LayoutTests/css2.1/20110323/fixed-table-layout-013-expected.html
LayoutTests/fast/css/fixed-table-layout-cell-padding-expected.html [new file with mode: 0644]
LayoutTests/fast/css/fixed-table-layout-cell-padding.htm [new file with mode: 0644]
LayoutTests/platform/chromium-linux/fast/repaint/scroll-inside-table-cell-expected.png
LayoutTests/platform/chromium-linux/fast/repaint/scroll-relative-table-inside-table-cell-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug2123-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug2509-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug34176-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug44505-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug44505-expected.txt
LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug59252-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug7243-expected.png
LayoutTests/platform/chromium-win/fast/table/cell-pref-width-invalidation-expected.txt
LayoutTests/platform/chromium-win/tables/mozilla/bugs/bug2123-expected.txt
LayoutTests/platform/chromium-win/tables/mozilla/bugs/bug2509-expected.txt
LayoutTests/platform/chromium-win/tables/mozilla/bugs/bug34176-expected.txt
LayoutTests/platform/chromium-win/tables/mozilla_expected_failures/bugs/bug59252-expected.txt
LayoutTests/platform/chromium-win/tables/mozilla_expected_failures/bugs/bug7243-expected.txt
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/gtk/test_expectations.txt
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/test_expectations.txt
LayoutTests/platform/win/Skipped
LayoutTests/tables/hittesting/filltable-stress.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/FixedTableLayout.cpp