Changeset 21145 in webkit


Ignore:
Timestamp:
Apr 27, 2007 4:32:29 AM (17 years ago)
Author:
antti
Message:

LayoutTests:

Reviewed by Darin, Hyatt.


Test for http://bugs.webkit.org/show_bug.cgi?id=13081
Empty table cells not handled correctly
<rdar://problem/5067926>


Added test case and checked in updated results for others. Changes represent
progressions or are not visible in rendering output.

  • fast/block/positioning/negative-right-pos-expected.txt:
  • fast/css/acid2-expected.txt:
  • fast/css/acid2-pixel-expected.txt:
  • fast/css/percentage-non-integer-expected.checksum:
  • fast/css/percentage-non-integer-expected.png:
  • fast/css/percentage-non-integer-expected.txt:
  • fast/repaint/table-cell-move-expected.checksum:
  • fast/repaint/table-cell-move-expected.png:
  • fast/repaint/table-cell-move-expected.txt:
  • fast/table/012-expected.txt:
  • fast/table/032-expected.txt:
  • fast/table/empty-cells-expected.checksum: Added.
  • fast/table/empty-cells-expected.txt: Added.
  • fast/table/empty-cells.html: Added.
  • fast/table/empty-section-crash-expected.txt:
  • http/tests/misc/acid2-expected.txt:
  • http/tests/misc/acid2-pixel-expected.txt:
  • tables/mozilla/bugs/bug100334-expected.txt:
  • tables/mozilla/bugs/bug1188-expected.txt:
  • tables/mozilla/bugs/bug16012-expected.checksum:
  • tables/mozilla/bugs/bug16012-expected.png:
  • tables/mozilla/bugs/bug16012-expected.txt:
  • tables/mozilla/bugs/bug1818-6-expected.txt:
  • tables/mozilla/bugs/bug222336-expected.txt:
  • tables/mozilla/bugs/bug222467-expected.txt:
  • tables/mozilla/bugs/bug78162-expected.txt:
  • tables/mozilla/core/misc-expected.checksum:
  • tables/mozilla/core/misc-expected.png:
  • tables/mozilla/core/misc-expected.txt:
  • tables/mozilla_expected_failures/bugs/bug14007-1-expected.checksum:
  • tables/mozilla_expected_failures/bugs/bug14007-1-expected.png:
  • tables/mozilla_expected_failures/bugs/bug14007-1-expected.txt:
  • tables/mozilla_expected_failures/bugs/bug72393-expected.checksum:
  • tables/mozilla_expected_failures/bugs/bug72393-expected.png:
  • tables/mozilla_expected_failures/bugs/bug72393-expected.txt:
  • tables/mozilla_expected_failures/other/empty_cells-expected.txt:

WebCore:

Reviewed by Darin, Hyatt.


Fix http://bugs.webkit.org/show_bug.cgi?id=13081
Empty table cells not handled correctly
<rdar://problem/5067926>


To match Firefox and IE, empty table cells with variable width need to be
treated as special case. They generally get zero width.

  • rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): (WebCore::AutoTableLayout::calcEffectiveWidth): (WebCore::AutoTableLayout::layout):
  • rendering/AutoTableLayout.h: (WebCore::AutoTableLayout::Layout::Layout):
  • rendering/RenderStyle.h: (WebCore::RenderStyle::hasPadding):
Location:
trunk
Files:
3 added
38 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r21144 r21145  
     12007-04-27  Antti Koivisto  <antti@apple.com>
     2
     3        Reviewed by Darin, Hyatt.
     4       
     5        Test for http://bugs.webkit.org/show_bug.cgi?id=13081
     6        Empty table cells not handled correctly
     7        <rdar://problem/5067926>
     8       
     9        Added test case and checked in updated results for others. Changes represent
     10        progressions or are not visible in rendering output.
     11
     12        * fast/block/positioning/negative-right-pos-expected.txt:
     13        * fast/css/acid2-expected.txt:
     14        * fast/css/acid2-pixel-expected.txt:
     15        * fast/css/percentage-non-integer-expected.checksum:
     16        * fast/css/percentage-non-integer-expected.png:
     17        * fast/css/percentage-non-integer-expected.txt:
     18        * fast/repaint/table-cell-move-expected.checksum:
     19        * fast/repaint/table-cell-move-expected.png:
     20        * fast/repaint/table-cell-move-expected.txt:
     21        * fast/table/012-expected.txt:
     22        * fast/table/032-expected.txt:
     23        * fast/table/empty-cells-expected.checksum: Added.
     24        * fast/table/empty-cells-expected.txt: Added.
     25        * fast/table/empty-cells.html: Added.
     26        * fast/table/empty-section-crash-expected.txt:
     27        * http/tests/misc/acid2-expected.txt:
     28        * http/tests/misc/acid2-pixel-expected.txt:
     29        * tables/mozilla/bugs/bug100334-expected.txt:
     30        * tables/mozilla/bugs/bug1188-expected.txt:
     31        * tables/mozilla/bugs/bug16012-expected.checksum:
     32        * tables/mozilla/bugs/bug16012-expected.png:
     33        * tables/mozilla/bugs/bug16012-expected.txt:
     34        * tables/mozilla/bugs/bug1818-6-expected.txt:
     35        * tables/mozilla/bugs/bug222336-expected.txt:
     36        * tables/mozilla/bugs/bug222467-expected.txt:
     37        * tables/mozilla/bugs/bug78162-expected.txt:
     38        * tables/mozilla/core/misc-expected.checksum:
     39        * tables/mozilla/core/misc-expected.png:
     40        * tables/mozilla/core/misc-expected.txt:
     41        * tables/mozilla_expected_failures/bugs/bug14007-1-expected.checksum:
     42        * tables/mozilla_expected_failures/bugs/bug14007-1-expected.png:
     43        * tables/mozilla_expected_failures/bugs/bug14007-1-expected.txt:
     44        * tables/mozilla_expected_failures/bugs/bug72393-expected.checksum:
     45        * tables/mozilla_expected_failures/bugs/bug72393-expected.png:
     46        * tables/mozilla_expected_failures/bugs/bug72393-expected.txt:
     47        * tables/mozilla_expected_failures/other/empty_cells-expected.txt:
     48
    1492007-04-27  Rob Buis  <buis@kde.org>
    250
  • trunk/LayoutTests/fast/block/positioning/negative-right-pos-expected.txt

    r16281 r21145  
    1212      RenderTableSection {TBODY} at (0,0) size 250x400
    1313        RenderTableRow {TR} at (0,0) size 250x400
    14           RenderTableCell {TD} at (0,200) size 250x0 [r=0 c=0 rs=1 cs=1]
     14          RenderTableCell {TD} at (0,200) size 0x0 [r=0 c=0 rs=1 cs=1]
    1515layer at (258,26) size 200x400
    1616  RenderBlock (positioned) {DIV} at (250,0) size 200x400 [bgcolor=#008000]
  • trunk/LayoutTests/fast/css/acid2-expected.txt

    r20313 r21145  
    1212      RenderTableSection {TBODY} at (0,0) size 1x0
    1313        RenderTableRow {TR} at (0,0) size 1x0
    14           RenderTableCell {TD} at (0,0) size 1x0 [r=0 c=0 rs=1 cs=1]
     14          RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=0 rs=1 cs=1]
    1515    RenderBlock {DIV} at (60,60) size 120x12 [bgcolor=#FF0000] [border: (12px solid #000000) none (12px solid #000000)]
    1616      RenderBlock {DIV} at (12,0) size 144x12
  • trunk/LayoutTests/fast/css/acid2-pixel-expected.txt

    r20313 r21145  
    1212      RenderTableSection {TBODY} at (0,0) size 1x0
    1313        RenderTableRow {TR} at (0,0) size 1x0
    14           RenderTableCell {TD} at (0,0) size 1x0 [r=0 c=0 rs=1 cs=1]
     14          RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=0 rs=1 cs=1]
    1515    RenderBlock {DIV} at (60,60) size 120x12 [bgcolor=#FF0000] [border: (12px solid #000000) none (12px solid #000000)]
    1616      RenderBlock {DIV} at (12,0) size 144x12
  • trunk/LayoutTests/fast/css/percentage-non-integer-expected.checksum

    r18574 r21145  
    1 894253a73fdcd593dbb354e032c879ed
     19dbc92dfac04c2ab684eae0db5e59865
  • trunk/LayoutTests/fast/css/percentage-non-integer-expected.txt

    r18574 r21145  
    7979        RenderTableCell {TD} at (225,5) size 27x0 [bgcolor=#00FF00] [r=0 c=16 rs=1 cs=1]
    8080        RenderTableCell {TD} at (252,5) size 10x0 [bgcolor=#000000] [r=0 c=17 rs=1 cs=1]
    81         RenderTableCell {TD} at (262,5) size 30x0 [bgcolor=#00FF00] [r=0 c=18 rs=1 cs=1]
    82         RenderTableCell {TD} at (292,5) size 1x0 [r=0 c=19 rs=1 cs=1]
     81        RenderTableCell {TD} at (262,5) size 31x0 [bgcolor=#00FF00] [r=0 c=18 rs=1 cs=1]
     82        RenderTableCell {TD} at (293,5) size 0x0 [r=0 c=19 rs=1 cs=1]
    8383layer at (8,126) size 1000x10
    8484  RenderTable {TABLE} at (0,0) size 1000x10
     
    8686      RenderTableRow {TR} at (0,0) size 1000x10
    8787        RenderTableCell {TD} at (0,5) size 11x0 [bgcolor=#0000007F] [r=0 c=0 rs=1 cs=1]
    88         RenderTableCell {TD} at (11,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=1 rs=1 cs=1]
    89         RenderTableCell {TD} at (21,5) size 13x0 [bgcolor=#0000007F] [r=0 c=2 rs=1 cs=1]
    90         RenderTableCell {TD} at (34,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=3 rs=1 cs=1]
    91         RenderTableCell {TD} at (44,5) size 15x0 [bgcolor=#0000007F] [r=0 c=4 rs=1 cs=1]
    92         RenderTableCell {TD} at (59,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=5 rs=1 cs=1]
    93         RenderTableCell {TD} at (69,5) size 17x0 [bgcolor=#0000007F] [r=0 c=6 rs=1 cs=1]
    94         RenderTableCell {TD} at (86,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=7 rs=1 cs=1]
    95         RenderTableCell {TD} at (96,5) size 20x0 [bgcolor=#0000007F] [r=0 c=8 rs=1 cs=1]
    96         RenderTableCell {TD} at (116,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=9 rs=1 cs=1]
    97         RenderTableCell {TD} at (126,5) size 21x0 [bgcolor=#0000007F] [r=0 c=10 rs=1 cs=1]
    98         RenderTableCell {TD} at (147,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=11 rs=1 cs=1]
    99         RenderTableCell {TD} at (157,5) size 23x0 [bgcolor=#0000007F] [r=0 c=12 rs=1 cs=1]
    100         RenderTableCell {TD} at (180,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=13 rs=1 cs=1]
    101         RenderTableCell {TD} at (190,5) size 25x0 [bgcolor=#0000007F] [r=0 c=14 rs=1 cs=1]
    102         RenderTableCell {TD} at (215,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=15 rs=1 cs=1]
    103         RenderTableCell {TD} at (225,5) size 27x0 [bgcolor=#0000007F] [r=0 c=16 rs=1 cs=1]
    104         RenderTableCell {TD} at (252,5) size 10x0 [bgcolor=#00FF007F] [r=0 c=17 rs=1 cs=1]
    105         RenderTableCell {TD} at (262,5) size 30x0 [bgcolor=#0000007F] [r=0 c=18 rs=1 cs=1]
    106         RenderTableCell {TD} at (292,5) size 708x0 [r=0 c=19 rs=1 cs=1]
     88        RenderTableCell {TD} at (11,5) size 88x0 [bgcolor=#00FF007F] [r=0 c=1 rs=1 cs=1]
     89        RenderTableCell {TD} at (99,5) size 13x0 [bgcolor=#0000007F] [r=0 c=2 rs=1 cs=1]
     90        RenderTableCell {TD} at (112,5) size 88x0 [bgcolor=#00FF007F] [r=0 c=3 rs=1 cs=1]
     91        RenderTableCell {TD} at (200,5) size 15x0 [bgcolor=#0000007F] [r=0 c=4 rs=1 cs=1]
     92        RenderTableCell {TD} at (215,5) size 88x0 [bgcolor=#00FF007F] [r=0 c=5 rs=1 cs=1]
     93        RenderTableCell {TD} at (303,5) size 17x0 [bgcolor=#0000007F] [r=0 c=6 rs=1 cs=1]
     94        RenderTableCell {TD} at (320,5) size 89x0 [bgcolor=#00FF007F] [r=0 c=7 rs=1 cs=1]
     95        RenderTableCell {TD} at (409,5) size 20x0 [bgcolor=#0000007F] [r=0 c=8 rs=1 cs=1]
     96        RenderTableCell {TD} at (429,5) size 89x0 [bgcolor=#00FF007F] [r=0 c=9 rs=1 cs=1]
     97        RenderTableCell {TD} at (518,5) size 21x0 [bgcolor=#0000007F] [r=0 c=10 rs=1 cs=1]
     98        RenderTableCell {TD} at (539,5) size 89x0 [bgcolor=#00FF007F] [r=0 c=11 rs=1 cs=1]
     99        RenderTableCell {TD} at (628,5) size 23x0 [bgcolor=#0000007F] [r=0 c=12 rs=1 cs=1]
     100        RenderTableCell {TD} at (651,5) size 89x0 [bgcolor=#00FF007F] [r=0 c=13 rs=1 cs=1]
     101        RenderTableCell {TD} at (740,5) size 25x0 [bgcolor=#0000007F] [r=0 c=14 rs=1 cs=1]
     102        RenderTableCell {TD} at (765,5) size 89x0 [bgcolor=#00FF007F] [r=0 c=15 rs=1 cs=1]
     103        RenderTableCell {TD} at (854,5) size 27x0 [bgcolor=#0000007F] [r=0 c=16 rs=1 cs=1]
     104        RenderTableCell {TD} at (881,5) size 89x0 [bgcolor=#00FF007F] [r=0 c=17 rs=1 cs=1]
     105        RenderTableCell {TD} at (970,5) size 30x0 [bgcolor=#0000007F] [r=0 c=18 rs=1 cs=1]
     106        RenderTableCell {TD} at (1000,5) size 0x0 [r=0 c=19 rs=1 cs=1]
  • trunk/LayoutTests/fast/repaint/table-cell-move-expected.checksum

    r14101 r21145  
    1 2baa577b2d2a75add31a3eb65fa02386
     1d6c72ac0e759cd75484ed8417b485d19
  • trunk/LayoutTests/fast/repaint/table-cell-move-expected.txt

    r14684 r21145  
    3333        RenderTableSection {TBODY} at (0,0) size 61x240
    3434          RenderTableRow {TR} at (0,0) size 61x60
    35             RenderTableCell {TD} at (0,30) size 60x0 [r=0 c=0 rs=1 cs=1]
    36             RenderTableCell {TD} at (60,30) size 1x0 [r=0 c=1 rs=1 cs=1]
     35            RenderTableCell {TD} at (0,30) size 61x0 [r=0 c=0 rs=1 cs=1]
     36            RenderTableCell {TD} at (61,30) size 0x0 [r=0 c=1 rs=1 cs=1]
    3737          RenderTableRow {TR} at (0,60) size 61x180
    38             RenderTableCell {TD} at (0,120) size 60x60 [r=1 c=0 rs=1 cs=1]
    39               RenderBlock {DIV} at (0,0) size 60x60 [bgcolor=#008000]
    40             RenderTableCell {TD} at (60,150) size 1x0 [r=1 c=1 rs=1 cs=1]
     38            RenderTableCell {TD} at (0,120) size 61x60 [r=1 c=0 rs=1 cs=1]
     39              RenderBlock {DIV} at (0,0) size 61x60 [bgcolor=#008000]
     40            RenderTableCell {TD} at (61,150) size 0x0 [r=1 c=1 rs=1 cs=1]
    4141          RenderTableRow {TR} at (0,240) size 61x0
    42             RenderTableCell {TD} at (0,240) size 60x0 [bgcolor=#FF0000] [r=2 c=0 rs=1 cs=1]
    43             RenderTableCell {TD} at (60,240) size 1x0 [r=2 c=1 rs=1 cs=1]
     42            RenderTableCell {TD} at (0,240) size 61x0 [bgcolor=#FF0000] [r=2 c=0 rs=1 cs=1]
     43            RenderTableCell {TD} at (61,240) size 0x0 [r=2 c=1 rs=1 cs=1]
  • trunk/LayoutTests/fast/table/012-expected.txt

    r14684 r21145  
    1010        RenderTableSection {TBODY} at (0,0) size 784x100
    1111          RenderTableRow {TR} at (0,0) size 784x100
    12             RenderTableCell {TD} at (0,50) size 784x0 [r=0 c=0 rs=1 cs=1]
     12            RenderTableCell {TD} at (0,50) size 0x0 [r=0 c=0 rs=1 cs=1]
    1313      RenderBlock (anonymous) at (0,118) size 784x18
    1414        RenderText {#text} at (0,0) size 321x18
  • trunk/LayoutTests/fast/table/032-expected.txt

    r14684 r21145  
    1515        RenderTableSection {TBODY} at (0,0) size 100x6
    1616          RenderTableRow {TR} at (0,2) size 100x2
    17             RenderTableCell {TD} at (2,2) size 96x2 [r=0 c=0 rs=1 cs=1]
     17            RenderTableCell {TD} at (2,2) size 2x2 [r=0 c=0 rs=1 cs=1]
    1818layer at (8,100) size 100x50
    1919  RenderBlock (positioned) {DIV} at (0,50) size 100x50 [bgcolor=#008000]
     
    2121      RenderTableSection {TBODY} at (0,0) size 100x6
    2222        RenderTableRow {TR} at (0,2) size 100x2
    23           RenderTableCell {TD} at (2,2) size 96x2 [r=0 c=0 rs=1 cs=1]
     23          RenderTableCell {TD} at (2,2) size 2x2 [r=0 c=0 rs=1 cs=1]
  • trunk/LayoutTests/fast/table/empty-section-crash-expected.txt

    r14685 r21145  
    2424    RenderTableSection {TBODY} at (0,5) size 100x2
    2525      RenderTableRow {TR} at (0,0) size 100x2
    26         RenderTableCell {TD} at (0,0) size 100x2 [r=0 c=0 rs=1 cs=1]
     26        RenderTableCell {TD} at (0,0) size 2x2 [r=0 c=0 rs=1 cs=1]
  • trunk/LayoutTests/http/tests/misc/acid2-expected.txt

    r20315 r21145  
    1212      RenderTableSection {TBODY} at (0,0) size 1x0
    1313        RenderTableRow {TR} at (0,0) size 1x0
    14           RenderTableCell {TD} at (0,0) size 1x0 [r=0 c=0 rs=1 cs=1]
     14          RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=0 rs=1 cs=1]
    1515    RenderBlock {DIV} at (60,60) size 120x12 [bgcolor=#FF0000] [border: (12px solid #000000) none (12px solid #000000)]
    1616      RenderBlock {DIV} at (12,0) size 144x12
  • trunk/LayoutTests/http/tests/misc/acid2-pixel-expected.txt

    r20315 r21145  
    1212      RenderTableSection {TBODY} at (0,0) size 1x0
    1313        RenderTableRow {TR} at (0,0) size 1x0
    14           RenderTableCell {TD} at (0,0) size 1x0 [r=0 c=0 rs=1 cs=1]
     14          RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=0 rs=1 cs=1]
    1515    RenderBlock {DIV} at (60,60) size 120x12 [bgcolor=#FF0000] [border: (12px solid #000000) none (12px solid #000000)]
    1616      RenderBlock {DIV} at (12,0) size 144x12
  • trunk/LayoutTests/tables/mozilla/bugs/bug100334-expected.txt

    r19346 r21145  
    1313                text run at (0,0) width 100: "Correct Display"
    1414          RenderTableRow {TR} at (0,18) size 150x0
    15             RenderTableCell {TD} at (0,18) size 75x0 [r=1 c=0 rs=1 cs=1]
    16             RenderTableCell {TD} at (75,18) size 75x0 [r=1 c=1 rs=1 cs=1]
     15            RenderTableCell {TD} at (0,18) size 125x0 [r=1 c=0 rs=1 cs=1]
     16            RenderTableCell {TD} at (125,18) size 25x0 [r=1 c=1 rs=1 cs=1]
    1717      RenderBlock {P} at (0,34) size 784x0
    1818      RenderTable {TABLE} at (0,34) size 150x18 [bgcolor=#FFCCCC]
  • trunk/LayoutTests/tables/mozilla/bugs/bug1188-expected.txt

    r19346 r21145  
    137137                  RenderTableSection {TBODY} at (0,0) size 1x1
    138138                    RenderTableRow {TR} at (0,0) size 1x1
    139                       RenderTableCell {TD} at (0,0) size 1x0 [r=0 c=0 rs=1 cs=1]
     139                      RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=0 rs=1 cs=1]
    140140layer at (279,79) size 211x13
    141141  RenderBlock {DIV} at (3,3) size 211x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug16012-expected.checksum

    r19346 r21145  
    1 725e1444e5846dedf87517a1f6fe8576
     1be8f793d7fa9a1c4e7f799937144750f
  • trunk/LayoutTests/tables/mozilla/bugs/bug16012-expected.txt

    r19346 r21145  
    1212        RenderTableSection {TBODY} at (0,0) size 37x5
    1313          RenderTableRow {TR} at (0,2) size 37x1
    14             RenderTableCell {TD} at (2,2) size 30x1 [bgcolor=#FF0000] [r=0 c=0 rs=1 cs=1]
     14            RenderTableCell {TD} at (2,2) size 31x1 [bgcolor=#FF0000] [r=0 c=0 rs=1 cs=1]
    1515              RenderImage {IMG} at (0,0) size 30x1
    16             RenderTableCell {TD} at (34,2) size 1x0 [r=0 c=1 rs=1 cs=1]
     16            RenderTableCell {TD} at (35,2) size 0x0 [r=0 c=1 rs=1 cs=1]
    1717      RenderBlock (anonymous) at (0,41) size 784x18
    1818        RenderBR {BR} at (0,0) size 0x18
  • trunk/LayoutTests/tables/mozilla/bugs/bug1818-6-expected.txt

    r19346 r21145  
    77        RenderTableSection {TBODY} at (0,0) size 784x0
    88          RenderTableRow {TR} at (0,0) size 784x0
    9             RenderTableCell {TD} at (0,0) size 400x0 [bgcolor=#0000CC] [r=0 c=0 rs=1 cs=1]
    10             RenderTableCell {TD} at (400,0) size 6x0 [bgcolor=#00CC00] [r=0 c=1 rs=1 cs=1]
    11             RenderTableCell {TD} at (406,0) size 378x0 [bgcolor=#CC0000] [r=0 c=2 rs=1 cs=1]
     9            RenderTableCell {TD} at (0,0) size 772x0 [bgcolor=#0000CC] [r=0 c=0 rs=1 cs=1]
     10            RenderTableCell {TD} at (772,0) size 12x0 [bgcolor=#00CC00] [r=0 c=1 rs=1 cs=1]
     11            RenderTableCell {TD} at (784,0) size 0x0 [bgcolor=#CC0000] [r=0 c=2 rs=1 cs=1]
  • trunk/LayoutTests/tables/mozilla/bugs/bug222336-expected.txt

    r19346 r21145  
    1111                RenderTableSection {TBODY} at (0,0) size 1x0
    1212                  RenderTableRow {TR} at (0,0) size 1x0
    13                     RenderTableCell {TD} at (0,0) size 1x0 [r=0 c=0 rs=1 cs=1]
     13                    RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=0 rs=1 cs=1]
  • trunk/LayoutTests/tables/mozilla/bugs/bug222467-expected.txt

    r19346 r21145  
    77        RenderTableSection {TBODY} at (1,1) size 398x6
    88          RenderTableRow {TR} at (0,2) size 398x2
    9             RenderTableCell {TD} at (2,2) size 394x2 [r=0 c=0 rs=1 cs=1]
     9            RenderTableCell {TD} at (2,2) size 2x2 [r=0 c=0 rs=1 cs=1]
  • trunk/LayoutTests/tables/mozilla/bugs/bug78162-expected.txt

    r19346 r21145  
    1212                  RenderTableRow {TR} at (0,2) size 120x2
    1313                    RenderBlock {FORM} at (0,0) size 0x0
    14                     RenderTableCell {TD} at (2,2) size 116x2 [r=0 c=0 rs=1 cs=1]
     14                    RenderTableCell {TD} at (2,2) size 2x2 [r=0 c=0 rs=1 cs=1]
    1515            RenderTableCell {TD} at (128,2) size 510x166 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    1616              RenderTable {TABLE} at (2,2) size 506x162 [border: (1px outset #808080)]
  • trunk/LayoutTests/tables/mozilla/core/misc-expected.checksum

    r18634 r21145  
    1 f3e8ac5f89b07679968161599c0e5f42
     1d96a636356e5d322ca479a685f7816af
  • trunk/LayoutTests/tables/mozilla/core/misc-expected.txt

    r18634 r21145  
    1 layer at (0,0) size 812x585
    2   RenderView at (0,0) size 800x585
    3 layer at (0,0) size 812x585
    4   RenderBlock {HTML} at (0,0) size 800x585
    5     RenderBody {BODY} at (8,8) size 784x569
     1layer at (0,0) size 800x600
     2  RenderView at (0,0) size 800x600
     3layer at (0,0) size 800x600
     4  RenderBlock {HTML} at (0,0) size 800x600
     5    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock (anonymous) at (0,0) size 784x18
    77        RenderText {#text} at (0,0) size 226x18
     
    2323        RenderTableSection {TBODY} at (0,0) size 600x109
    2424          RenderTableRow {TR} at (0,2) size 600x44
    25             RenderTableCell {TD} at (2,2) size 800x44 [r=0 c=0 rs=1 cs=3]
    26               RenderImage {IMG} at (110,1) size 579x42
     25            RenderTableCell {TD} at (2,2) size 594x44 [r=0 c=0 rs=1 cs=3]
     26              RenderImage {IMG} at (7,1) size 579x42
    2727              RenderText {#text} at (0,0) size 0x0
    2828          RenderTableRow {TR} at (0,48) size 600x37
    29             RenderTableCell {TD} at (2,48) size 371x37 [r=1 c=0 rs=1 cs=1]
     29            RenderTableCell {TD} at (2,48) size 242x37 [r=1 c=0 rs=1 cs=1]
    3030              RenderImage {IMG} at (1,1) size 232x35 [border: (1px solid #000000)]
    31             RenderTableCell {TD} at (375,56) size 219x20 [r=1 c=1 rs=1 cs=1]
    32               RenderText {#text} at (39,1) size 140x18
    33                 text run at (39,1) width 140: "Hassle-Free Upgrades"
     31            RenderTableCell {TD} at (246,56) size 142x20 [r=1 c=1 rs=1 cs=1]
     32              RenderText {#text} at (1,1) size 140x18
     33                text run at (1,1) width 140: "Hassle-Free Upgrades"
    3434          RenderTableRow {TR} at (0,87) size 600x20
    35             RenderTableCell {TD} at (2,87) size 802x20 [bgcolor=#99CCCC] [r=2 c=0 rs=1 cs=4]
     35            RenderTableCell {TD} at (2,87) size 596x20 [bgcolor=#99CCCC] [r=2 c=0 rs=1 cs=4]
    3636              RenderText {#text} at (1,1) size 8x18
    3737                text run at (1,1) width 8: "x"
  • trunk/LayoutTests/tables/mozilla_expected_failures/bugs/bug14007-1-expected.checksum

    r14223 r21145  
    1 b05ecf9f586d93e95335e269c28276c5
     194cde9af5d230278145924cc0ba39f6d
  • trunk/LayoutTests/tables/mozilla_expected_failures/bugs/bug14007-1-expected.txt

    r14684 r21145  
    6565                        text run at (0,270) width 296: "# # # # # # # # # # # # # # # # # # # # # # # # #"
    6666                        text run at (0,288) width 236: "# # # # # # # # # # # # # # # # # # # #"
    67             RenderTableCell {TD} at (537,0) size 231x324 [r=0 c=2 rs=1 cs=1]
    68               RenderTable {TABLE} at (0,0) size 231x324
    69                 RenderTableSection {THEAD} at (0,0) size 231x18
    70                   RenderTableRow {TR} at (0,0) size 231x18
    71                     RenderTableCell {TH} at (0,0) size 231x18 [r=0 c=0 rs=1 cs=1]
    72                       RenderText {#text} at (78,0) size 74x18
    73                         text run at (78,0) width 74: "Header 3/1"
    74                 RenderTableSection {TBODY} at (0,18) size 231x306
    75                   RenderTableRow {TR} at (0,0) size 231x306
    76                     RenderTableCell {TD} at (0,0) size 231x306 [r=0 c=0 rs=1 cs=1]
     67            RenderTableCell {TD} at (537,0) size 232x324 [r=0 c=2 rs=1 cs=1]
     68              RenderTable {TABLE} at (0,0) size 232x324
     69                RenderTableSection {THEAD} at (0,0) size 232x18
     70                  RenderTableRow {TR} at (0,0) size 232x18
     71                    RenderTableCell {TH} at (0,0) size 232x18 [r=0 c=0 rs=1 cs=1]
     72                      RenderText {#text} at (79,0) size 74x18
     73                        text run at (79,0) width 74: "Header 3/1"
     74                RenderTableSection {TBODY} at (0,18) size 232x306
     75                  RenderTableRow {TR} at (0,0) size 232x306
     76                    RenderTableCell {TD} at (0,0) size 232x306 [r=0 c=0 rs=1 cs=1]
    7777                      RenderText {#text} at (0,0) size 230x306
    7878                        text run at (0,0) width 230: "1 2 3 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !"
     
    9494                        text run at (0,270) width 230: "! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !"
    9595                        text run at (0,288) width 41: "! ! ! ! !"
    96             RenderTableCell {TD} at (768,0) size 1x0 [r=0 c=3 rs=1 cs=1]
     96            RenderTableCell {TD} at (769,0) size 0x0 [r=0 c=3 rs=1 cs=1]
    9797          RenderTableRow {TR} at (0,324) size 769x324
    9898            RenderTableCell {TD} at (0,324) size 230x324 [r=1 c=0 rs=1 cs=1]
     
    154154                        text run at (0,270) width 296: "# # # # # # # # # # # # # # # # # # # # # # # # #"
    155155                        text run at (0,288) width 236: "# # # # # # # # # # # # # # # # # # # #"
    156             RenderTableCell {TD} at (537,324) size 231x324 [r=1 c=2 rs=1 cs=1]
    157               RenderTable {TABLE} at (0,0) size 231x324
    158                 RenderTableSection {THEAD} at (0,0) size 231x18
    159                   RenderTableRow {TR} at (0,0) size 231x18
    160                     RenderTableCell {TH} at (0,0) size 231x18 [r=0 c=0 rs=1 cs=1]
    161                       RenderText {#text} at (78,0) size 74x18
    162                         text run at (78,0) width 74: "Header 3/2"
    163                 RenderTableSection {TBODY} at (0,18) size 231x306
    164                   RenderTableRow {TR} at (0,0) size 231x306
    165                     RenderTableCell {TD} at (0,0) size 231x306 [r=0 c=0 rs=1 cs=1]
     156            RenderTableCell {TD} at (537,324) size 232x324 [r=1 c=2 rs=1 cs=1]
     157              RenderTable {TABLE} at (0,0) size 232x324
     158                RenderTableSection {THEAD} at (0,0) size 232x18
     159                  RenderTableRow {TR} at (0,0) size 232x18
     160                    RenderTableCell {TH} at (0,0) size 232x18 [r=0 c=0 rs=1 cs=1]
     161                      RenderText {#text} at (79,0) size 74x18
     162                        text run at (79,0) width 74: "Header 3/2"
     163                RenderTableSection {TBODY} at (0,18) size 232x306
     164                  RenderTableRow {TR} at (0,0) size 232x306
     165                    RenderTableCell {TD} at (0,0) size 232x306 [r=0 c=0 rs=1 cs=1]
    166166                      RenderText {#text} at (0,0) size 230x306
    167167                        text run at (0,0) width 230: "1 2 3 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !"
  • trunk/LayoutTests/tables/mozilla_expected_failures/bugs/bug72393-expected.checksum

    r16430 r21145  
    1 e3da72501646bba4d8f34720a22c9784
     1e5fa2c15641806f14d681bc33c5852b4
  • trunk/LayoutTests/tables/mozilla_expected_failures/bugs/bug72393-expected.txt

    r14684 r21145  
    1313                RenderTableSection {TBODY} at (0,0) size 498x229
    1414                  RenderTableRow {TR} at (0,0) size 498x229
    15                     RenderTableCell {TD} at (0,114) size 1x0 [r=0 c=0 rs=1 cs=1]
    16                     RenderTableCell {TD} at (1,67) size 496x95 [r=0 c=1 rs=1 cs=1]
    17                       RenderBlock {H1} at (0,0) size 496x74
     15                    RenderTableCell {TD} at (0,114) size 0x0 [r=0 c=0 rs=1 cs=1]
     16                    RenderTableCell {TD} at (0,67) size 498x95 [r=0 c=1 rs=1 cs=1]
     17                      RenderBlock {H1} at (0,0) size 498x74
    1818                        RenderText {#text} at (0,0) size 479x74
    1919                          text run at (0,0) width 479: "Detonator Comparison In 3DMark"
    2020                          text run at (0,37) width 64: "2001"
    21                     RenderTableCell {TD} at (497,114) size 1x0 [r=0 c=2 rs=1 cs=1]
     21                    RenderTableCell {TD} at (498,114) size 0x0 [r=0 c=2 rs=1 cs=1]
    2222            RenderTableCell {TD} at (639,114) size 5x2 [border: (1px inset #808080)] [r=0 c=3 rs=1 cs=1]
    2323            RenderTableCell {TD} at (644,57) size 134x117 [border: (1px inset #808080)] [r=0 c=4 rs=1 cs=1]
  • trunk/LayoutTests/tables/mozilla_expected_failures/other/empty_cells-expected.txt

    r14684 r21145  
    1111          RenderTableSection {TBODY} at (0,0) size 100x0
    1212            RenderTableRow {TR} at (0,0) size 100x0
    13               RenderTableCell {TD} at (0,0) size 100x0 [r=0 c=0 rs=1 cs=1]
     13              RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=0 rs=1 cs=1]
    1414            RenderTableRow {TR} at (0,0) size 100x0
    15               RenderTableCell {TD} at (0,0) size 100x0 [r=1 c=0 rs=1 cs=1]
     15              RenderTableCell {TD} at (0,0) size 0x0 [r=1 c=0 rs=1 cs=1]
    1616            RenderTableRow {TR} at (0,0) size 100x0
    17               RenderTableCell {TD} at (0,0) size 100x0 [r=2 c=0 rs=1 cs=1]
     17              RenderTableCell {TD} at (0,0) size 0x0 [r=2 c=0 rs=1 cs=1]
    1818            RenderTableRow {TR} at (0,0) size 100x0
    19               RenderTableCell {TD} at (0,0) size 100x0 [r=3 c=0 rs=1 cs=1]
     19              RenderTableCell {TD} at (0,0) size 0x0 [r=3 c=0 rs=1 cs=1]
    2020            RenderTableRow {TR} at (0,0) size 100x0
    21               RenderTableCell {TD} at (0,0) size 100x0 [r=4 c=0 rs=1 cs=1]
     21              RenderTableCell {TD} at (0,0) size 0x0 [r=4 c=0 rs=1 cs=1]
    2222            RenderTableRow {TR} at (0,0) size 100x0
    23               RenderTableCell {TD} at (0,0) size 100x0 [r=5 c=0 rs=1 cs=1]
     23              RenderTableCell {TD} at (0,0) size 0x0 [r=5 c=0 rs=1 cs=1]
    2424        RenderBlock (anonymous) at (0,18) size 769x18
    2525          RenderBR {BR} at (0,0) size 0x18
     
    5151          RenderTableSection {TBODY} at (0,0) size 100x12
    5252            RenderTableRow {TR} at (0,0) size 100x2
    53               RenderTableCell {TD} at (0,1) size 100x0 [r=0 c=0 rs=1 cs=1]
     53              RenderTableCell {TD} at (0,1) size 0x0 [r=0 c=0 rs=1 cs=1]
    5454            RenderTableRow {TR} at (0,2) size 100x2
    55               RenderTableCell {TD} at (0,3) size 100x0 [r=1 c=0 rs=1 cs=1]
     55              RenderTableCell {TD} at (0,3) size 0x0 [r=1 c=0 rs=1 cs=1]
    5656            RenderTableRow {TR} at (0,4) size 100x2
    57               RenderTableCell {TD} at (0,5) size 100x0 [r=2 c=0 rs=1 cs=1]
     57              RenderTableCell {TD} at (0,5) size 0x0 [r=2 c=0 rs=1 cs=1]
    5858            RenderTableRow {TR} at (0,6) size 100x2
    59               RenderTableCell {TD} at (0,7) size 100x0 [r=3 c=0 rs=1 cs=1]
     59              RenderTableCell {TD} at (0,7) size 0x0 [r=3 c=0 rs=1 cs=1]
    6060            RenderTableRow {TR} at (0,8) size 100x2
    61               RenderTableCell {TD} at (0,9) size 100x0 [r=4 c=0 rs=1 cs=1]
     61              RenderTableCell {TD} at (0,9) size 0x0 [r=4 c=0 rs=1 cs=1]
    6262            RenderTableRow {TR} at (0,10) size 100x2
    63               RenderTableCell {TD} at (0,11) size 100x0 [r=5 c=0 rs=1 cs=1]
     63              RenderTableCell {TD} at (0,11) size 0x0 [r=5 c=0 rs=1 cs=1]
    6464        RenderBlock (anonymous) at (0,30) size 769x18
    6565          RenderBR {BR} at (0,0) size 0x18
     
    230230                  RenderTableSection {TBODY} at (0,0) size 6x0
    231231                    RenderTableRow {TR} at (0,0) size 6x0
    232                       RenderTableCell {TD} at (0,0) size 1x0 [r=0 c=0 rs=1 cs=1]
    233                       RenderTableCell {TD} at (1,0) size 1x0 [r=0 c=1 rs=1 cs=1]
    234                       RenderTableCell {TD} at (2,0) size 1x0 [r=0 c=2 rs=1 cs=1]
    235                       RenderTableCell {TD} at (3,0) size 1x0 [r=0 c=3 rs=1 cs=1]
    236                       RenderTableCell {TD} at (4,0) size 1x0 [r=0 c=4 rs=1 cs=1]
    237                       RenderTableCell {TD} at (5,0) size 1x0 [r=0 c=5 rs=1 cs=1]
     232                      RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=0 rs=1 cs=1]
     233                      RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=1 rs=1 cs=1]
     234                      RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=2 rs=1 cs=1]
     235                      RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=3 rs=1 cs=1]
     236                      RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=4 rs=1 cs=1]
     237                      RenderTableCell {TD} at (0,0) size 0x0 [r=0 c=5 rs=1 cs=1]
    238238        RenderBlock (anonymous) at (0,22) size 769x18
    239239          RenderBR {BR} at (0,0) size 0x18
  • trunk/WebCore/ChangeLog

    r21144 r21145  
     12007-04-27  Antti Koivisto  <antti@apple.com>
     2
     3        Reviewed by Darin, Hyatt.
     4       
     5        Fix http://bugs.webkit.org/show_bug.cgi?id=13081
     6        Empty table cells not handled correctly
     7        <rdar://problem/5067926>
     8       
     9        To match Firefox and IE, empty table cells with variable width need to be
     10        treated as special case. They generally get zero width.
     11
     12        * rendering/AutoTableLayout.cpp:
     13        (WebCore::AutoTableLayout::recalcColumn):
     14        (WebCore::AutoTableLayout::calcEffectiveWidth):
     15        (WebCore::AutoTableLayout::layout):
     16        * rendering/AutoTableLayout.h:
     17        (WebCore::AutoTableLayout::Layout::Layout):
     18        * rendering/RenderStyle.h:
     19        (WebCore::RenderStyle::hasPadding):
     20
    1212007-04-27  Rob Buis  <buis@kde.org>
    222
  • trunk/WebCore/rendering/AutoTableLayout.cpp

    r21082 r21145  
    7070                RenderTableCell* cell = current.cell;
    7171               
     72                bool cellHasContent = cell && (cell->firstChild() || cell->style()->hasBorder() || cell->style()->hasPadding());
     73                if (cellHasContent)
     74                    l.emptyCellsOnly = false;
     75                   
    7276                if (current.inColSpan)
    7377                    continue;
     
    7579                    // A cell originates in this column.  Ensure we have
    7680                    // a min/max width of at least 1px for this column now.
    77                     l.minWidth = max(l.minWidth, 1);
     81                    l.minWidth = max(l.minWidth, cellHasContent ? 1 : 0);
    7882                    l.maxWidth = max(l.maxWidth, 1);
    7983                    if (cell->prefWidthsDirty())
     
    126130                        // This spanning cell originates in this column.  Ensure we have
    127131                        // a min/max width of at least 1px for this column now.
    128                         l.minWidth = max(l.minWidth, 1);
     132                        l.minWidth = max(l.minWidth, cellHasContent ? 1 : 0);
    129133                        l.maxWidth = max(l.maxWidth, 1);
    130134                        insertSpanCell(cell);
     
    327331        bool allColsAreFixed = true;
    328332        bool haveAuto = false;
     333        bool spanHasEmptyCellsOnly = true;
    329334        int fixedWidth = 0;
    330335        while (lastCol < nEffCols && span > 0) {
     
    362367                allColsAreFixed = false;
    363368            }
     369            if (!m_layoutStruct[lastCol].emptyCellsOnly)
     370                spanHasEmptyCellsOnly = false;
    364371            span -= m_table->spanOfEffCol(lastCol);
    365372            minWidth += m_layoutStruct[lastCol].effMinWidth;
     
    454461                m_layoutStruct[pos].maxWidth = max(m_layoutStruct[pos].maxWidth, m_layoutStruct[pos].minWidth);
    455462        }
     463        // treat span ranges consisting of empty cells only as if they had content
     464        if (spanHasEmptyCellsOnly)
     465            for (unsigned int pos = col; pos < lastCol; pos++)
     466                m_layoutStruct[pos].emptyCellsOnly = false;
    456467    }
    457468    m_effWidthDirty = false;
     
    525536    int totalPercent = 0;
    526537    int allocAuto = 0;
     538    int numAutoEmptyCellsOnly = 0;
    527539
    528540    // fill up every cell with its minWidth
     
    548560        case Auto:
    549561        case Static:
    550             numAuto++;
    551             totalAuto += m_layoutStruct[i].effMaxWidth;
    552             allocAuto += w;
     562            if (m_layoutStruct[i].emptyCellsOnly)
     563                numAutoEmptyCellsOnly++;           
     564            else {
     565                numAuto++;
     566                totalAuto += m_layoutStruct[i].effMaxWidth;
     567                allocAuto += w;
     568            }
     569            break;
    553570        default:
    554571            break;
     
    618635        for (int i = 0; i < nEffCols; i++) {
    619636            Length &width = m_layoutStruct[i].effWidth;
    620             if (width.isAuto() && totalAuto != 0) {
     637            if (width.isAuto() && totalAuto != 0 && !m_layoutStruct[i].emptyCellsOnly) {
    621638                int w = max(int(m_layoutStruct[i].calcWidth), available * m_layoutStruct[i].effMaxWidth / totalAuto);
    622639                available -= w;
     
    668685
    669686    // spread over the rest
    670     if (available > 0) {
    671         int total = nEffCols;
     687    if (available > 0 && nEffCols > numAutoEmptyCellsOnly) {
     688        int total = nEffCols - numAutoEmptyCellsOnly;
    672689        // still have some width to spread
    673690        int i = nEffCols;
    674         while ( i--) {
     691        while (i--) {
     692            // variable columns with empty cells only don't get any width
     693            if (m_layoutStruct[i].width.isAuto() && m_layoutStruct[i].emptyCellsOnly)
     694                continue;
    675695            int w = available / total;
    676696            available -= w;
  • trunk/WebCore/rendering/AutoTableLayout.h

    r21082 r21145  
    6363            , effMinWidth(0)
    6464            , effMaxWidth(0)
    65             , calcWidth(0) {}
     65            , calcWidth(0)
     66            , emptyCellsOnly(true) {}
    6667        Length width;
    6768        Length effWidth;
     
    7172        int effMaxWidth;
    7273        int calcWidth;
     74        bool emptyCellsOnly;
    7375    };
    7476
  • trunk/WebCore/rendering/RenderStyle.h

    r20967 r21145  
    12301230    bool        hasMargin() const { return surround->margin.nonZero(); }
    12311231    bool        hasBorder() const { return surround->border.hasBorder(); }
     1232    bool        hasPadding() const { return surround->padding.nonZero(); }
    12321233    bool        hasOffset() const { return surround->offset.nonZero(); }
    12331234
Note: See TracChangeset for help on using the changeset viewer.