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)
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

index 368cdc79683dfc2276f8eefcfb851f28d2eeaf90..d84c37436740da0d1c32997a5f670bc4a067b391 100644 (file)
@@ -1,3 +1,39 @@
+2012-03-21  Robert Hogan  <robert@webkit.org>
+
+        CSS 2.1 failure: fixed-table-layout-006 fails
+        https://bugs.webkit.org/show_bug.cgi?id=78412
+
+        Reviewed by Julien Chaffraix.
+
+        * 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.
+
 2012-03-22  Dan Bernstein  <mitz@apple.com>
 
         Added Mac WebKit2 expected results for this test. <http://webkit.org/b/81945> tracks the
diff --git a/LayoutTests/css2.1/20110323/fixed-table-layout-006-expected.html b/LayoutTests/css2.1/20110323/fixed-table-layout-006-expected.html
new file mode 100644 (file)
index 0000000..ec458b3
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+        <title>CSS Test: Reference Result</title>
+        <style type="text/css">
+            table
+            {
+                border-collapse: separate;
+                border-spacing: 0;
+            }
+            td
+            {
+                height: 100px;
+                padding: 0;
+                width: 10px;
+            }
+            #blue
+            {
+                background: blue;
+            }
+            #orange
+            {
+                background: orange;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if all of the blue lines below appear to have the same width.</p>
+            <table>
+                <tr>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+               </tr>
+            </table>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/css2.1/20110323/fixed-table-layout-006.htm b/LayoutTests/css2.1/20110323/fixed-table-layout-006.htm
new file mode 100644 (file)
index 0000000..142947f
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+        <title>CSS Test: Remaining table width is divided evenly among non auto-sized columns (minus borders and cell spacing)</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
+        <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout">
+        <meta name="flags" content="">
+        <meta name="assert" content="Any remaining horizontal table space is divided evenly among columns which do not have specified widths (minus borders and cell spacing).">
+        <style type="text/css">
+            table
+            {
+                background: blue;
+                border-collapse: separate;
+                border-spacing: 10px 0;
+                table-layout: fixed;
+                width: 130px;
+            }
+            td
+            {
+                background: blue;
+                border-left: 10px solid orange;
+                border-right: 10px solid orange;
+                height: 100px;
+                padding: 0;
+            }
+            #specified
+            {
+                width: 10px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if all of the blue lines below appear to have the same width.</p>
+            <table>
+                <tr>
+                    <td id="specified"></td>
+                    <td></td>
+                    <td></td>
+               </tr>
+            </table>
+    </body>
+</html>
\ No newline at end of file
index 3583ec0711d5b5d24a2e395ed461f9395dc2ff28..44056739324e26ea4d6715b7443d5e8867446c62 100644 (file)
@@ -12,7 +12,7 @@
             #cell
             {
                 background: black;
-                width: 100px;
+                width: 98px;
             }
             #div1
             {
diff --git a/LayoutTests/fast/css/fixed-table-layout-cell-padding-expected.html b/LayoutTests/fast/css/fixed-table-layout-cell-padding-expected.html
new file mode 100644 (file)
index 0000000..3290573
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+        <title>CSS Test: Reference Result</title>
+        <style type="text/css">
+            table
+            {
+                table-layout: fixed;
+                border-collapse: separate;
+                border-spacing: 0;
+            }
+            td
+            {
+                height: 100px;
+                padding: 0;
+            }
+            #blue
+            {
+                background: blue;
+                width: 30px;
+            }
+            #orange
+            {
+                background: orange;
+                width: 10px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if all of the blue lines below appear to have the same width.</p>
+            <table>
+                <tr>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+                    <td id="blue"></td>
+                    <td id="orange"></td>
+               </tr>
+            </table>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/css/fixed-table-layout-cell-padding.htm b/LayoutTests/fast/css/fixed-table-layout-cell-padding.htm
new file mode 100644 (file)
index 0000000..21deecb
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+        <title>CSS Test: Cell padding is included in column width</title>
+        <style type="text/css">
+            table
+            {
+                background: orange;
+                border-collapse: separate;
+                border-spacing: 10px 0;
+                table-layout: fixed;
+                width: 130px;
+            }
+            td
+            {
+                background: blue;
+                height: 100px;
+                padding-left: 10px;
+                padding-right: 10px;
+                padding-top: 0;
+                padding-bottom: 0;
+            }
+            #specified
+            {
+                width: 10px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if all of the blue lines below appear to have the same width.</p>
+            <table>
+                <tr>
+                    <td id="specified"></td>
+                    <td></td>
+                    <td></td>
+               </tr>
+            </table>
+    </body>
+</html>
\ No newline at end of file
index 5d3e8bae1a5970e543c9db1f910b23377e0bd159..576e5b3ed5a97a71a5006cfe022027aa2469650f 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/repaint/scroll-inside-table-cell-expected.png and b/LayoutTests/platform/chromium-linux/fast/repaint/scroll-inside-table-cell-expected.png differ
index ca8b2327f4d3f2b50b4458cceb33926ca1196886..c9bdeba0102ea3b074319c08effec903a7aad034 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/repaint/scroll-relative-table-inside-table-cell-expected.png and b/LayoutTests/platform/chromium-linux/fast/repaint/scroll-relative-table-inside-table-cell-expected.png differ
index bf988805e56477dbc9f4b18f0d6a9b1e0fefd544..e6b951750c95038db033ee635fb6d587b9a2c4cd 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug2123-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug2123-expected.png differ
index 6a637e7a6eade385f5caffaacd36f8d622488d0e..3b2164a0866133fce0b687f8f37f6ae8cb473e43 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug2509-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug2509-expected.png differ
index 8f18613669565c4a7dc966ed046b4c7b797b866f..f8d07b569c888b69842d3d995968da5ae6020276 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug34176-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug34176-expected.png differ
index a0acdca6fbfc52a35c8b786e7bb910e0d9dcb2fa..f6a22ccffea171e2c05643f5bbcf8ebf7d1eec49 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug44505-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug44505-expected.png differ
index 17f4271dd49a78c55e14a4b69406659997638044..26b148775eca31d3919e34ada49a10da5710e2d5 100644 (file)
@@ -60,30 +60,30 @@ layer at (0,0) size 785x650
       RenderTable {TABLE} at (0,168) size 300x56 [border: (1px outset #808080)]
         RenderTableSection {TBODY} at (1,1) size 298x54
           RenderTableRow {TR} at (0,2) size 298x24
-            RenderTableCell {TD} at (2,2) size 150x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (2,2) size 154x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
-            RenderTableCell {TD} at (154,2) size 142x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (158,2) size 138x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
           RenderTableRow {TR} at (0,28) size 298x24
-            RenderTableCell {TD} at (2,28) size 150x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (2,28) size 154x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
-            RenderTableCell {TD} at (154,28) size 142x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (158,28) size 138x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
       RenderTable {TABLE} at (0,224) size 300x62 [border: (1px outset #808080)]
         RenderTableSection {TBODY} at (1,1) size 298x60
           RenderTableRow {TR} at (0,2) size 298x30
-            RenderTableCell {TD} at (154,5) size 142x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (158,5) size 138x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
           RenderTableRow {TR} at (0,34) size 298x24
-            RenderTableCell {TD} at (2,34) size 150x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (2,34) size 154x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
-            RenderTableCell {TD} at (154,34) size 142x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (158,34) size 138x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
       RenderTable {TABLE} at (0,286) size 300x62 [border: (1px outset #808080)]
@@ -108,27 +108,27 @@ layer at (0,0) size 785x650
       RenderTable {TABLE} at (0,348) size 300x98 [border: (1px outset #808080)]
         RenderTableSection {TBODY} at (1,1) size 298x96
           RenderTableRow {TR} at (0,2) size 298x48
-            RenderTableCell {TD} at (154,5) size 142x42 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (176,5) size 120x42 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
               RenderText {#text} at (11,11) size 4x19
                 text run at (11,11) width 4: " "
           RenderTableRow {TR} at (0,52) size 298x42
-            RenderTableCell {TD} at (2,52) size 150x42 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (2,52) size 172x42 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
               RenderText {#text} at (11,11) size 4x19
                 text run at (11,11) width 4: " "
-            RenderTableCell {TD} at (154,52) size 142x42 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (176,52) size 120x42 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
               RenderText {#text} at (11,11) size 4x19
                 text run at (11,11) width 4: " "
       RenderTable {TABLE} at (0,446) size 300x94 [border: (1px outset #808080)]
         RenderTableSection {TBODY} at (1,1) size 298x92
           RenderTableRow {TR} at (0,2) size 298x62
-            RenderTableCell {TD} at (154,21) size 142x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (158,21) size 138x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
           RenderTableRow {TR} at (0,66) size 298x24
-            RenderTableCell {TD} at (2,66) size 150x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (2,66) size 154x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
-            RenderTableCell {TD} at (154,66) size 142x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (158,66) size 138x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
       RenderTable {TABLE} at (0,540) size 300x94 [border: (1px outset #808080)]
@@ -148,20 +148,20 @@ layer at (0,0) size 785x650
             RenderTableCell {TD} at (258,66) size 38x24 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 4x19
                 text run at (2,2) width 4: " "
-layer at (11,235) size 150x30 clip at (12,236) size 148x28 scrollWidth 201
-  RenderTableCell {TD} at (2,2) size 150x30 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-    RenderBlock {FORM} at (2,2) size 146x26
+layer at (11,235) size 154x30 clip at (12,236) size 152x28 scrollWidth 201
+  RenderTableCell {TD} at (2,2) size 154x30 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+    RenderBlock {FORM} at (2,2) size 150x26
       RenderButton {BUTTON} at (0,2) size 200x22 [bgcolor=#DDDDDD] [border: (2px outset #DDDDDD)]
         RenderBlock (anonymous) at (8,3) size 184x16
           RenderText {#text} at (74,0) size 36x16
             text run at (74,0) width 36: "button"
-layer at (11,359) size 150x48 clip at (12,360) size 148x46 scrollWidth 216
-  RenderTableCell {TD} at (2,2) size 150x48 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+layer at (11,359) size 172x48 clip at (12,360) size 170x46 scrollWidth 216
+  RenderTableCell {TD} at (2,2) size 172x48 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     RenderBlock {DIV} at (11,11) size 206x26 [border: (3px solid #000000)]
       RenderText {#text} at (3,3) size 18x19
         text run at (3,3) width 18: "div"
-layer at (11,457) size 150x62 clip at (12,458) size 148x60 scrollWidth 207
-  RenderTableCell {TD} at (2,2) size 150x62 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+layer at (11,457) size 154x62 clip at (12,458) size 152x60 scrollWidth 207
+  RenderTableCell {TD} at (2,2) size 154x62 [bgcolor=#0000FF] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     RenderBlock {P} at (2,18) size 206x26 [border: (3px solid #000000)]
       RenderText {#text} at (3,3) size 27x19
         text run at (3,3) width 27: "para"
index ac636613b84658ac34ea07cf26f42216ec2dfd47..704c27d1d8a4ef98668a3000a33b3ef59175dc55 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug59252-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug59252-expected.png differ
index 388bbb4068735a9e1cb4ebb01cb673f26de7ea67..e8ae1a69fa785e65a4dbe3b8f46a5572bfca16a8 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug7243-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug7243-expected.png differ
index 2342389897b6f2df6b92e86ed62b319c6cd8863c..52072f16d8608e61746f83e5bd94e6a23cc6e131 100644 (file)
@@ -6,10 +6,10 @@ layer at (0,0) size 800x600
       RenderTable {TABLE} at (0,0) size 784x26
         RenderTableSection {TBODY} at (0,0) size 784x26
           RenderTableRow {TR} at (0,2) size 784x22
-            RenderTableCell {TD} at (2,2) size 60x22 [r=0 c=0 rs=1 cs=1]
-            RenderTableCell {TD} at (64,12) size 718x2 [r=0 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (2,2) size 62x22 [r=0 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (66,12) size 716x2 [r=0 c=1 rs=1 cs=1]
       RenderBlock {DIV} at (0,26) size 784x0
-layer at (11,11) size 58x20
-  RenderBlock {DIV} at (1,1) size 58x20
+layer at (11,11) size 60x20
+  RenderBlock {DIV} at (1,1) size 60x20
     RenderText {#text} at (0,0) size 54x19
       text run at (0,0) width 54: "Success!"
index 97d73e97ba0907690f5eb4bf818db8b11afebe3b..d6fb9561c5948aed5a02049c9176f9f3ddec05d1 100644 (file)
@@ -3,20 +3,20 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584 [bgcolor=#FFFFFF]
-      RenderTable {TABLE} at (0,0) size 477x58 [bgcolor=#000000]
-        RenderTableSection {TBODY} at (0,0) size 477x58
-          RenderTableRow {TR} at (0,0) size 477x58
-            RenderTableCell {TD} at (0,0) size 477x58 [r=0 c=0 rs=1 cs=1]
-              RenderTable {TABLE} at (1,1) size 475x56 [bgcolor=#959595]
-                RenderTableSection {TBODY} at (0,0) size 475x56
-                  RenderTableRow {TR} at (0,0) size 475x28
-                    RenderTableCell {TD} at (0,0) size 475x28 [bgcolor=#6666CC] [r=0 c=0 rs=1 cs=1]
-                      RenderInline {FONT} at (0,0) size 231x18 [color=#FFFFFF]
-                        RenderInline {B} at (0,0) size 231x19
-                          RenderText {#text} at (122,4) size 231x19
-                            text run at (122,4) width 188: "BrowserWatch Headline "
-                            text run at (310,4) width 43: "News"
-                  RenderTableRow {TR} at (0,28) size 475x28
-                    RenderTableCell {TD} at (0,28) size 475x28 [bgcolor=#D4D4D4] [r=1 c=0 rs=1 cs=1]
+      RenderTable {TABLE} at (0,0) size 480x58 [bgcolor=#000000]
+        RenderTableSection {TBODY} at (0,0) size 480x58
+          RenderTableRow {TR} at (0,0) size 480x58
+            RenderTableCell {TD} at (0,0) size 480x58 [r=0 c=0 rs=1 cs=1]
+              RenderTable {TABLE} at (1,1) size 478x56 [bgcolor=#959595]
+                RenderTableSection {TBODY} at (0,0) size 478x56
+                  RenderTableRow {TR} at (0,0) size 478x28
+                    RenderTableCell {TD} at (0,0) size 478x28 [bgcolor=#6666CC] [r=0 c=0 rs=1 cs=1]
+                      RenderInline {FONT} at (0,0) size 232x18 [color=#FFFFFF]
+                        RenderInline {B} at (0,0) size 232x19
+                          RenderText {#text} at (123,4) size 232x19
+                            text run at (123,4) width 189: "BrowserWatch Headline "
+                            text run at (311,4) width 44: "News"
+                  RenderTableRow {TR} at (0,28) size 478x28
+                    RenderTableCell {TD} at (0,28) size 478x28 [bgcolor=#D4D4D4] [r=1 c=0 rs=1 cs=1]
                       RenderText {#text} at (4,4) size 21x19
                         text run at (4,4) width 21: "xxx"
index a7d074104bf46aa46b02c46a242daa50cc999061..3c639d2f7e2fc0edf2e5613001b074d79dd275e3 100644 (file)
@@ -6,18 +6,18 @@ layer at (0,0) size 800x600
       RenderTable {TABLE} at (0,0) size 400x116 [border: (1px solid #FF0000)]
         RenderTableSection {TBODY} at (1,1) size 398x114
           RenderTableRow {TR} at (0,2) size 398x24
-            RenderTableCell {TD} at (2,2) size 300x24 [border: (1px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (2,2) size 304x24 [border: (1px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
               RenderText {#text} at (2,2) size 222x19
                 text run at (2,2) width 222: "What's New on WebDeveloper.com"
-            RenderTableCell {TD} at (304,2) size 92x24 [border: (1px solid #0000FF)] [r=0 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (308,2) size 88x24 [border: (1px solid #0000FF)] [r=0 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 29x19
                 text run at (2,2) width 29: "umm"
           RenderTableRow {TR} at (0,28) size 398x84
-            RenderTableCell {TD} at (2,48) size 300x44 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (2,48) size 304x44 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
               RenderText {#text} at (2,2) size 286x39
                 text run at (2,2) width 286: "blah blah blah blah blah blah blah blah blah blah"
                 text run at (2,22) width 54: "blah blah"
-            RenderTableCell {TD} at (304,28) size 92x84 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (308,28) size 88x84 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 83x79
                 text run at (2,2) width 83: "blah blah blah"
                 text run at (2,22) width 83: "blah blah blah"
index b84f25e27dbed01e24b15fc8d5a016942e400475..4de1fe419c75bf8fda6f6546ba88c2460737bf46 100644 (file)
@@ -10,9 +10,9 @@ layer at (0,0) size 800x600
               RenderTable {TABLE} at (2,2) size 774x30 [border: (1px outset #808080)]
                 RenderTableSection {TBODY} at (1,1) size 772x28
                   RenderTableRow {TR} at (0,2) size 772x24
-                    RenderTableCell {TD} at (2,2) size 219x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                    RenderTableCell {TD} at (2,2) size 221x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
                       RenderText {#text} at (2,2) size 32x19
                         text run at (2,2) width 32: "cell 1"
-                    RenderTableCell {TD} at (223,2) size 547x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+                    RenderTableCell {TD} at (225,2) size 545x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                       RenderText {#text} at (2,2) size 32x19
                         text run at (2,2) width 32: "cell 2"
index 731a89bd5e61c118fecb3ce617db0706af7cbeac..8096e15216e27306e986be13ed64416c73c750d3 100644 (file)
@@ -10,15 +10,15 @@ layer at (0,0) size 800x600
               RenderTable {TABLE} at (2,2) size 500x100 [border: (2px outset #808080)]
                 RenderTableSection {TBODY} at (2,2) size 496x96
                   RenderTableRow {TR} at (0,2) size 496x92
-                    RenderTableCell {TD} at (2,2) size 400x92 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-                      RenderTable {TABLE} at (11,11) size 378x70 [border: (1px outset #808080)]
-                        RenderTableSection {TBODY} at (1,1) size 376x68
-                          RenderTableRow {TR} at (0,2) size 376x64
-                            RenderTableCell {TD} at (2,2) size 372x64 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-                              RenderText {#text} at (2,2) size 348x59
-                                text run at (2,2) width 344: "Have a tip or rumor to share? Just click on the icon and if"
-                                text run at (2,22) width 348: "you get a BrowserWatch net.fame be sure and display the"
-                                text run at (2,42) width 258: "icon on your own home page for all to see!"
-                    RenderTableCell {TD} at (404,27) size 90x42 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+                    RenderTableCell {TD} at (2,2) size 422x92 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                      RenderTable {TABLE} at (11,11) size 400x70 [border: (1px outset #808080)]
+                        RenderTableSection {TBODY} at (1,1) size 398x68
+                          RenderTableRow {TR} at (0,2) size 398x64
+                            RenderTableCell {TD} at (2,2) size 394x64 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                              RenderText {#text} at (2,2) size 370x59
+                                text run at (2,2) width 370: "Have a tip or rumor to share? Just click on the icon and if you"
+                                text run at (2,22) width 370: "get a BrowserWatch net.fame be sure and display the icon on"
+                                text run at (2,42) width 210: "your own home page for all to see!"
+                    RenderTableCell {TD} at (426,27) size 68x42 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                       RenderText {#text} at (11,11) size 20x19
                         text run at (11,11) width 20: "foo"
index 6ac8385b5005a627dd6951e4eac2e31fe0858a6a..330a54f5c4e136dfdd86d5b6b9dda99446fa3d3f 100644 (file)
@@ -110,13 +110,13 @@ layer at (0,0) size 785x632
           RenderTableCol {COL} at (0,0) size 0x0
         RenderTableSection {TBODY} at (1,1) size 98x44
           RenderTableRow {TR} at (0,10) size 98x24
-            RenderTableCell {TD} at (10,10) size 16x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (10,10) size 14x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
               RenderText {#text} at (2,2) size 20x19
                 text run at (2,2) width 20: "foo"
-            RenderTableCell {TD} at (36,10) size 22x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+            RenderTableCell {TD} at (34,10) size 20x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
               RenderText {#text} at (2,2) size 20x19
                 text run at (2,2) width 20: "foo"
-            RenderTableCell {TD} at (68,10) size 20x24 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
+            RenderTableCell {TD} at (64,10) size 24x24 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
               RenderText {#text} at (2,2) size 20x19
                 text run at (2,2) width 20: "foo"
       RenderBlock (anonymous) at (0,570) size 769x20
index f1a35301422e0e11d36b0a11d29a4f826433147b..b5018f9b8033c670cf345cbb07696a70c0ce82e8 100644 (file)
@@ -4251,3 +4251,14 @@ BUGWK81816 SNOWLEOPARD DEBUG : fast/dom/DOMImplementation/createDocumentType-err
 BUGWK81857 SNOWLEOPARD DEBUG : fast/frames/valid.html = PASS TIMEOUT
 BUGWK81857 SNOWLEOPARD DEBUG : fast/frames/calculate-order.html = PASS TIMEOUT
 BUGWK81931 SNOWLEOPARD DEBUG : fast/images/destroyed-image-load-event.html = PASS TIMEOUT
+
+// Rebaseline after https://bugs.webkit.org/show_bug.cgi?id=78412
+BUGWK78412 MAC WIN : tables/mozilla/bugs/bug2123.html = IMAGE+TEXT
+BUGWK78412 MAC WIN  : tables/mozilla/bugs/bug2509.html = IMAGE+TEXT
+BUGWK78412 MAC WIN  : tables/mozilla/bugs/bug34176.html = IMAGE+TEXT
+BUGWK78412 MAC WIN  : tables/mozilla/bugs/bug44505.html = IMAGE+TEXT
+BUGWK78412 MAC WIN  : tables/mozilla_expected_failures/bugs/bug59252.html = IMAGE+TEXT
+BUGWK78412 MAC WIN  : tables/mozilla_expected_failures/bugs/bug7243.html = IMAGE+TEXT
+BUGWK78412 MAC WIN  : fast/repaint/scroll-inside-table-cell.html = IMAGE
+BUGWK78412 MAC WIN  : fast/repaint/scroll-relative-table-inside-table-cell.html = IMAGE
+BUGWK78412 MAC WIN  : fast/table/cell-pref-width-invalidation.html = TEXT
index 460228c643bedf73609dbd57e12459f41405b6a9..54a746a2c535795c4b2ef8e0ab7f8f29d74088f9 100644 (file)
@@ -108,3 +108,13 @@ BUGWK79756 : css3/flexbox/inline-flexbox.html = IMAGE FAIL
 BUGWK79757 : fast/selectors/selection-window-inactive.html = IMAGE FAIL
 
 BUGWK80531 : fast/forms/textfield-overflow.html = IMAGE+TEXT
+
+// Rebaseline after https://bugs.webkit.org/show_bug.cgi?id=78412
+BUGWK78412 : tables/mozilla/bugs/bug2123.html = TEXT
+BUGWK78412 : tables/mozilla/bugs/bug2509.html = TEXT
+BUGWK78412 : tables/mozilla/bugs/bug34176.html = TEXT
+BUGWK78412 : tables/mozilla/bugs/bug44505.html = TEXT
+BUGWK78412 : tables/mozilla_expected_failures/bugs/bug59252.html = TEXT
+BUGWK78412 : tables/mozilla_expected_failures/bugs/bug7243.html = TEXT
+BUGWK78412 : fast/table/cell-pref-width-invalidation.html = TEXT
+
index 6efee6b890a54c19b47e6fce323c32ee059ba410..cc1008a8d123d91c8656156f91a637b786bfb141 100644 (file)
@@ -610,3 +610,14 @@ fast/forms/placeholder-set-attribute.html
 
 # Not possible to set UA string for media requests with all Mac media engines.
 http/tests/media/video-useragent.html
+
+# Rebaseline after https://bugs.webkit.org/show_bug.cgi?id=78412
+tables/mozilla/bugs/bug2123.html
+tables/mozilla/bugs/bug2509.html
+tables/mozilla/bugs/bug34176.html
+tables/mozilla/bugs/bug44505.html
+tables/mozilla_expected_failures/bugs/bug59252.html
+tables/mozilla_expected_failures/bugs/bug7243.html
+fast/repaint/scroll-inside-table-cell.html
+fast/repaint/scroll-relative-table-inside-table-cell.html
+fast/table/cell-pref-width-invalidation.html
index 76cb2fbeca7334d28d971ff0f3825bb39704d505..ed12d0f968b8393b996be753b0e51a6eb7d3d483 100644 (file)
@@ -20,3 +20,11 @@ BUGWK67007 DEBUG : fast/ruby/generated-before-and-after-counter-doesnt-crash.htm
 BUGWK62662 DEBUG : inspector/cookie-parser.html = CRASH PASS
 
 BUGWK73766 : css3/unicode-bidi-isolate-aharon-failing.html = FAIL
+
+// Rebaseline after https://bugs.webkit.org/show_bug.cgi?id=78412
+BUGWK78412 : tables/mozilla/bugs/bug2123.html = TEXT
+BUGWK78412 : tables/mozilla/bugs/bug2509.html = TEXT
+BUGWK78412 : tables/mozilla/bugs/bug34176.html = TEXT
+BUGWK78412 : tables/mozilla/bugs/bug44505.html = TEXT
+BUGWK78412 : tables/mozilla_expected_failures/bugs/bug59252.html = TEXT
+BUGWK78412 : tables/mozilla_expected_failures/bugs/bug7243.html = TEXT
index 1aec58dbd9431e01f06a50c2b2bf609305af9d20..6f11a874b87ce644cc506bca4657a701e18aa03d 100644 (file)
@@ -1864,3 +1864,14 @@ tables/mozilla_expected_failures/bugs/bug85016.html
 # https://bugs.webkit.org/show_bug.cgi?id=81276
 # Allowed to regress to fix a crash. 
 fast/inline/continuation-outlines-with-layers.html
+
+# Rebaseline after https://bugs.webkit.org/show_bug.cgi?id=78412
+tables/mozilla/bugs/bug2123.html
+tables/mozilla/bugs/bug2509.html
+tables/mozilla/bugs/bug34176.html
+tables/mozilla/bugs/bug44505.html
+tables/mozilla_expected_failures/bugs/bug59252.html
+tables/mozilla_expected_failures/bugs/bug7243.html
+fast/repaint/scroll-inside-table-cell.html
+fast/repaint/scroll-relative-table-inside-table-cell.html
+fast/table/cell-pref-width-invalidation.html
index 85592a4b6a1f4ca8ebc0e51eedae3b6272b876ce..4cc3625fcb48aba5a38360467ffbae246c0d7f30 100644 (file)
@@ -36,7 +36,7 @@
           var success = lastSuccess == cellId;
           if (!success) failed = true;
           logMsg += (success ? "SUCCESS" : "FAIL") + "<br />";
-          xpos += cellwidth;
+          xpos += cellwidth + 1;
         }
         ypos += cellHeight;
       }
@@ -47,7 +47,7 @@
     }
 
     function CreateTable(tablewidth, rowcount, colcount) {
-      var cellwidth = (tablewidth / colcount);
+      var cellwidth = (tablewidth / colcount) - 1;
       var tablestr = "<table style=\"table-layout:fixed;\" border=\"1\" width=\"" + 
                      tablewidth + "\" cellspacing=\"0\" cellpadding=\"0\">";
       for (var row = 0; row < rowcount; row++) {
index dbb5ac759817332f9c73c31b8d96e0ecbdd34ec9..3666bc22b4dc0461e89b167a333c07642b44f39e 100644 (file)
@@ -1,3 +1,23 @@
+2012-03-21  Robert Hogan  <robert@webkit.org>
+
+        CSS 2.1 failure: fixed-table-layout-006 fails
+        https://bugs.webkit.org/show_bug.cgi?id=78412
+
+        Reviewed by Julien Chaffraix.
+
+        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.
+
 2012-03-22  Simon Fraser  <simon.fraser@apple.com>
 
         Factor compositing layer updates after scroll into a new method
index 6c4fcb6663f0a34d3ade65cc5d7d5eaa9494d1c4..187557ed11377634bd1dc3b9bd204b905597e3c2 100644 (file)
@@ -156,8 +156,10 @@ int FixedTableLayout::calcWidthArray(int)
                 Length w = cell->styleOrColLogicalWidth();
                 unsigned span = cell->colSpan();
                 int effectiveColWidth = 0;
-                if (w.isFixed() && w.isPositive())
+                if (w.isFixed() && w.isPositive()) {
+                    w.setValue(w.value() + cell->borderAndPaddingLogicalWidth());
                     effectiveColWidth = w.value();
+                }
                 
                 unsigned usedSpan = 0;
                 unsigned i = 0;