Changeset 29647 in webkit


Ignore:
Timestamp:
Jan 18, 2008 1:56:31 PM (16 years ago)
Author:
hyatt@apple.com
Message:

WebCore:

Fix for http://bugs.webkit.org/show_bug.cgi?id=14975

Computed size of padding is incorrect because we default padding to auto. This is a made-up value that
was only used to implement cellpadding on tables. We needed this made-up value in order to tell that
padding wasn't set so that we could then apply cellpadding.


This patch rewrites cellpadding to be like other browsers. Instead of being a setting on the table
renderer that applies to all cells (even ones that were not <td>s), cellpadding is now mapped into the
style of <td>s. With this change it effectively becomes a content model feature and not a rendering
feature.

For example, a <td> will pick up cellpadding even when it is not a cell and/or the enclosing <table> is
not a table. Anonymous cells and CSS-display-type cells will now never pick up cellpadding. This behavior
is all consistent with other browsers.

Reviewed by Antti

Added fast/css/padding-no-renderer.html

  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::styleForElement):
  • css/CSSStyleSelector.h:
  • dom/StyledElement.cpp:
  • dom/StyledElement.h: (WebCore::StyledElement::canHaveAdditionalAttributeStyleDecls): (WebCore::StyledElement::additionalAttributeStyleDecls):
  • html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls):
  • html/HTMLTableCellElement.h: (WebCore::HTMLTableCellElement::canHaveAdditionalAttributeStyleDecls):
  • html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::additionalAttributeStyleDecls):
  • html/HTMLTableColElement.h: (WebCore::HTMLTableColElement::canHaveAdditionalAttributeStyleDecls):
  • html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::parseMappedAttribute): (WebCore::HTMLTableElement::additionalAttributeStyleDecls): (WebCore::HTMLTableElement::addSharedCellDecls): (WebCore::HTMLTableElement::addSharedCellBordersDecl): (WebCore::HTMLTableElement::addSharedCellPaddingDecl): (WebCore::HTMLTableElement::addSharedGroupDecls): (WebCore::HTMLTableElement::attach):
  • html/HTMLTableElement.h: (WebCore::HTMLTableElement::canHaveAdditionalAttributeStyleDecls):
  • html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls):
  • html/HTMLTableSectionElement.h: (WebCore::HTMLTableSectionElement::canHaveAdditionalAttributeStyleDecls):
  • rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn):
  • rendering/RenderObject.cpp: (WebCore::RenderObject::paddingTop): (WebCore::RenderObject::paddingBottom): (WebCore::RenderObject::paddingLeft): (WebCore::RenderObject::paddingRight):
  • rendering/RenderStyle.cpp: (WebCore::StyleSurroundData::StyleSurroundData):
  • rendering/RenderStyle.h: (WebCore::RenderStyle::initialPadding):
  • rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable):
  • rendering/RenderTable.h:

LayoutTests:

Updated results for http://bugs.webkit.org/show_bug.cgi?id=14975

Reviewed by Antti

  • fast/css/computed-style-without-renderer-expected.txt:
  • fast/css/padding-no-renderer-expected.txt: Added.
  • fast/css/padding-no-renderer.html: Added.
  • platform/mac/fast/css/acid2-expected.checksum:
  • platform/mac/fast/css/acid2-expected.png:
  • platform/mac/fast/css/acid2-expected.txt:
  • platform/mac/fast/css/acid2-pixel-expected.checksum:
  • platform/mac/fast/css/acid2-pixel-expected.png:
  • platform/mac/fast/css/acid2-pixel-expected.txt:
  • platform/mac/fast/frames/viewsource-attribute-expected.checksum:
  • platform/mac/fast/frames/viewsource-attribute-expected.png:
  • platform/mac/fast/frames/viewsource-attribute-expected.txt:
  • platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.checksum:
  • platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.png:
  • platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.txt:
  • platform/mac/fast/table/add-before-anonymous-child-expected.checksum:
  • platform/mac/fast/table/add-before-anonymous-child-expected.png:
  • platform/mac/fast/table/add-before-anonymous-child-expected.txt:
  • platform/mac/fast/table/cell-absolute-child-expected.checksum:
  • platform/mac/fast/table/cell-absolute-child-expected.png:
  • platform/mac/fast/table/cell-absolute-child-expected.txt:
  • platform/mac/fast/table/frame-and-rules-expected.checksum:
  • platform/mac/fast/table/frame-and-rules-expected.png:
  • platform/mac/fast/table/frame-and-rules-expected.txt:
  • platform/mac/http/tests/misc/acid2-expected.checksum:
  • platform/mac/http/tests/misc/acid2-expected.png:
  • platform/mac/http/tests/misc/acid2-expected.txt:
  • platform/mac/http/tests/misc/acid2-pixel-expected.checksum:
  • platform/mac/http/tests/misc/acid2-pixel-expected.png:
  • platform/mac/http/tests/misc/acid2-pixel-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug30985-expected.checksum:
  • platform/mac/tables/mozilla/bugs/bug30985-expected.png:
  • platform/mac/tables/mozilla/bugs/bug30985-expected.txt:
Location:
trunk
Files:
2 added
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r29646 r29647  
     12008-01-18  David Hyatt  <hyatt@apple.com>
     2
     3        Updated results for http://bugs.webkit.org/show_bug.cgi?id=14975
     4
     5        Reviewed by Antti
     6
     7        * fast/css/computed-style-without-renderer-expected.txt:
     8        * fast/css/padding-no-renderer-expected.txt: Added.
     9        * fast/css/padding-no-renderer.html: Added.
     10        * platform/mac/fast/css/acid2-expected.checksum:
     11        * platform/mac/fast/css/acid2-expected.png:
     12        * platform/mac/fast/css/acid2-expected.txt:
     13        * platform/mac/fast/css/acid2-pixel-expected.checksum:
     14        * platform/mac/fast/css/acid2-pixel-expected.png:
     15        * platform/mac/fast/css/acid2-pixel-expected.txt:
     16        * platform/mac/fast/frames/viewsource-attribute-expected.checksum:
     17        * platform/mac/fast/frames/viewsource-attribute-expected.png:
     18        * platform/mac/fast/frames/viewsource-attribute-expected.txt:
     19        * platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.checksum:
     20        * platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.png:
     21        * platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.txt:
     22        * platform/mac/fast/table/add-before-anonymous-child-expected.checksum:
     23        * platform/mac/fast/table/add-before-anonymous-child-expected.png:
     24        * platform/mac/fast/table/add-before-anonymous-child-expected.txt:
     25        * platform/mac/fast/table/cell-absolute-child-expected.checksum:
     26        * platform/mac/fast/table/cell-absolute-child-expected.png:
     27        * platform/mac/fast/table/cell-absolute-child-expected.txt:
     28        * platform/mac/fast/table/frame-and-rules-expected.checksum:
     29        * platform/mac/fast/table/frame-and-rules-expected.png:
     30        * platform/mac/fast/table/frame-and-rules-expected.txt:
     31        * platform/mac/http/tests/misc/acid2-expected.checksum:
     32        * platform/mac/http/tests/misc/acid2-expected.png:
     33        * platform/mac/http/tests/misc/acid2-expected.txt:
     34        * platform/mac/http/tests/misc/acid2-pixel-expected.checksum:
     35        * platform/mac/http/tests/misc/acid2-pixel-expected.png:
     36        * platform/mac/http/tests/misc/acid2-pixel-expected.txt:
     37        * platform/mac/tables/mozilla/bugs/bug30985-expected.checksum:
     38        * platform/mac/tables/mozilla/bugs/bug30985-expected.png:
     39        * platform/mac/tables/mozilla/bugs/bug30985-expected.txt:
     40
    1412008-01-18  Dan Bernstein  <mitz@apple.com>
    242
  • trunk/LayoutTests/fast/css/computed-style-without-renderer-expected.txt

    r26853 r29647  
    5454    overflow-x: visible
    5555    overflow-y: visible
    56     padding-bottom: auto
    57     padding-left: auto
    58     padding-right: auto
    59     padding-top: auto
     56    padding-bottom: 0px
     57    padding-left: 0px
     58    padding-right: 0px
     59    padding-top: 0px
    6060    page-break-after: auto
    6161    page-break-before: auto
  • trunk/LayoutTests/platform/mac/fast/css/acid2-expected.checksum

    r26026 r29647  
    1 e36d355c06332a87634267efab8fc48e
     10c62bfa8526ce05b9909addf93104911
  • trunk/LayoutTests/platform/mac/fast/css/acid2-expected.txt

    r26998 r29647  
    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/platform/mac/fast/css/acid2-pixel-expected.checksum

    r26026 r29647  
    1 0ff8f07f1878d7bb12677162ffbfe298
     1893cab444ca9b4cd5560995e365babed
  • trunk/LayoutTests/platform/mac/fast/css/acid2-pixel-expected.txt

    r26998 r29647  
    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/platform/mac/fast/frames/viewsource-attribute-expected.checksum

    r26026 r29647  
    1 5732e15343bcc4142553ae594edb2f74
     1391ed1917147cd6a0037e0c1e657d723
  • trunk/LayoutTests/platform/mac/fast/frames/viewsource-attribute-expected.txt

    r25970 r29647  
    1818            RenderBlock {HTML} at (0,0) size 300x150
    1919              RenderBody {BODY} at (0,0) size 300x150
    20                 RenderTable {TABLE} at (0,0) size 180x15
    21                   RenderTableSection {TBODY} at (0,0) size 180x15
    22                     RenderTableRow {TR} at (0,0) size 180x15
    23                       RenderTableCell {TD} at (0,4) size 26x10 [color=#808080] [bgcolor=#F0F0F0] [border: none (1px solid #808080) none] [r=0 c=0 rs=1 cs=1]
     20                RenderTable {TABLE} at (0,0) size 170x17
     21                  RenderTableSection {TBODY} at (0,0) size 170x17
     22                    RenderTableRow {TR} at (0,0) size 170x17
     23                      RenderTableCell {TD} at (0,4) size 24x12 [color=#808080] [bgcolor=#F0F0F0] [border: none (1px solid #808080) none] [r=0 c=0 rs=1 cs=1]
    2424                        RenderInline (generated) at (0,0) size 5x10
    25                           RenderCounter at (18,0) size 5x10
    26                             text run at (18,0) width 5: "1"
    27                       RenderTableCell {TD} at (26,0) size 154x15 [r=0 c=1 rs=1 cs=1]
     25                          RenderCounter at (17,1) size 5x10
     26                            text run at (17,1) width 5: "1"
     27                      RenderTableCell {TD} at (24,0) size 146x17 [r=0 c=1 rs=1 cs=1]
    2828                        RenderInline {SPAN} at (0,0) size 24x15 [color=#881280]
    29                           RenderText {#text} at (5,0) size 24x15
    30                             text run at (5,0) width 24: "<p>"
    31                         RenderText {#text} at (29,0) size 88x15
    32                           text run at (29,0) width 88: "hello world"
     29                          RenderText {#text} at (1,1) size 24x15
     30                            text run at (1,1) width 24: "<p>"
     31                        RenderText {#text} at (25,1) size 88x15
     32                          text run at (25,1) width 88: "hello world"
    3333                        RenderInline {SPAN} at (0,0) size 32x15 [color=#881280]
    34                           RenderText {#text} at (117,0) size 32x15
    35                             text run at (117,0) width 32: "</p>"
     34                          RenderText {#text} at (113,1) size 32x15
     35                            text run at (113,1) width 32: "</p>"
    3636        RenderText {#text} at (304,140) size 4x18
    3737          text run at (304,140) width 4: " "
     
    5151                    RenderBlock {HTML} at (0,0) size 300x150
    5252                      RenderBody {BODY} at (0,0) size 300x150
    53                         RenderTable {TABLE} at (0,0) size 180x15
    54                           RenderTableSection {TBODY} at (0,0) size 180x15
    55                             RenderTableRow {TR} at (0,0) size 180x15
    56                               RenderTableCell {TD} at (0,4) size 26x10 [color=#808080] [bgcolor=#F0F0F0] [border: none (1px solid #808080) none] [r=0 c=0 rs=1 cs=1]
     53                        RenderTable {TABLE} at (0,0) size 170x17
     54                          RenderTableSection {TBODY} at (0,0) size 170x17
     55                            RenderTableRow {TR} at (0,0) size 170x17
     56                              RenderTableCell {TD} at (0,4) size 24x12 [color=#808080] [bgcolor=#F0F0F0] [border: none (1px solid #808080) none] [r=0 c=0 rs=1 cs=1]
    5757                                RenderInline (generated) at (0,0) size 5x10
    58                                   RenderCounter at (18,0) size 5x10
    59                                     text run at (18,0) width 5: "1"
    60                               RenderTableCell {TD} at (26,0) size 154x15 [r=0 c=1 rs=1 cs=1]
     58                                  RenderCounter at (17,1) size 5x10
     59                                    text run at (17,1) width 5: "1"
     60                              RenderTableCell {TD} at (24,0) size 146x17 [r=0 c=1 rs=1 cs=1]
    6161                                RenderInline {SPAN} at (0,0) size 24x15 [color=#881280]
    62                                   RenderText {#text} at (5,0) size 24x15
    63                                     text run at (5,0) width 24: "<p>"
    64                                 RenderText {#text} at (29,0) size 88x15
    65                                   text run at (29,0) width 88: "hello world"
     62                                  RenderText {#text} at (1,1) size 24x15
     63                                    text run at (1,1) width 24: "<p>"
     64                                RenderText {#text} at (25,1) size 88x15
     65                                  text run at (25,1) width 88: "hello world"
    6666                                RenderInline {SPAN} at (0,0) size 32x15 [color=#881280]
    67                                   RenderText {#text} at (117,0) size 32x15
    68                                     text run at (117,0) width 32: "</p>"
     67                                  RenderText {#text} at (113,1) size 32x15
     68                                    text run at (113,1) width 32: "</p>"
    6969        RenderText {#text} at (0,0) size 0x0
    7070        RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.checksum

    r26026 r29647  
    1 4e3eb2fe11d7cb9748ef5a16d51fc312
     14de0192c9319fe9fe7d8ce952bd62159
  • trunk/LayoutTests/platform/mac/fast/lists/ordered-list-with-no-ol-tag-expected.txt

    r25970 r29647  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x534
    4   RenderBlock {HTML} at (0,0) size 800x534
    5     RenderBody {BODY} at (8,19) size 784x507
     3layer at (0,0) size 800x538
     4  RenderBlock {HTML} at (0,0) size 800x538
     5    RenderBody {BODY} at (8,19) size 784x511
    66      RenderBlock {H2} at (0,0) size 784x28
    77        RenderText {#text} at (0,0) size 305x28
     
    1010        RenderText {#text} at (0,0) size 551x18
    1111          text run at (0,0) width 551: "The outer list is numbered using decimal numerals, the inner lists with lower case letters"
    12       RenderBlock {DIV} at (24,81) size 760x426 [border: (1px solid #000000)]
     12      RenderBlock {DIV} at (24,81) size 760x430 [border: (1px solid #000000)]
    1313        RenderListItem {DIV} at (33,1) size 726x20 [border: (1px solid #000000)]
    1414          RenderListMarker at (-20,1) size 16x18: "1"
     
    6868          RenderText {#text} at (33,1) size 40x18
    6969            text run at (33,1) width 40: "Item 4"
    70         RenderListItem {DIV} at (33,297) size 726x108 [border: (1px solid #000000)]
     70        RenderListItem {DIV} at (33,297) size 726x112 [border: (1px solid #000000)]
    7171          RenderBlock (anonymous) at (33,1) size 692x18
    7272            RenderListMarker at (-53,0) size 16x18: "5"
    7373            RenderText {#text} at (0,0) size 40x18
    7474              text run at (0,0) width 40: "Item 5"
    75           RenderListItem {TABLE} at (33,19) size 692x44 [border: (1px dashed #000000)]
     75          RenderListItem {TABLE} at (33,19) size 692x46 [border: (1px dashed #000000)]
    7676            RenderBlock (anonymous) at (1,1) size 690x18
    7777              RenderListMarker at (-20,0) size 15x18: "a"
    78             RenderTable at (1,19) size 189x24
    79               RenderTableSection {TBODY} at (0,0) size 189x24
    80                 RenderTableRow {TR} at (0,2) size 189x20
    81                   RenderTableCell {TD} at (2,2) size 92x20 [border: (1px dotted #000000)] [r=0 c=0 rs=1 cs=1]
    82                     RenderText {#text} at (1,1) size 90x18
    83                       text run at (1,1) width 90: "Table Cell A1"
    84                   RenderTableCell {TD} at (96,2) size 91x20 [border: (1px dotted #000000)] [r=0 c=1 rs=1 cs=1]
    85                     RenderText {#text} at (1,1) size 89x18
    86                       text run at (1,1) width 89: "Table Cell B1"
    87           RenderListItem {TABLE} at (33,63) size 692x44 [border: (1px dashed #000000)]
     78            RenderTable at (1,19) size 193x26
     79              RenderTableSection {TBODY} at (0,0) size 193x26
     80                RenderTableRow {TR} at (0,2) size 193x22
     81                  RenderTableCell {TD} at (2,2) size 94x22 [border: (1px dotted #000000)] [r=0 c=0 rs=1 cs=1]
     82                    RenderText {#text} at (2,2) size 90x18
     83                      text run at (2,2) width 90: "Table Cell A1"
     84                  RenderTableCell {TD} at (98,2) size 93x22 [border: (1px dotted #000000)] [r=0 c=1 rs=1 cs=1]
     85                    RenderText {#text} at (2,2) size 89x18
     86                      text run at (2,2) width 89: "Table Cell B1"
     87          RenderListItem {TABLE} at (33,65) size 692x46 [border: (1px dashed #000000)]
    8888            RenderBlock (anonymous) at (1,1) size 690x18
    8989              RenderListMarker at (-21,0) size 16x18: "b"
    90             RenderTable at (1,19) size 213x24
    91               RenderTableSection {TBODY} at (0,0) size 213x24
    92                 RenderTableRow {TR} at (0,2) size 213x20
    93                   RenderTableCell {TD} at (2,2) size 104x20 [border: (1px dotted #000000)] [r=0 c=0 rs=1 cs=1]
    94                     RenderText {#text} at (1,1) size 102x18
    95                       text run at (1,1) width 102: "Table 2 Cell A1"
    96                   RenderTableCell {TD} at (108,2) size 103x20 [border: (1px dotted #000000)] [r=0 c=1 rs=1 cs=1]
    97                     RenderText {#text} at (1,1) size 101x18
    98                       text run at (1,1) width 101: "Table 2 Cell B1"
    99         RenderListItem {DIV} at (33,405) size 726x20 [border: (1px solid #000000)]
     90            RenderTable at (1,19) size 217x26
     91              RenderTableSection {TBODY} at (0,0) size 217x26
     92                RenderTableRow {TR} at (0,2) size 217x22
     93                  RenderTableCell {TD} at (2,2) size 106x22 [border: (1px dotted #000000)] [r=0 c=0 rs=1 cs=1]
     94                    RenderText {#text} at (2,2) size 102x18
     95                      text run at (2,2) width 102: "Table 2 Cell A1"
     96                  RenderTableCell {TD} at (110,2) size 105x22 [border: (1px dotted #000000)] [r=0 c=1 rs=1 cs=1]
     97                    RenderText {#text} at (2,2) size 101x18
     98                      text run at (2,2) width 101: "Table 2 Cell B1"
     99        RenderListItem {DIV} at (33,409) size 726x20 [border: (1px solid #000000)]
    100100          RenderListMarker at (-20,1) size 16x18: "6"
    101101          RenderText {#text} at (33,1) size 40x18
  • trunk/LayoutTests/platform/mac/fast/table/add-before-anonymous-child-expected.checksum

    r26026 r29647  
    1 f1c798b18c18aa0e55688bf5eb23d58f
     1898e57d58bf121e98df63feda22c0924
  • trunk/LayoutTests/platform/mac/fast/table/add-before-anonymous-child-expected.txt

    r26998 r29647  
    2222          text run at (405,0) width 319: "The green square should be above the blue square."
    2323      RenderBlock {HR} at (0,86) size 784x2 [border: (1px inset #000000)]
    24       RenderTable {TABLE} at (0,96) size 106x206
    25         RenderTableSection {TBODY} at (0,0) size 106x206
    26           RenderTableRow (anonymous) at (0,2) size 106x202
    27             RenderTableCell (anonymous) at (2,2) size 102x202 [r=0 c=0 rs=1 cs=1]
    28               RenderBlock {TR} at (1,1) size 100x100 [bgcolor=#008000]
    29               RenderBlock {TR} at (1,101) size 100x100 [bgcolor=#0000FF]
     24      RenderTable {TABLE} at (0,96) size 104x204
     25        RenderTableSection {TBODY} at (0,0) size 104x204
     26          RenderTableRow (anonymous) at (0,2) size 104x200
     27            RenderTableCell (anonymous) at (2,2) size 100x200 [r=0 c=0 rs=1 cs=1]
     28              RenderBlock {TR} at (0,0) size 100x100 [bgcolor=#008000]
     29              RenderBlock {TR} at (0,100) size 100x100 [bgcolor=#0000FF]
  • trunk/LayoutTests/platform/mac/fast/table/cell-absolute-child-expected.checksum

    r26026 r29647  
    1 fa0463e52a788593f5a12927dfb806e3
     1f3e8ca615be21f78c79bb2222f3f8db5
  • trunk/LayoutTests/platform/mac/fast/table/cell-absolute-child-expected.txt

    r26998 r29647  
    2020        RenderText {#text} at (0,0) size 535x18
    2121          text run at (0,0) width 535: "You should see two identical green squares, 100x100 pixels each, next to each other."
    22       RenderTable {TABLE} at (0,86) size 108x156
    23         RenderTableSection {TBODY} at (0,0) size 108x156
    24           RenderTableRow {TR} at (0,2) size 108x50
    25             RenderTableCell {TD} at (2,26) size 104x2 [r=0 c=0 rs=1 cs=2]
    26           RenderTableRow {TR} at (0,54) size 108x100
     22      RenderTable {TABLE} at (0,86) size 107x156
     23        RenderTableSection {TBODY} at (0,0) size 107x156
     24          RenderTableRow {TR} at (0,2) size 107x50
     25            RenderTableCell {TD} at (2,26) size 103x2 [r=0 c=0 rs=1 cs=2]
     26          RenderTableRow {TR} at (0,54) size 107x100
    2727            RenderTableCell {TD} at (2,54) size 100x2 [bgcolor=#008000] [r=1 c=0 rs=1 cs=1]
    28             RenderTableCell (anonymous) at (104,53) size 2x2 [r=1 c=1 rs=1 cs=1]
     28            RenderTableCell (anonymous) at (104,54) size 1x0 [r=1 c=1 rs=1 cs=1]
    2929layer at (11,149) size 98x98
    3030  RenderBlock (positioned) {DIV} at (11,149) size 98x98
    31 layer at (113,148) size 100x100
    32   RenderBlock (positioned) {TD} at (113,148) size 100x100 [bgcolor=#008000]
     31layer at (112,148) size 102x102
     32  RenderBlock (positioned) {TD} at (112,148) size 102x102 [bgcolor=#008000]
  • trunk/LayoutTests/platform/mac/fast/table/frame-and-rules-expected.checksum

    r26026 r29647  
    1 f0fe3afb4af2d71a1c27abad7a4abe54
     1b2f2f61588dd74e3ecc1039aa19ab40d
  • trunk/LayoutTests/platform/mac/fast/table/frame-and-rules-expected.txt

    r25970 r29647  
    22092209              RenderText {#text} at (2,2) size 89x18
    22102210                text run at (2,2) width 89: "Row 5, Cell 3"
    2211 layer at (393,24) size 392x150
     2211layer at (393,24) size 392x155
    22122212  RenderBlock (positioned) {TABLE} at (393,24) size 392x150
    2213     RenderTable at (0,0) size 339x141
    2214       RenderBlock {CAPTION} at (0,0) size 339x18
    2215         RenderText {#text} at (50,0) size 234x18
    2216           text run at (50,0) width 234: "Local links to specific testcase tables"
     2213    RenderTable at (0,0) size 361x155
     2214      RenderBlock {CAPTION} at (0,0) size 361x18
     2215        RenderText {#text} at (61,0) size 234x18
     2216          text run at (61,0) width 234: "Local links to specific testcase tables"
    22172217        RenderInline (generated) at (0,0) size 5x18
    2218           RenderText at (284,0) size 5x18
    2219             text run at (284,0) width 5: ":"
     2218          RenderText at (295,0) size 5x18
     2219            text run at (295,0) width 5: ":"
    22202220      RenderTableCol {COLGROUP} at (0,0) size 0x0
    22212221      RenderTableCol {COLGROUP} at (0,0) size 0x0
    2222       RenderTableSection {THEAD} at (0,18) size 339x36
    2223         RenderTableRow {TR} at (0,2) size 339x15
    2224           RenderTableCell {TH} at (2,18) size 70x0 [r=0 c=0 rs=2 cs=2]
    2225           RenderTableCell {TH} at (74,2) size 263x15 [r=0 c=2 rs=1 cs=9]
    2226             RenderText {#text} at (115,0) size 33x15
    2227               text run at (115,0) width 33: "Frame"
    2228         RenderTableRow {TR} at (0,19) size 339x15
    2229           RenderTableCell {TH} at (74,19) size 25x15 [r=1 c=2 rs=1 cs=1]
    2230             RenderText {#text} at (0,0) size 25x15
    2231               text run at (0,0) width 25: "void"
    2232           RenderTableCell {TH} at (101,19) size 33x15 [r=1 c=3 rs=1 cs=1]
    2233             RenderText {#text} at (0,0) size 33x15
    2234               text run at (0,0) width 33: "above"
    2235           RenderTableCell {TH} at (136,19) size 33x15 [r=1 c=4 rs=1 cs=1]
    2236             RenderText {#text} at (0,0) size 33x15
    2237               text run at (0,0) width 33: "below"
    2238           RenderTableCell {TH} at (171,19) size 34x15 [r=1 c=5 rs=1 cs=1]
    2239             RenderText {#text} at (0,0) size 34x15
    2240               text run at (0,0) width 34: "hsides"
    2241           RenderTableCell {TH} at (207,19) size 34x15 [r=1 c=6 rs=1 cs=1]
    2242             RenderText {#text} at (0,0) size 34x15
    2243               text run at (0,0) width 34: "vsides"
    2244           RenderTableCell {TH} at (243,19) size 16x15 [r=1 c=7 rs=1 cs=1]
    2245             RenderText {#text} at (0,0) size 16x15
    2246               text run at (0,0) width 16: "lhs"
    2247           RenderTableCell {TH} at (261,19) size 16x15 [r=1 c=8 rs=1 cs=1]
    2248             RenderText {#text} at (0,0) size 16x15
    2249               text run at (0,0) width 16: "rhs"
    2250           RenderTableCell {TH} at (279,19) size 21x15 [r=1 c=9 rs=1 cs=1]
    2251             RenderText {#text} at (0,0) size 21x15
    2252               text run at (0,0) width 21: "box"
    2253           RenderTableCell {TH} at (302,19) size 35x15 [r=1 c=10 rs=1 cs=1]
    2254             RenderText {#text} at (0,0) size 35x15
    2255               text run at (0,0) width 35: "border"
    2256       RenderTableSection {TBODY} at (0,54) size 339x87
    2257         RenderTableRow {TR} at (0,2) size 339x15
    2258           RenderTableCell {TH} at (2,36) size 31x15 [r=0 c=0 rs=5 cs=1]
    2259             RenderText {#text} at (0,0) size 31x15
    2260               text run at (0,0) width 31: "Rules"
    2261           RenderTableCell {TH} at (35,2) size 37x15 [r=0 c=1 rs=1 cs=1]
    2262             RenderText {#text} at (10,0) size 27x15
    2263               text run at (10,0) width 27: "none"
    2264           RenderTableCell {TD} at (74,2) size 25x14 [bgcolor=#CCCCCC] [r=0 c=2 rs=1 cs=1]
    2265             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2266               RenderText {#text} at (5,0) size 15x14
    2267                 text run at (5,0) width 15: "Go"
    2268           RenderTableCell {TD} at (101,2) size 33x14 [bgcolor=#CCCCCC] [r=0 c=3 rs=1 cs=1]
    2269             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2270               RenderText {#text} at (9,0) size 15x14
    2271                 text run at (9,0) width 15: "Go"
    2272           RenderTableCell {TD} at (136,2) size 33x14 [bgcolor=#CCCCCC] [r=0 c=4 rs=1 cs=1]
    2273             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2274               RenderText {#text} at (9,0) size 15x14
    2275                 text run at (9,0) width 15: "Go"
    2276           RenderTableCell {TD} at (171,2) size 34x14 [bgcolor=#CCCCCC] [r=0 c=5 rs=1 cs=1]
    2277             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2278               RenderText {#text} at (9,0) size 15x14
    2279                 text run at (9,0) width 15: "Go"
    2280           RenderTableCell {TD} at (207,2) size 34x14 [bgcolor=#CCCCCC] [r=0 c=6 rs=1 cs=1]
    2281             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2282               RenderText {#text} at (9,0) size 15x14
    2283                 text run at (9,0) width 15: "Go"
    2284           RenderTableCell {TD} at (243,2) size 16x14 [bgcolor=#CCCCCC] [r=0 c=7 rs=1 cs=1]
    2285             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2286               RenderText {#text} at (0,0) size 15x14
    2287                 text run at (0,0) width 15: "Go"
    2288           RenderTableCell {TD} at (261,2) size 16x14 [bgcolor=#CCCCCC] [r=0 c=8 rs=1 cs=1]
    2289             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2290               RenderText {#text} at (0,0) size 15x14
    2291                 text run at (0,0) width 15: "Go"
    2292           RenderTableCell {TD} at (279,2) size 21x14 [bgcolor=#CCCCCC] [r=0 c=9 rs=1 cs=1]
    2293             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2294               RenderText {#text} at (3,0) size 15x14
    2295                 text run at (3,0) width 15: "Go"
    2296           RenderTableCell {TD} at (302,2) size 35x14 [bgcolor=#CCCCCC] [r=0 c=10 rs=1 cs=1]
    2297             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2298               RenderText {#text} at (10,0) size 15x14
    2299                 text run at (10,0) width 15: "Go"
    2300         RenderTableRow {TR} at (0,19) size 339x15
    2301           RenderTableCell {TH} at (35,19) size 37x15 [r=1 c=1 rs=1 cs=1]
    2302             RenderText {#text} at (0,0) size 37x15
    2303               text run at (0,0) width 37: "groups"
    2304           RenderTableCell {TD} at (74,19) size 25x14 [bgcolor=#CCCCCC] [r=1 c=2 rs=1 cs=1]
    2305             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2306               RenderText {#text} at (5,0) size 15x14
    2307                 text run at (5,0) width 15: "Go"
    2308           RenderTableCell {TD} at (101,19) size 33x14 [bgcolor=#CCCCCC] [r=1 c=3 rs=1 cs=1]
    2309             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2310               RenderText {#text} at (9,0) size 15x14
    2311                 text run at (9,0) width 15: "Go"
    2312           RenderTableCell {TD} at (136,19) size 33x14 [bgcolor=#CCCCCC] [r=1 c=4 rs=1 cs=1]
    2313             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2314               RenderText {#text} at (9,0) size 15x14
    2315                 text run at (9,0) width 15: "Go"
    2316           RenderTableCell {TD} at (171,19) size 34x14 [bgcolor=#CCCCCC] [r=1 c=5 rs=1 cs=1]
    2317             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2318               RenderText {#text} at (9,0) size 15x14
    2319                 text run at (9,0) width 15: "Go"
    2320           RenderTableCell {TD} at (207,19) size 34x14 [bgcolor=#CCCCCC] [r=1 c=6 rs=1 cs=1]
    2321             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2322               RenderText {#text} at (9,0) size 15x14
    2323                 text run at (9,0) width 15: "Go"
    2324           RenderTableCell {TD} at (243,19) size 16x14 [bgcolor=#CCCCCC] [r=1 c=7 rs=1 cs=1]
    2325             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2326               RenderText {#text} at (0,0) size 15x14
    2327                 text run at (0,0) width 15: "Go"
    2328           RenderTableCell {TD} at (261,19) size 16x14 [bgcolor=#CCCCCC] [r=1 c=8 rs=1 cs=1]
    2329             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2330               RenderText {#text} at (0,0) size 15x14
    2331                 text run at (0,0) width 15: "Go"
    2332           RenderTableCell {TD} at (279,19) size 21x14 [bgcolor=#CCCCCC] [r=1 c=9 rs=1 cs=1]
    2333             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2334               RenderText {#text} at (3,0) size 15x14
    2335                 text run at (3,0) width 15: "Go"
    2336           RenderTableCell {TD} at (302,19) size 35x14 [bgcolor=#CCCCCC] [r=1 c=10 rs=1 cs=1]
    2337             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2338               RenderText {#text} at (10,0) size 15x14
    2339                 text run at (10,0) width 15: "Go"
    2340         RenderTableRow {TR} at (0,36) size 339x15
    2341           RenderTableCell {TH} at (35,36) size 37x15 [r=2 c=1 rs=1 cs=1]
    2342             RenderText {#text} at (12,0) size 25x15
    2343               text run at (12,0) width 25: "rows"
    2344           RenderTableCell {TD} at (74,36) size 25x14 [bgcolor=#CCCCCC] [r=2 c=2 rs=1 cs=1]
    2345             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2346               RenderText {#text} at (5,0) size 15x14
    2347                 text run at (5,0) width 15: "Go"
    2348           RenderTableCell {TD} at (101,36) size 33x14 [bgcolor=#CCCCCC] [r=2 c=3 rs=1 cs=1]
    2349             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2350               RenderText {#text} at (9,0) size 15x14
    2351                 text run at (9,0) width 15: "Go"
    2352           RenderTableCell {TD} at (136,36) size 33x14 [bgcolor=#CCCCCC] [r=2 c=4 rs=1 cs=1]
    2353             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2354               RenderText {#text} at (9,0) size 15x14
    2355                 text run at (9,0) width 15: "Go"
    2356           RenderTableCell {TD} at (171,36) size 34x14 [bgcolor=#CCCCCC] [r=2 c=5 rs=1 cs=1]
    2357             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2358               RenderText {#text} at (9,0) size 15x14
    2359                 text run at (9,0) width 15: "Go"
    2360           RenderTableCell {TD} at (207,36) size 34x14 [bgcolor=#CCCCCC] [r=2 c=6 rs=1 cs=1]
    2361             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2362               RenderText {#text} at (9,0) size 15x14
    2363                 text run at (9,0) width 15: "Go"
    2364           RenderTableCell {TD} at (243,36) size 16x14 [bgcolor=#CCCCCC] [r=2 c=7 rs=1 cs=1]
    2365             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2366               RenderText {#text} at (0,0) size 15x14
    2367                 text run at (0,0) width 15: "Go"
    2368           RenderTableCell {TD} at (261,36) size 16x14 [bgcolor=#CCCCCC] [r=2 c=8 rs=1 cs=1]
    2369             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2370               RenderText {#text} at (0,0) size 15x14
    2371                 text run at (0,0) width 15: "Go"
    2372           RenderTableCell {TD} at (279,36) size 21x14 [bgcolor=#CCCCCC] [r=2 c=9 rs=1 cs=1]
    2373             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2374               RenderText {#text} at (3,0) size 15x14
    2375                 text run at (3,0) width 15: "Go"
    2376           RenderTableCell {TD} at (302,36) size 35x14 [bgcolor=#CCCCCC] [r=2 c=10 rs=1 cs=1]
    2377             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2378               RenderText {#text} at (10,0) size 15x14
    2379                 text run at (10,0) width 15: "Go"
    2380         RenderTableRow {TR} at (0,53) size 339x15
    2381           RenderTableCell {TH} at (35,53) size 37x15 [r=3 c=1 rs=1 cs=1]
    2382             RenderText {#text} at (15,0) size 22x15
    2383               text run at (15,0) width 22: "cols"
    2384           RenderTableCell {TD} at (74,53) size 25x14 [bgcolor=#CCCCCC] [r=3 c=2 rs=1 cs=1]
    2385             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2386               RenderText {#text} at (5,0) size 15x14
    2387                 text run at (5,0) width 15: "Go"
    2388           RenderTableCell {TD} at (101,53) size 33x14 [bgcolor=#CCCCCC] [r=3 c=3 rs=1 cs=1]
    2389             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2390               RenderText {#text} at (9,0) size 15x14
    2391                 text run at (9,0) width 15: "Go"
    2392           RenderTableCell {TD} at (136,53) size 33x14 [bgcolor=#CCCCCC] [r=3 c=4 rs=1 cs=1]
    2393             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2394               RenderText {#text} at (9,0) size 15x14
    2395                 text run at (9,0) width 15: "Go"
    2396           RenderTableCell {TD} at (171,53) size 34x14 [bgcolor=#CCCCCC] [r=3 c=5 rs=1 cs=1]
    2397             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2398               RenderText {#text} at (9,0) size 15x14
    2399                 text run at (9,0) width 15: "Go"
    2400           RenderTableCell {TD} at (207,53) size 34x14 [bgcolor=#CCCCCC] [r=3 c=6 rs=1 cs=1]
    2401             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2402               RenderText {#text} at (9,0) size 15x14
    2403                 text run at (9,0) width 15: "Go"
    2404           RenderTableCell {TD} at (243,53) size 16x14 [bgcolor=#CCCCCC] [r=3 c=7 rs=1 cs=1]
    2405             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2406               RenderText {#text} at (0,0) size 15x14
    2407                 text run at (0,0) width 15: "Go"
    2408           RenderTableCell {TD} at (261,53) size 16x14 [bgcolor=#CCCCCC] [r=3 c=8 rs=1 cs=1]
    2409             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2410               RenderText {#text} at (0,0) size 15x14
    2411                 text run at (0,0) width 15: "Go"
    2412           RenderTableCell {TD} at (279,53) size 21x14 [bgcolor=#CCCCCC] [r=3 c=9 rs=1 cs=1]
    2413             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2414               RenderText {#text} at (3,0) size 15x14
    2415                 text run at (3,0) width 15: "Go"
    2416           RenderTableCell {TD} at (302,53) size 35x14 [bgcolor=#CCCCCC] [r=3 c=10 rs=1 cs=1]
    2417             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2418               RenderText {#text} at (10,0) size 15x14
    2419                 text run at (10,0) width 15: "Go"
    2420         RenderTableRow {TR} at (0,70) size 339x15
    2421           RenderTableCell {TH} at (35,70) size 37x15 [r=4 c=1 rs=1 cs=1]
    2422             RenderText {#text} at (23,0) size 14x15
    2423               text run at (23,0) width 14: "all"
    2424           RenderTableCell {TD} at (74,70) size 25x14 [bgcolor=#CCCCCC] [r=4 c=2 rs=1 cs=1]
    2425             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2426               RenderText {#text} at (5,0) size 15x14
    2427                 text run at (5,0) width 15: "Go"
    2428           RenderTableCell {TD} at (101,70) size 33x14 [bgcolor=#CCCCCC] [r=4 c=3 rs=1 cs=1]
    2429             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2430               RenderText {#text} at (9,0) size 15x14
    2431                 text run at (9,0) width 15: "Go"
    2432           RenderTableCell {TD} at (136,70) size 33x14 [bgcolor=#CCCCCC] [r=4 c=4 rs=1 cs=1]
    2433             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2434               RenderText {#text} at (9,0) size 15x14
    2435                 text run at (9,0) width 15: "Go"
    2436           RenderTableCell {TD} at (171,70) size 34x14 [bgcolor=#CCCCCC] [r=4 c=5 rs=1 cs=1]
    2437             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2438               RenderText {#text} at (9,0) size 15x14
    2439                 text run at (9,0) width 15: "Go"
    2440           RenderTableCell {TD} at (207,70) size 34x14 [bgcolor=#CCCCCC] [r=4 c=6 rs=1 cs=1]
    2441             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2442               RenderText {#text} at (9,0) size 15x14
    2443                 text run at (9,0) width 15: "Go"
    2444           RenderTableCell {TD} at (243,70) size 16x14 [bgcolor=#CCCCCC] [r=4 c=7 rs=1 cs=1]
    2445             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2446               RenderText {#text} at (0,0) size 15x14
    2447                 text run at (0,0) width 15: "Go"
    2448           RenderTableCell {TD} at (261,70) size 16x14 [bgcolor=#CCCCCC] [r=4 c=8 rs=1 cs=1]
    2449             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2450               RenderText {#text} at (0,0) size 15x14
    2451                 text run at (0,0) width 15: "Go"
    2452           RenderTableCell {TD} at (279,70) size 21x14 [bgcolor=#CCCCCC] [r=4 c=9 rs=1 cs=1]
    2453             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2454               RenderText {#text} at (3,0) size 15x14
    2455                 text run at (3,0) width 15: "Go"
    2456           RenderTableCell {TD} at (302,70) size 35x14 [bgcolor=#CCCCCC] [r=4 c=10 rs=1 cs=1]
    2457             RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
    2458               RenderText {#text} at (10,0) size 15x14
    2459                 text run at (10,0) width 15: "Go"
     2222      RenderTableSection {THEAD} at (0,18) size 361x40
     2223        RenderTableRow {TR} at (0,2) size 361x17
     2224          RenderTableCell {TH} at (2,19) size 74x2 [r=0 c=0 rs=2 cs=2]
     2225          RenderTableCell {TH} at (78,2) size 281x17 [r=0 c=2 rs=1 cs=9]
     2226            RenderText {#text} at (124,1) size 33x15
     2227              text run at (124,1) width 33: "Frame"
     2228        RenderTableRow {TR} at (0,21) size 361x17
     2229          RenderTableCell {TH} at (78,21) size 27x17 [r=1 c=2 rs=1 cs=1]
     2230            RenderText {#text} at (1,1) size 25x15
     2231              text run at (1,1) width 25: "void"
     2232          RenderTableCell {TH} at (107,21) size 35x17 [r=1 c=3 rs=1 cs=1]
     2233            RenderText {#text} at (1,1) size 33x15
     2234              text run at (1,1) width 33: "above"
     2235          RenderTableCell {TH} at (144,21) size 35x17 [r=1 c=4 rs=1 cs=1]
     2236            RenderText {#text} at (1,1) size 33x15
     2237              text run at (1,1) width 33: "below"
     2238          RenderTableCell {TH} at (181,21) size 36x17 [r=1 c=5 rs=1 cs=1]
     2239            RenderText {#text} at (1,1) size 34x15
     2240              text run at (1,1) width 34: "hsides"
     2241          RenderTableCell {TH} at (219,21) size 36x17 [r=1 c=6 rs=1 cs=1]
     2242            RenderText {#text} at (1,1) size 34x15
     2243              text run at (1,1) width 34: "vsides"
     2244          RenderTableCell {TH} at (257,21) size 18x17 [r=1 c=7 rs=1 cs=1]
     2245            RenderText {#text} at (1,1) size 16x15
     2246              text run at (1,1) width 16: "lhs"
     2247          RenderTableCell {TH} at (277,21) size 18x17 [r=1 c=8 rs=1 cs=1]
     2248            RenderText {#text} at (1,1) size 16x15
     2249              text run at (1,1) width 16: "rhs"
     2250          RenderTableCell {TH} at (297,21) size 23x17 [r=1 c=9 rs=1 cs=1]
     2251            RenderText {#text} at (1,1) size 21x15
     2252              text run at (1,1) width 21: "box"
     2253          RenderTableCell {TH} at (322,21) size 37x17 [r=1 c=10 rs=1 cs=1]
     2254            RenderText {#text} at (1,1) size 35x15
     2255              text run at (1,1) width 35: "border"
     2256      RenderTableSection {TBODY} at (0,58) size 361x97
     2257        RenderTableRow {TR} at (0,2) size 361x17
     2258          RenderTableCell {TH} at (2,40) size 33x17 [r=0 c=0 rs=5 cs=1]
     2259            RenderText {#text} at (1,1) size 31x15
     2260              text run at (1,1) width 31: "Rules"
     2261          RenderTableCell {TH} at (37,2) size 39x17 [r=0 c=1 rs=1 cs=1]
     2262            RenderText {#text} at (11,1) size 27x15
     2263              text run at (11,1) width 27: "none"
     2264          RenderTableCell {TD} at (78,2) size 27x16 [bgcolor=#CCCCCC] [r=0 c=2 rs=1 cs=1]
     2265            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2266              RenderText {#text} at (6,1) size 15x14
     2267                text run at (6,1) width 15: "Go"
     2268          RenderTableCell {TD} at (107,2) size 35x16 [bgcolor=#CCCCCC] [r=0 c=3 rs=1 cs=1]
     2269            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2270              RenderText {#text} at (10,1) size 15x14
     2271                text run at (10,1) width 15: "Go"
     2272          RenderTableCell {TD} at (144,2) size 35x16 [bgcolor=#CCCCCC] [r=0 c=4 rs=1 cs=1]
     2273            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2274              RenderText {#text} at (10,1) size 15x14
     2275                text run at (10,1) width 15: "Go"
     2276          RenderTableCell {TD} at (181,2) size 36x16 [bgcolor=#CCCCCC] [r=0 c=5 rs=1 cs=1]
     2277            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2278              RenderText {#text} at (10,1) size 15x14
     2279                text run at (10,1) width 15: "Go"
     2280          RenderTableCell {TD} at (219,2) size 36x16 [bgcolor=#CCCCCC] [r=0 c=6 rs=1 cs=1]
     2281            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2282              RenderText {#text} at (10,1) size 15x14
     2283                text run at (10,1) width 15: "Go"
     2284          RenderTableCell {TD} at (257,2) size 18x16 [bgcolor=#CCCCCC] [r=0 c=7 rs=1 cs=1]
     2285            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2286              RenderText {#text} at (1,1) size 15x14
     2287                text run at (1,1) width 15: "Go"
     2288          RenderTableCell {TD} at (277,2) size 18x16 [bgcolor=#CCCCCC] [r=0 c=8 rs=1 cs=1]
     2289            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2290              RenderText {#text} at (1,1) size 15x14
     2291                text run at (1,1) width 15: "Go"
     2292          RenderTableCell {TD} at (297,2) size 23x16 [bgcolor=#CCCCCC] [r=0 c=9 rs=1 cs=1]
     2293            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2294              RenderText {#text} at (4,1) size 15x14
     2295                text run at (4,1) width 15: "Go"
     2296          RenderTableCell {TD} at (322,2) size 37x16 [bgcolor=#CCCCCC] [r=0 c=10 rs=1 cs=1]
     2297            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2298              RenderText {#text} at (11,1) size 15x14
     2299                text run at (11,1) width 15: "Go"
     2300        RenderTableRow {TR} at (0,21) size 361x17
     2301          RenderTableCell {TH} at (37,21) size 39x17 [r=1 c=1 rs=1 cs=1]
     2302            RenderText {#text} at (1,1) size 37x15
     2303              text run at (1,1) width 37: "groups"
     2304          RenderTableCell {TD} at (78,21) size 27x16 [bgcolor=#CCCCCC] [r=1 c=2 rs=1 cs=1]
     2305            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2306              RenderText {#text} at (6,1) size 15x14
     2307                text run at (6,1) width 15: "Go"
     2308          RenderTableCell {TD} at (107,21) size 35x16 [bgcolor=#CCCCCC] [r=1 c=3 rs=1 cs=1]
     2309            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2310              RenderText {#text} at (10,1) size 15x14
     2311                text run at (10,1) width 15: "Go"
     2312          RenderTableCell {TD} at (144,21) size 35x16 [bgcolor=#CCCCCC] [r=1 c=4 rs=1 cs=1]
     2313            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2314              RenderText {#text} at (10,1) size 15x14
     2315                text run at (10,1) width 15: "Go"
     2316          RenderTableCell {TD} at (181,21) size 36x16 [bgcolor=#CCCCCC] [r=1 c=5 rs=1 cs=1]
     2317            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2318              RenderText {#text} at (10,1) size 15x14
     2319                text run at (10,1) width 15: "Go"
     2320          RenderTableCell {TD} at (219,21) size 36x16 [bgcolor=#CCCCCC] [r=1 c=6 rs=1 cs=1]
     2321            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2322              RenderText {#text} at (10,1) size 15x14
     2323                text run at (10,1) width 15: "Go"
     2324          RenderTableCell {TD} at (257,21) size 18x16 [bgcolor=#CCCCCC] [r=1 c=7 rs=1 cs=1]
     2325            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2326              RenderText {#text} at (1,1) size 15x14
     2327                text run at (1,1) width 15: "Go"
     2328          RenderTableCell {TD} at (277,21) size 18x16 [bgcolor=#CCCCCC] [r=1 c=8 rs=1 cs=1]
     2329            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2330              RenderText {#text} at (1,1) size 15x14
     2331                text run at (1,1) width 15: "Go"
     2332          RenderTableCell {TD} at (297,21) size 23x16 [bgcolor=#CCCCCC] [r=1 c=9 rs=1 cs=1]
     2333            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2334              RenderText {#text} at (4,1) size 15x14
     2335                text run at (4,1) width 15: "Go"
     2336          RenderTableCell {TD} at (322,21) size 37x16 [bgcolor=#CCCCCC] [r=1 c=10 rs=1 cs=1]
     2337            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2338              RenderText {#text} at (11,1) size 15x14
     2339                text run at (11,1) width 15: "Go"
     2340        RenderTableRow {TR} at (0,40) size 361x17
     2341          RenderTableCell {TH} at (37,40) size 39x17 [r=2 c=1 rs=1 cs=1]
     2342            RenderText {#text} at (13,1) size 25x15
     2343              text run at (13,1) width 25: "rows"
     2344          RenderTableCell {TD} at (78,40) size 27x16 [bgcolor=#CCCCCC] [r=2 c=2 rs=1 cs=1]
     2345            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2346              RenderText {#text} at (6,1) size 15x14
     2347                text run at (6,1) width 15: "Go"
     2348          RenderTableCell {TD} at (107,40) size 35x16 [bgcolor=#CCCCCC] [r=2 c=3 rs=1 cs=1]
     2349            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2350              RenderText {#text} at (10,1) size 15x14
     2351                text run at (10,1) width 15: "Go"
     2352          RenderTableCell {TD} at (144,40) size 35x16 [bgcolor=#CCCCCC] [r=2 c=4 rs=1 cs=1]
     2353            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2354              RenderText {#text} at (10,1) size 15x14
     2355                text run at (10,1) width 15: "Go"
     2356          RenderTableCell {TD} at (181,40) size 36x16 [bgcolor=#CCCCCC] [r=2 c=5 rs=1 cs=1]
     2357            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2358              RenderText {#text} at (10,1) size 15x14
     2359                text run at (10,1) width 15: "Go"
     2360          RenderTableCell {TD} at (219,40) size 36x16 [bgcolor=#CCCCCC] [r=2 c=6 rs=1 cs=1]
     2361            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2362              RenderText {#text} at (10,1) size 15x14
     2363                text run at (10,1) width 15: "Go"
     2364          RenderTableCell {TD} at (257,40) size 18x16 [bgcolor=#CCCCCC] [r=2 c=7 rs=1 cs=1]
     2365            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2366              RenderText {#text} at (1,1) size 15x14
     2367                text run at (1,1) width 15: "Go"
     2368          RenderTableCell {TD} at (277,40) size 18x16 [bgcolor=#CCCCCC] [r=2 c=8 rs=1 cs=1]
     2369            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2370              RenderText {#text} at (1,1) size 15x14
     2371                text run at (1,1) width 15: "Go"
     2372          RenderTableCell {TD} at (297,40) size 23x16 [bgcolor=#CCCCCC] [r=2 c=9 rs=1 cs=1]
     2373            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2374              RenderText {#text} at (4,1) size 15x14
     2375                text run at (4,1) width 15: "Go"
     2376          RenderTableCell {TD} at (322,40) size 37x16 [bgcolor=#CCCCCC] [r=2 c=10 rs=1 cs=1]
     2377            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2378              RenderText {#text} at (11,1) size 15x14
     2379                text run at (11,1) width 15: "Go"
     2380        RenderTableRow {TR} at (0,59) size 361x17
     2381          RenderTableCell {TH} at (37,59) size 39x17 [r=3 c=1 rs=1 cs=1]
     2382            RenderText {#text} at (16,1) size 22x15
     2383              text run at (16,1) width 22: "cols"
     2384          RenderTableCell {TD} at (78,59) size 27x16 [bgcolor=#CCCCCC] [r=3 c=2 rs=1 cs=1]
     2385            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2386              RenderText {#text} at (6,1) size 15x14
     2387                text run at (6,1) width 15: "Go"
     2388          RenderTableCell {TD} at (107,59) size 35x16 [bgcolor=#CCCCCC] [r=3 c=3 rs=1 cs=1]
     2389            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2390              RenderText {#text} at (10,1) size 15x14
     2391                text run at (10,1) width 15: "Go"
     2392          RenderTableCell {TD} at (144,59) size 35x16 [bgcolor=#CCCCCC] [r=3 c=4 rs=1 cs=1]
     2393            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2394              RenderText {#text} at (10,1) size 15x14
     2395                text run at (10,1) width 15: "Go"
     2396          RenderTableCell {TD} at (181,59) size 36x16 [bgcolor=#CCCCCC] [r=3 c=5 rs=1 cs=1]
     2397            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2398              RenderText {#text} at (10,1) size 15x14
     2399                text run at (10,1) width 15: "Go"
     2400          RenderTableCell {TD} at (219,59) size 36x16 [bgcolor=#CCCCCC] [r=3 c=6 rs=1 cs=1]
     2401            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2402              RenderText {#text} at (10,1) size 15x14
     2403                text run at (10,1) width 15: "Go"
     2404          RenderTableCell {TD} at (257,59) size 18x16 [bgcolor=#CCCCCC] [r=3 c=7 rs=1 cs=1]
     2405            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2406              RenderText {#text} at (1,1) size 15x14
     2407                text run at (1,1) width 15: "Go"
     2408          RenderTableCell {TD} at (277,59) size 18x16 [bgcolor=#CCCCCC] [r=3 c=8 rs=1 cs=1]
     2409            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2410              RenderText {#text} at (1,1) size 15x14
     2411                text run at (1,1) width 15: "Go"
     2412          RenderTableCell {TD} at (297,59) size 23x16 [bgcolor=#CCCCCC] [r=3 c=9 rs=1 cs=1]
     2413            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2414              RenderText {#text} at (4,1) size 15x14
     2415                text run at (4,1) width 15: "Go"
     2416          RenderTableCell {TD} at (322,59) size 37x16 [bgcolor=#CCCCCC] [r=3 c=10 rs=1 cs=1]
     2417            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2418              RenderText {#text} at (11,1) size 15x14
     2419                text run at (11,1) width 15: "Go"
     2420        RenderTableRow {TR} at (0,78) size 361x17
     2421          RenderTableCell {TH} at (37,78) size 39x17 [r=4 c=1 rs=1 cs=1]
     2422            RenderText {#text} at (24,1) size 14x15
     2423              text run at (24,1) width 14: "all"
     2424          RenderTableCell {TD} at (78,78) size 27x16 [bgcolor=#CCCCCC] [r=4 c=2 rs=1 cs=1]
     2425            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2426              RenderText {#text} at (6,1) size 15x14
     2427                text run at (6,1) width 15: "Go"
     2428          RenderTableCell {TD} at (107,78) size 35x16 [bgcolor=#CCCCCC] [r=4 c=3 rs=1 cs=1]
     2429            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2430              RenderText {#text} at (10,1) size 15x14
     2431                text run at (10,1) width 15: "Go"
     2432          RenderTableCell {TD} at (144,78) size 35x16 [bgcolor=#CCCCCC] [r=4 c=4 rs=1 cs=1]
     2433            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2434              RenderText {#text} at (10,1) size 15x14
     2435                text run at (10,1) width 15: "Go"
     2436          RenderTableCell {TD} at (181,78) size 36x16 [bgcolor=#CCCCCC] [r=4 c=5 rs=1 cs=1]
     2437            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2438              RenderText {#text} at (10,1) size 15x14
     2439                text run at (10,1) width 15: "Go"
     2440          RenderTableCell {TD} at (219,78) size 36x16 [bgcolor=#CCCCCC] [r=4 c=6 rs=1 cs=1]
     2441            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2442              RenderText {#text} at (10,1) size 15x14
     2443                text run at (10,1) width 15: "Go"
     2444          RenderTableCell {TD} at (257,78) size 18x16 [bgcolor=#CCCCCC] [r=4 c=7 rs=1 cs=1]
     2445            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2446              RenderText {#text} at (1,1) size 15x14
     2447                text run at (1,1) width 15: "Go"
     2448          RenderTableCell {TD} at (277,78) size 18x16 [bgcolor=#CCCCCC] [r=4 c=8 rs=1 cs=1]
     2449            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2450              RenderText {#text} at (1,1) size 15x14
     2451                text run at (1,1) width 15: "Go"
     2452          RenderTableCell {TD} at (297,78) size 23x16 [bgcolor=#CCCCCC] [r=4 c=9 rs=1 cs=1]
     2453            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2454              RenderText {#text} at (4,1) size 15x14
     2455                text run at (4,1) width 15: "Go"
     2456          RenderTableCell {TD} at (322,78) size 37x16 [bgcolor=#CCCCCC] [r=4 c=10 rs=1 cs=1]
     2457            RenderInline {A} at (0,0) size 15x14 [color=#0000EE]
     2458              RenderText {#text} at (11,1) size 15x14
     2459                text run at (11,1) width 15: "Go"
  • trunk/LayoutTests/platform/mac/http/tests/misc/acid2-expected.checksum

    r26026 r29647  
    1 e36d355c06332a87634267efab8fc48e
     10c62bfa8526ce05b9909addf93104911
  • trunk/LayoutTests/platform/mac/http/tests/misc/acid2-expected.txt

    r26998 r29647  
    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/platform/mac/http/tests/misc/acid2-pixel-expected.checksum

    r26026 r29647  
    1 0ff8f07f1878d7bb12677162ffbfe298
     1893cab444ca9b4cd5560995e365babed
  • trunk/LayoutTests/platform/mac/http/tests/misc/acid2-pixel-expected.txt

    r26998 r29647  
    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/platform/mac/tables/mozilla/bugs/bug30985-expected.checksum

    r26026 r29647  
    1 49bb2f32b6c32b78403c5766d9ce0c10
     14ee6ec57176a3fdf486c89a65871b5aa
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug30985-expected.txt

    r26998 r29647  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x56
    4   RenderBlock {HTML} at (0,0) size 800x56
    5     RenderBody {BODY} at (8,8) size 784x40
     3layer at (0,0) size 800x58
     4  RenderBlock {HTML} at (0,0) size 800x58
     5    RenderBody {BODY} at (8,8) size 784x42
    66      RenderBlock (anonymous) at (0,0) size 784x18
    77        RenderText {#text} at (0,0) size 255x18
    88          text run at (0,0) width 255: "This is the first of two lines on this page."
    9       RenderBlock {TABLE} at (0,18) size 784x22
    10         RenderTable at (0,0) size 279x22
    11           RenderTableSection {TBODY} at (0,0) size 279x22
    12             RenderTableRow (anonymous) at (0,2) size 279x18
    13               RenderTableCell (anonymous) at (2,2) size 275x18 [r=0 c=0 rs=1 cs=1]
    14                 RenderBlock {TR} at (0,0) size 275x18
    15                   RenderBlock {TD} at (0,0) size 275x18
    16                     RenderText {#text} at (0,0) size 275x18
    17                       text run at (0,0) width 275: "This is the second of two lines on this page."
     9      RenderBlock {TABLE} at (0,18) size 784x24
     10        RenderTable at (0,0) size 281x24
     11          RenderTableSection {TBODY} at (0,0) size 281x24
     12            RenderTableRow (anonymous) at (0,2) size 281x20
     13              RenderTableCell (anonymous) at (2,2) size 277x20 [r=0 c=0 rs=1 cs=1]
     14                RenderBlock {TR} at (0,0) size 277x20
     15                  RenderBlock {TD} at (0,0) size 277x20
     16                    RenderText {#text} at (1,1) size 275x18
     17                      text run at (1,1) width 275: "This is the second of two lines on this page."
  • trunk/WebCore/ChangeLog

    r29646 r29647  
     12008-01-18  David Hyatt  <hyatt@apple.com>
     2
     3        Fix for http://bugs.webkit.org/show_bug.cgi?id=14975
     4
     5        Computed size of padding is incorrect because we default padding to auto.  This is a made-up value that
     6        was only used to implement cellpadding on tables.  We needed this made-up value in order to tell that
     7        padding wasn't set so that we could then apply cellpadding.
     8       
     9        This patch rewrites cellpadding to be like other browsers.  Instead of being a setting on the table
     10        renderer that applies to all cells (even ones that were not <td>s), cellpadding is now mapped into the
     11        style of <td>s.  With this change it effectively becomes a content model feature and not a rendering
     12        feature.
     13
     14        For example, a <td> will pick up cellpadding even when it is not a cell and/or the enclosing <table> is
     15        not a table.  Anonymous cells and CSS-display-type cells will now never pick up cellpadding.  This behavior
     16        is all consistent with other browsers.
     17
     18        Reviewed by Antti
     19
     20        Added fast/css/padding-no-renderer.html
     21
     22        * css/CSSStyleSelector.cpp:
     23        (WebCore::CSSStyleSelector::canShareStyleWithElement):
     24        (WebCore::CSSStyleSelector::styleForElement):
     25        * css/CSSStyleSelector.h:
     26        * dom/StyledElement.cpp:
     27        * dom/StyledElement.h:
     28        (WebCore::StyledElement::canHaveAdditionalAttributeStyleDecls):
     29        (WebCore::StyledElement::additionalAttributeStyleDecls):
     30        * html/HTMLTableCellElement.cpp:
     31        (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls):
     32        * html/HTMLTableCellElement.h:
     33        (WebCore::HTMLTableCellElement::canHaveAdditionalAttributeStyleDecls):
     34        * html/HTMLTableColElement.cpp:
     35        (WebCore::HTMLTableColElement::additionalAttributeStyleDecls):
     36        * html/HTMLTableColElement.h:
     37        (WebCore::HTMLTableColElement::canHaveAdditionalAttributeStyleDecls):
     38        * html/HTMLTableElement.cpp:
     39        (WebCore::HTMLTableElement::parseMappedAttribute):
     40        (WebCore::HTMLTableElement::additionalAttributeStyleDecls):
     41        (WebCore::HTMLTableElement::addSharedCellDecls):
     42        (WebCore::HTMLTableElement::addSharedCellBordersDecl):
     43        (WebCore::HTMLTableElement::addSharedCellPaddingDecl):
     44        (WebCore::HTMLTableElement::addSharedGroupDecls):
     45        (WebCore::HTMLTableElement::attach):
     46        * html/HTMLTableElement.h:
     47        (WebCore::HTMLTableElement::canHaveAdditionalAttributeStyleDecls):
     48        * html/HTMLTableSectionElement.cpp:
     49        (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls):
     50        * html/HTMLTableSectionElement.h:
     51        (WebCore::HTMLTableSectionElement::canHaveAdditionalAttributeStyleDecls):
     52        * rendering/AutoTableLayout.cpp:
     53        (WebCore::AutoTableLayout::recalcColumn):
     54        * rendering/RenderObject.cpp:
     55        (WebCore::RenderObject::paddingTop):
     56        (WebCore::RenderObject::paddingBottom):
     57        (WebCore::RenderObject::paddingLeft):
     58        (WebCore::RenderObject::paddingRight):
     59        * rendering/RenderStyle.cpp:
     60        (WebCore::StyleSurroundData::StyleSurroundData):
     61        * rendering/RenderStyle.h:
     62        (WebCore::RenderStyle::initialPadding):
     63        * rendering/RenderTable.cpp:
     64        (WebCore::RenderTable::RenderTable):
     65        * rendering/RenderTable.h:
     66
    1672008-01-18  Dan Bernstein  <mitz@apple.com>
    268
  • trunk/WebCore/css/CSSStyleSelector.cpp

    r29581 r29647  
    767767            (s->getAttribute(XMLNames::langAttr) == m_element->getAttribute(XMLNames::langAttr)) &&
    768768            (s->getAttribute(langAttr) == m_element->getAttribute(langAttr)) &&
    769             (s->getAttribute(readonlyAttr) == m_element->getAttribute(readonlyAttr))) {
     769            (s->getAttribute(readonlyAttr) == m_element->getAttribute(readonlyAttr)) &&
     770            (s->getAttribute(cellpaddingAttr) == m_element->getAttribute(cellpaddingAttr))) {
    770771            bool isControl = s->isControl();
    771772            if (isControl != m_element->isControl())
     
    940941            // Tables and table cells share an additional mapped rule that must be applied
    941942            // after all attributes, since their mapped style depends on the values of multiple attributes.
    942             CSSMutableStyleDeclaration* attributeDecl = m_styledElement->additionalAttributeStyleDecl();
    943             if (attributeDecl) {
    944                 lastAuthorRule = m_matchedDecls.size();
    945                 if (firstAuthorRule == -1)
    946                     firstAuthorRule = lastAuthorRule;
    947                 addMatchedDeclaration(attributeDecl);
     943            if (m_styledElement->canHaveAdditionalAttributeStyleDecls()) {
     944                m_additionalAttributeStyleDecls.clear();
     945                m_styledElement->additionalAttributeStyleDecls(m_additionalAttributeStyleDecls);
     946                if (!m_additionalAttributeStyleDecls.isEmpty()) {
     947                    unsigned additionalDeclsSize = m_additionalAttributeStyleDecls.size();
     948                    if (firstAuthorRule == -1)
     949                        firstAuthorRule = m_matchedDecls.size();
     950                    lastAuthorRule = m_matchedDecls.size() + additionalDeclsSize - 1;
     951                    for (unsigned i = 0; i < additionalDeclsSize; i++)
     952                        addMatchedDeclaration(m_additionalAttributeStyleDecls[i]);
     953                }
    948954            }
    949955        }
  • trunk/WebCore/css/CSSStyleSelector.h

    r29320 r29647  
    240240
    241241        HashSet<AtomicStringImpl*> m_selectorAttrs;
    242 
     242       
     243        Vector<CSSMutableStyleDeclaration*> m_additionalAttributeStyleDecls;
     244       
    243245        void applyProperty(int id, CSSValue*);
     246
    244247#if ENABLE(SVG)
    245248        void applySVGProperty(int id, CSSValue*);
  • trunk/WebCore/dom/StyledElement.cpp

    r29452 r29647  
    253253{
    254254    return getInlineStyleDecl();
    255 }
    256 
    257 CSSMutableStyleDeclaration* StyledElement::additionalAttributeStyleDecl()
    258 {
    259     return 0;
    260255}
    261256
  • trunk/WebCore/dom/StyledElement.h

    r28722 r29647  
    5959   
    6060    CSSMutableStyleDeclaration* inlineStyleDecl() const { return m_inlineStyleDecl.get(); }
    61     virtual CSSMutableStyleDeclaration* additionalAttributeStyleDecl();
     61    virtual bool canHaveAdditionalAttributeStyleDecls() const { return false; }
     62    virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&) {};
    6263    CSSMutableStyleDeclaration* getInlineStyleDecl();
    6364    CSSStyleDeclaration* style();
  • trunk/WebCore/html/HTMLTableCellElement.cpp

    r25754 r29647  
    117117
    118118// used by table cells to share style decls created by the enclosing table.
    119 CSSMutableStyleDeclaration* HTMLTableCellElement::additionalAttributeStyleDecl()
     119void HTMLTableCellElement::additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>& results)
    120120{
    121121    Node* p = parentNode();
    122122    while (p && !p->hasTagName(tableTag))
    123123        p = p->parentNode();
    124     return p ? static_cast<HTMLTableElement*>(p)->getSharedCellDecl() : 0;
     124    if (!p)
     125        return;
     126    static_cast<HTMLTableElement*>(p)->addSharedCellDecls(results);
    125127}
    126128
  • trunk/WebCore/html/HTMLTableCellElement.h

    r25754 r29647  
    5656
    5757    // used by table cells to share style decls created by the enclosing table.
    58     virtual CSSMutableStyleDeclaration* additionalAttributeStyleDecl();
     58    virtual bool canHaveAdditionalAttributeStyleDecls() const { return true; }
     59    virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&);
    5960   
    6061    virtual bool isURLAttribute(Attribute*) const;
  • trunk/WebCore/html/HTMLTableColElement.cpp

    r25754 r29647  
    8787
    8888// used by table columns and column groups to share style decls created by the enclosing table.
    89 CSSMutableStyleDeclaration* HTMLTableColElement::additionalAttributeStyleDecl()
     89void HTMLTableColElement::additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>& results)
    9090{
     91    if (!hasLocalName(colgroupTag))
     92        return;
    9193    Node* p = parentNode();
    9294    while (p && !p->hasTagName(tableTag))
    9395        p = p->parentNode();
    94     return hasLocalName(colgroupTag) && p ? static_cast<HTMLTableElement*>(p)->getSharedGroupDecl(false) : 0;
     96    if (!p)
     97        return;
     98    static_cast<HTMLTableElement*>(p)->addSharedGroupDecls(false, results);
    9599}
    96100
  • trunk/WebCore/html/HTMLTableColElement.h

    r25754 r29647  
    4747    virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
    4848    virtual void parseMappedAttribute(MappedAttribute*);
    49     virtual CSSMutableStyleDeclaration* additionalAttributeStyleDecl();
     49    virtual bool canHaveAdditionalAttributeStyleDecls() const { return true; }
     50    virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&);
    5051   
    5152    int span() const { return _span; }
  • trunk/WebCore/html/HTMLTableElement.cpp

    r29539 r29647  
    318318{
    319319    CellBorders bordersBefore = cellBorders();
    320    
     320    unsigned short oldPadding = m_padding;
     321
    321322    if (attr->name() == widthAttr)
    322323        addCSSLength(attr, CSS_PROP_WIDTH, attr->value());
     
    425426        else
    426427            m_padding = 1;
    427         if (renderer() && renderer()->isTable())
    428             static_cast<RenderTable*>(renderer())->setCellPadding(m_padding);
    429428    } else if (attr->name() == colsAttr) {
    430429        // ###
     
    449448        HTMLElement::parseMappedAttribute(attr);
    450449
    451     if (bordersBefore != cellBorders()) {
     450    if (bordersBefore != cellBorders() || oldPadding != m_padding) {
     451        if (oldPadding != m_padding)
     452            m_paddingDecl = 0;
    452453        bool cellChanged = false;
    453454        for (Node* child = firstChild(); child; child = child->nextSibling())
     
    458459}
    459460
    460 CSSMutableStyleDeclaration* HTMLTableElement::additionalAttributeStyleDecl()
     461void HTMLTableElement::additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>& results)
    461462{
    462463    if ((!m_borderAttr && !m_borderColorAttr) || m_frameAttr)
    463         return 0;
     464        return;
    464465       
    465466    MappedAttribute attr(tableborderAttr, m_borderColorAttr ? "solid" : "outset");
     
    484485        decl->setMappedState(ePersistent, attr.name(), attr.value());
    485486    }
    486     return decl;
     487   
     488   
     489    results.append(decl);
    487490}
    488491
     
    510513}
    511514
    512 CSSMutableStyleDeclaration* HTMLTableElement::getSharedCellDecl()
     515void HTMLTableElement::addSharedCellDecls(Vector<CSSMutableStyleDeclaration*>& results)
     516{
     517    addSharedCellBordersDecl(results);
     518    addSharedCellPaddingDecl(results);
     519}
     520
     521void HTMLTableElement::addSharedCellBordersDecl(Vector<CSSMutableStyleDeclaration*>& results)
    513522{
    514523    CellBorders borders = cellBorders();
     
    567576        decl->setMappedState(ePersistent, attr.name(), attr.value());
    568577    }
    569     return decl;
    570 }
    571 
    572 CSSMutableStyleDeclaration* HTMLTableElement::getSharedGroupDecl(bool rows)
     578   
     579    results.append(decl);
     580}
     581
     582void HTMLTableElement::addSharedCellPaddingDecl(Vector<CSSMutableStyleDeclaration*>& results)
     583{
     584    if (m_padding == 0)
     585        return;
     586
     587    if (!m_paddingDecl) {
     588        String numericStr = String::number(m_padding);
     589        MappedAttribute attr(cellpaddingAttr, numericStr);
     590        m_paddingDecl = getMappedAttributeDecl(eUniversal, &attr);
     591        if (!m_paddingDecl) {
     592            m_paddingDecl = new CSSMappedAttributeDeclaration(0);
     593            m_paddingDecl->setParent(document()->elementSheet());
     594            m_paddingDecl->setNode(this);
     595            m_paddingDecl->setStrictParsing(false); // Mapped attributes are just always quirky.
     596           
     597            m_paddingDecl->setProperty(CSS_PROP_PADDING_TOP, numericStr, false);
     598            m_paddingDecl->setProperty(CSS_PROP_PADDING_RIGHT, numericStr, false);
     599            m_paddingDecl->setProperty(CSS_PROP_PADDING_BOTTOM, numericStr, false);
     600            m_paddingDecl->setProperty(CSS_PROP_PADDING_LEFT, numericStr, false);
     601        }
     602        setMappedAttributeDecl(eUniversal, &attr, m_paddingDecl.get());
     603        m_paddingDecl->setParent(0);
     604        m_paddingDecl->setNode(0);
     605        m_paddingDecl->setMappedState(eUniversal, attr.name(), attr.value());
     606    }
     607   
     608    results.append(m_paddingDecl.get());
     609}
     610
     611void HTMLTableElement::addSharedGroupDecls(bool rows, Vector<CSSMutableStyleDeclaration*>& results)
     612
    573613{
    574614    if (m_rulesAttr != GroupsRules)
    575         return 0;
     615        return;
    576616
    577617    MappedAttribute attr(rulesAttr, rows ? "rowgroups" : "colgroups");
     
    603643    }
    604644
    605     return decl;
     645    results.append(decl);
    606646}
    607647
     
    610650    ASSERT(!m_attached);
    611651    HTMLElement::attach();
    612     if (renderer() && renderer()->isTable())
    613         static_cast<RenderTable*>(renderer())->setCellPadding(m_padding);
    614652}
    615653
  • trunk/WebCore/html/HTMLTableElement.h

    r29138 r29647  
    9999    // Used to obtain either a solid or outset border decl and to deal with the frame
    100100    // and rules attributes.
    101     virtual CSSMutableStyleDeclaration* additionalAttributeStyleDecl();
    102     CSSMutableStyleDeclaration* getSharedCellDecl();
    103     CSSMutableStyleDeclaration* getSharedGroupDecl(bool rows);
     101    virtual bool canHaveAdditionalAttributeStyleDecls() const { return true; }
     102    virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&);
     103    void addSharedCellDecls(Vector<CSSMutableStyleDeclaration*>&);
     104    void addSharedGroupDecls(bool rows, Vector<CSSMutableStyleDeclaration*>&);
    104105
    105106private:
     107    void addSharedCellBordersDecl(Vector<CSSMutableStyleDeclaration*>&);
     108    void addSharedCellPaddingDecl(Vector<CSSMutableStyleDeclaration*>&);
     109   
    106110    enum TableRules { UnsetRules, NoneRules, GroupsRules, RowsRules, ColsRules, AllRules };
    107111    enum CellBorders { NoBorders, SolidBorders, InsetBorders, SolidBordersColsOnly, SolidBordersRowsOnly };
     
    118122   
    119123    unsigned short m_padding;
     124    RefPtr<CSSMappedAttributeDeclaration> m_paddingDecl;
    120125};
    121126
  • trunk/WebCore/html/HTMLTableSectionElement.cpp

    r28327 r29647  
    6767
    6868// used by table row groups to share style decls created by the enclosing table.
    69 CSSMutableStyleDeclaration* HTMLTableSectionElement::additionalAttributeStyleDecl()
     69void HTMLTableSectionElement::additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>& results)
    7070{
    7171    Node* p = parentNode();
    7272    while (p && !p->hasTagName(tableTag))
    7373        p = p->parentNode();
    74 
    75     return p ?  static_cast<HTMLTableElement*>(p)->getSharedGroupDecl(true) : 0;
     74    if (!p)
     75        return;
     76    static_cast<HTMLTableElement*>(p)->addSharedGroupDecls(true, results);
    7677}
    7778
  • trunk/WebCore/html/HTMLTableSectionElement.h

    r25754 r29647  
    3939    virtual bool checkDTD(const Node*);
    4040    virtual ContainerNode* addChild(PassRefPtr<Node>);
    41     virtual CSSMutableStyleDeclaration* additionalAttributeStyleDecl();
     41    virtual bool canHaveAdditionalAttributeStyleDecls() const { return true; }
     42    virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&);
    4243
    4344    PassRefPtr<HTMLElement> insertRow(int index, ExceptionCode&);
  • trunk/WebCore/rendering/AutoTableLayout.cpp

    r29470 r29647  
    6868                RenderTableCell* cell = current.cell;
    6969               
    70                 bool cellHasContent = cell && (cell->firstChild() || m_table->cellPadding() || cell->style()->hasBorder() || cell->style()->hasPadding());
     70                bool cellHasContent = cell && (cell->firstChild() || cell->style()->hasBorder() || cell->style()->hasPadding());
    7171                if (cellHasContent)
    7272                    l.emptyCellsOnly = false;
  • trunk/WebCore/rendering/RenderObject.cpp

    r29581 r29647  
    23952395    if (padding.isPercent())
    23962396        w = containingBlock()->availableWidth();
    2397     w = padding.calcMinValue(w);
    2398     if (isTableCell() && padding.isAuto())
    2399         w = static_cast<const RenderTableCell*>(this)->table()->cellPadding();
    2400     return w;
     2397    return padding.calcMinValue(w);
    24012398}
    24022399
     
    24072404    if (padding.isPercent())
    24082405        w = containingBlock()->availableWidth();
    2409     w = padding.calcMinValue(w);
    2410     if (isTableCell() && padding.isAuto())
    2411         w = static_cast<const RenderTableCell*>(this)->table()->cellPadding();
    2412     return w;
     2406    return padding.calcMinValue(w);
    24132407}
    24142408
     
    24192413    if (padding.isPercent())
    24202414        w = containingBlock()->availableWidth();
    2421     w = padding.calcMinValue(w);
    2422     if (isTableCell() && padding.isAuto())
    2423         w = static_cast<const RenderTableCell*>(this)->table()->cellPadding();
    2424     return w;
     2415    return padding.calcMinValue(w);
    24252416}
    24262417
     
    24312422    if (padding.isPercent())
    24322423        w = containingBlock()->availableWidth();
    2433     w = padding.calcMinValue(w);
    2434     if (isTableCell() && padding.isAuto())
    2435         w = static_cast<const RenderTableCell*>(this)->table()->cellPadding();
    2436     return w;
     2424    return padding.calcMinValue(w);
    24372425}
    24382426
  • trunk/WebCore/rendering/RenderStyle.cpp

    r29470 r29647  
    3131
    3232StyleSurroundData::StyleSurroundData()
    33     : margin(Fixed), padding(Auto)
     33    : margin(Fixed), padding(Fixed)
    3434{
    3535}
  • trunk/WebCore/rendering/RenderStyle.h

    r29492 r29647  
    21512151    static Length initialOffset() { return Length(); }
    21522152    static Length initialMargin() { return Length(Fixed); }
    2153     static Length initialPadding() { return Length(Auto); }
     2153    static Length initialPadding() { return Length(Fixed); }
    21542154    static Length initialTextIndent() { return Length(Fixed); }
    21552155    static EVerticalAlign initialVerticalAlign() { return BASELINE; }
  • trunk/WebCore/rendering/RenderTable.cpp

    r29539 r29647  
    5757    , m_rules(None)
    5858    , m_hasColElements(false)
    59     , m_padding(0)
    6059    , m_needsSectionRecalc(0)
    6160    , m_hSpacing(0)
     
    9291        else
    9392            m_tableLayout = new AutoTableLayout(this);
    94     }
    95 }
    96 
    97 void RenderTable::setCellPadding(unsigned p)
    98 {
    99     if (p == m_padding)
    100         return;
    101    
    102     m_padding = p;
    103     for (RenderObject* section = firstChild(); section; section = section->nextSibling()) {
    104         if (section->isTableSection()) {
    105             for (RenderObject* row = section->firstChild(); row; row = row->nextSibling()) {
    106                 if (row->isTableRow()) {
    107                     for (RenderObject* cell = row->firstChild(); cell; cell = cell->nextSibling()) {
    108                         if (cell->isTableCell()) {
    109                             cell->setChildNeedsLayout(true);
    110                             cell->setPrefWidthsDirty(true);
    111                         }
    112                     }
    113                 }
    114             }
    115         }
    11693    }
    11794}
  • trunk/WebCore/rendering/RenderTable.h

    r29539 r29647  
    8686    const Color& bgColor() const { return style()->backgroundColor(); }
    8787
    88     unsigned cellPadding() const { return m_padding; }
    89     void setCellPadding(unsigned);
    90 
    9188    int outerBorderTop() const;
    9289    int outerBorderBottom() const;
     
    217214
    218215    mutable bool m_hasColElements : 1;
    219     unsigned m_padding : 22;
    220216    mutable bool m_needsSectionRecalc : 1;
    221217   
Note: See TracChangeset for help on using the changeset viewer.