Changeset 25011 in webkit


Ignore:
Timestamp:
Aug 11, 2007 11:01:35 AM (17 years ago)
Author:
darin
Message:

LayoutTests:

2007-08-11 Mitz Pettel <mitz@webkit.org>

Reviewed by Darin.

  • fast/table/100-percent-cell-width-expected.checksum: Added.
  • fast/table/100-percent-cell-width-expected.png: Added.
  • fast/table/100-percent-cell-width-expected.txt: Added.
  • fast/table/100-percent-cell-width.html: Added.
  • fast/table/percent-widths-stretch-expected.checksum: Added.
  • fast/table/percent-widths-stretch-expected.png: Added.
  • fast/table/percent-widths-stretch-expected.txt: Added.
  • fast/table/percent-widths-stretch.html: Added.
  • fast/text/whitespace/026-expected.checksum:
  • fast/text/whitespace/026-expected.png:
  • fast/text/whitespace/026-expected.txt:
  • tables/mozilla/bugs/bug35662-expected.checksum:
  • tables/mozilla/bugs/bug35662-expected.png:
  • tables/mozilla/bugs/bug35662-expected.txt:
  • tables/mozilla/bugs/bug5799-expected.checksum:
  • tables/mozilla/bugs/bug5799-expected.png:
  • tables/mozilla/bugs/bug5799-expected.txt:
  • tables/mozilla/core/col_span-expected.checksum:
  • tables/mozilla/core/col_span-expected.png:
  • tables/mozilla/core/col_span-expected.txt:

2007-08-11 Darin Adler <Darin Adler>

  • added a bunch of missing layout test results
  • editing/style/font-family-with-space-expected.checksum: Added.
  • editing/style/font-family-with-space-expected.png: Added.
  • fast/dom/frame-loading-via-document-write-expected.checksum: Added.
  • fast/dom/frame-loading-via-document-write-expected.png: Added.
  • fast/encoding/xmacroman-encoding-test-expected.checksum: Added.
  • fast/encoding/xmacroman-encoding-test-expected.png: Added.
  • fast/frames/frame-navigation-expected.checksum: Added.
  • fast/frames/frame-navigation-expected.png: Added.
  • fast/frames/frame-set-whitespace-attributes-expected.checksum: Added.
  • fast/frames/frame-set-whitespace-attributes-expected.png: Added.
  • fast/frames/inline-object-inside-frameset-expected.checksum: Added.
  • fast/frames/inline-object-inside-frameset-expected.png: Added.
  • fast/html/keygen-expected.checksum: Added.
  • fast/html/keygen-expected.png: Added.
  • fast/images/pdf-as-image-landscape-expected.checksum: Added.
  • fast/images/pdf-as-image-landscape-expected.png: Added.
  • fast/inline-block/14498-positionForCoordinates-expected.checksum: Added.
  • fast/inline-block/14498-positionForCoordinates-expected.png: Added.

WebCore:

2007-08-11 Mitz Pettel <mitz@webkit.org>

Reviewed by Darin.

Tests: fast/table/100-percent-cell-width.html

fast/table/percent-widths-stretch.html

  • rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::calcPrefWidths): Changed the value used instead of 0% to avoid division by zero from 1% to less than 0.01%. Removed code that added 0.5px to non-percent widths when calculating the scaling factor. The latter change is covered by the percent-widths-stretch test, where the new results match both WinIE 7 and Firefox 3.
Location:
trunk
Files:
34 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r25010 r25011  
     12007-08-11  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        - tests and updated results for http://bugs.webkit.org/show_bug.cgi?id=13670
     6          <rdar://problem/5399619> Table misrender when one of the TDs has width=100%
     7
     8        * fast/table/100-percent-cell-width-expected.checksum: Added.
     9        * fast/table/100-percent-cell-width-expected.png: Added.
     10        * fast/table/100-percent-cell-width-expected.txt: Added.
     11        * fast/table/100-percent-cell-width.html: Added.
     12        * fast/table/percent-widths-stretch-expected.checksum: Added.
     13        * fast/table/percent-widths-stretch-expected.png: Added.
     14        * fast/table/percent-widths-stretch-expected.txt: Added.
     15        * fast/table/percent-widths-stretch.html: Added.
     16        * fast/text/whitespace/026-expected.checksum:
     17        * fast/text/whitespace/026-expected.png:
     18        * fast/text/whitespace/026-expected.txt:
     19        * tables/mozilla/bugs/bug35662-expected.checksum:
     20        * tables/mozilla/bugs/bug35662-expected.png:
     21        * tables/mozilla/bugs/bug35662-expected.txt:
     22        * tables/mozilla/bugs/bug5799-expected.checksum:
     23        * tables/mozilla/bugs/bug5799-expected.png:
     24        * tables/mozilla/bugs/bug5799-expected.txt:
     25        * tables/mozilla/core/col_span-expected.checksum:
     26        * tables/mozilla/core/col_span-expected.png:
     27        * tables/mozilla/core/col_span-expected.txt:
     28
     292007-08-11  Darin Adler  <darin@apple.com>
     30
     31        - added a bunch of missing layout test results
     32
     33        * editing/style/font-family-with-space-expected.checksum: Added.
     34        * editing/style/font-family-with-space-expected.png: Added.
     35        * fast/dom/frame-loading-via-document-write-expected.checksum: Added.
     36        * fast/dom/frame-loading-via-document-write-expected.png: Added.
     37        * fast/encoding/xmacroman-encoding-test-expected.checksum: Added.
     38        * fast/encoding/xmacroman-encoding-test-expected.png: Added.
     39        * fast/frames/frame-navigation-expected.checksum: Added.
     40        * fast/frames/frame-navigation-expected.png: Added.
     41        * fast/frames/frame-set-whitespace-attributes-expected.checksum: Added.
     42        * fast/frames/frame-set-whitespace-attributes-expected.png: Added.
     43        * fast/frames/inline-object-inside-frameset-expected.checksum: Added.
     44        * fast/frames/inline-object-inside-frameset-expected.png: Added.
     45        * fast/html/keygen-expected.checksum: Added.
     46        * fast/html/keygen-expected.png: Added.
     47        * fast/images/pdf-as-image-landscape-expected.checksum: Added.
     48        * fast/images/pdf-as-image-landscape-expected.png: Added.
     49        * fast/inline-block/14498-positionForCoordinates-expected.checksum: Added.
     50        * fast/inline-block/14498-positionForCoordinates-expected.png: Added.
     51
    1522007-08-11  Darin Adler  <darin@apple.com>
    253
  • trunk/LayoutTests/fast/text/whitespace/026-expected.checksum

    r21383 r25011  
    1 a2c2ca5888215c4a9c1ede67742e850e
     1dab7daff12291d74bbcf06c671821057
  • trunk/LayoutTests/fast/text/whitespace/026-expected.txt

    r21383 r25011  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTable {TABLE} at (0,0) size 450x18
    7         RenderTableSection {TBODY} at (0,0) size 450x18
    8           RenderTableRow {TR} at (0,0) size 450x18
     6      RenderTable {TABLE} at (0,0) size 784x18
     7        RenderTableSection {TBODY} at (0,0) size 784x18
     8          RenderTableRow {TR} at (0,0) size 784x18
    99            RenderTableCell {TD} at (0,0) size 4x18 [r=0 c=0 rs=1 cs=1]
    1010              RenderInline {B} at (0,0) size 4x18
    1111                RenderText {#text} at (0,0) size 4x18
    1212                  text run at (0,0) width 4: "\x{B7}"
    13             RenderTableCell {TD} at (4,0) size 446x18 [r=0 c=1 rs=1 cs=1]
     13            RenderTableCell {TD} at (4,0) size 780x18 [r=0 c=1 rs=1 cs=1]
    1414              RenderText {#text} at (0,0) size 388x18
    1515                text run at (0,0) width 388: "There should be space between the bullet and this line of text."
  • trunk/LayoutTests/tables/mozilla/bugs/bug35662-expected.checksum

    r19346 r25011  
    1 30895f22a34714055de4e0b073d988f8
     19020c523d5bbd4722c9e56018b936762
  • trunk/LayoutTests/tables/mozilla/bugs/bug35662-expected.txt

    r19346 r25011  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTable {TABLE} at (0,0) size 169x28 [border: (1px outset #808080)]
    7         RenderTableSection {TBODY} at (1,1) size 167x26
    8           RenderTableRow {TR} at (0,2) size 167x22
     6      RenderTable {TABLE} at (0,0) size 168x28 [border: (1px outset #808080)]
     7        RenderTableSection {TBODY} at (1,1) size 166x26
     8          RenderTableRow {TR} at (0,2) size 166x22
    99            RenderTableCell {TD} at (2,2) size 59x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    1010              RenderText {#text} at (2,2) size 55x18
     
    1313              RenderText {#text} at (2,2) size 26x18
    1414                text run at (2,2) width 26: "Mid"
    15             RenderTableCell {TD} at (96,2) size 69x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
     15            RenderTableCell {TD} at (96,2) size 68x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
    1616              RenderText {#text} at (2,2) size 64x18
    1717                text run at (2,2) width 64: "Right side"
    18       RenderTable {TABLE} at (0,28) size 169x52 [border: (1px outset #808080)]
    19         RenderTableSection {TBODY} at (1,1) size 167x50
    20           RenderTableRow {TR} at (0,2) size 167x22
     18      RenderTable {TABLE} at (0,28) size 168x52 [border: (1px outset #808080)]
     19        RenderTableSection {TBODY} at (1,1) size 166x50
     20          RenderTableRow {TR} at (0,2) size 166x22
    2121            RenderTableCell {TD} at (2,2) size 59x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    2222              RenderText {#text} at (2,2) size 55x18
     
    2525              RenderText {#text} at (2,2) size 26x18
    2626                text run at (2,2) width 26: "Mid"
    27             RenderTableCell {TD} at (96,2) size 69x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
     27            RenderTableCell {TD} at (96,2) size 68x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
    2828              RenderText {#text} at (2,2) size 64x18
    2929                text run at (2,2) width 64: "Right side"
    30           RenderTableRow {TR} at (0,26) size 167x22
     30          RenderTableRow {TR} at (0,26) size 166x22
    3131            RenderTableCell {TD} at (2,26) size 59x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
    3232              RenderText {#text} at (2,2) size 55x18
     
    3535              RenderText {#text} at (2,2) size 26x18
    3636                text run at (2,2) width 26: "Mid"
    37             RenderTableCell {TD} at (96,26) size 69x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
     37            RenderTableCell {TD} at (96,26) size 68x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
    3838              RenderText {#text} at (2,2) size 64x18
    3939                text run at (2,2) width 64: "Right side"
  • trunk/LayoutTests/tables/mozilla/bugs/bug5799-expected.checksum

    r19346 r25011  
    1 7b716f2ba5bd2c4e5bcdc70205d93cac
     1283f59688ade1fde598720f4328289f1
  • trunk/LayoutTests/tables/mozilla/bugs/bug5799-expected.txt

    r19346 r25011  
    1515      RenderBlock (anonymous) at (0,36) size 784x18
    1616        RenderBR {BR} at (0,0) size 0x18
    17       RenderTable {TABLE} at (0,54) size 325x36 [border: (5px outset #808080)]
    18         RenderTableSection {TBODY} at (5,5) size 315x26
    19           RenderTableRow {TR} at (0,2) size 315x22
    20             RenderTableCell {TD} at (2,2) size 155x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     17      RenderTable {TABLE} at (0,54) size 324x36 [border: (5px outset #808080)]
     18        RenderTableSection {TBODY} at (5,5) size 314x26
     19          RenderTableRow {TR} at (0,2) size 314x22
     20            RenderTableCell {TD} at (2,2) size 154x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    2121              RenderText {#text} at (2,2) size 150x18
    2222                text run at (2,2) width 150: "almaalmaalmaalmaalma"
    23             RenderTableCell {TD} at (159,2) size 154x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     23            RenderTableCell {TD} at (158,2) size 154x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    2424              RenderText {#text} at (2,2) size 8x18
    2525                text run at (2,2) width 8: "x"
     
    3333          text run at (0,18) width 255: "The cells are competing with each other."
    3434        RenderBR {BR} at (255,32) size 0x0
    35       RenderTable {TABLE} at (0,176) size 340x36 [border: (5px outset #808080)]
    36         RenderTableSection {TBODY} at (5,5) size 330x26
    37           RenderTableRow {TR} at (0,2) size 330x22
    38             RenderTableCell {TD} at (2,2) size 66x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     35      RenderTable {TABLE} at (0,176) size 338x36 [border: (5px outset #808080)]
     36        RenderTableSection {TBODY} at (5,5) size 328x26
     37          RenderTableRow {TR} at (0,2) size 328x22
     38            RenderTableCell {TD} at (2,2) size 64x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    3939              RenderText {#text} at (2,2) size 60x18
    4040                text run at (2,2) width 60: "some text"
    41             RenderTableCell {TD} at (70,2) size 128x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     41            RenderTableCell {TD} at (68,2) size 128x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    4242              RenderText {#text} at (2,2) size 8x18
    4343                text run at (2,2) width 8: "x"
    44             RenderTableCell {TD} at (200,2) size 128x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
     44            RenderTableCell {TD} at (198,2) size 128x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
    4545              RenderText {#text} at (2,2) size 8x18
    4646                text run at (2,2) width 8: "x"
  • trunk/LayoutTests/tables/mozilla/core/col_span-expected.checksum

    r16432 r25011  
    1 5e27485f3f88783ca1c3718d7dd20a8f
     10ff415105c7f46138a29c36eba197662
  • trunk/LayoutTests/tables/mozilla/core/col_span-expected.txt

    r14684 r25011  
    1616      RenderBlock (anonymous) at (0,46) size 784x18
    1717        RenderBR {BR} at (0,0) size 0x18
    18       RenderTable {TABLE} at (0,64) size 217x46 [border: (1px outset #808080)]
    19         RenderTableSection {TBODY} at (1,1) size 215x44
    20           RenderTableRow {TR} at (0,2) size 215x40
    21             RenderTableCell {TD} at (2,2) size 105x40 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     18      RenderTable {TABLE} at (0,64) size 216x46 [border: (1px outset #808080)]
     19        RenderTableSection {TBODY} at (1,1) size 214x44
     20          RenderTableRow {TR} at (0,2) size 214x40
     21            RenderTableCell {TD} at (2,2) size 104x40 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    2222              RenderText {#text} at (2,2) size 80x36
    2323                text run at (2,2) width 80: "100 100 100"
    2424                text run at (2,20) width 80: "100 100 100"
    25             RenderTableCell {TD} at (109,11) size 104x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     25            RenderTableCell {TD} at (108,11) size 104x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    2626              RenderText {#text} at (2,2) size 69x18
    2727                text run at (2,2) width 69: "50% width"
    2828      RenderBlock (anonymous) at (0,110) size 784x18
    2929        RenderBR {BR} at (0,0) size 0x18
    30       RenderTable {TABLE} at (0,128) size 535x52 [border: (1px outset #808080)]
    31         RenderTableSection {TBODY} at (1,1) size 533x50
    32           RenderTableRow {TR} at (0,2) size 533x22
     30      RenderTable {TABLE} at (0,128) size 534x52 [border: (1px outset #808080)]
     31        RenderTableSection {TBODY} at (1,1) size 532x50
     32          RenderTableRow {TR} at (0,2) size 532x22
    3333            RenderTableCell {TD} at (2,2) size 104x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    3434              RenderText {#text} at (2,2) size 24x18
    3535                text run at (2,2) width 24: "100"
    36             RenderTableCell {TD} at (108,2) size 264x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     36            RenderTableCell {TD} at (108,2) size 263x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    3737              RenderText {#text} at (2,2) size 95x18
    3838                text run at (2,2) width 95: "no width given"
    39             RenderTableCell {TD} at (374,2) size 157x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
     39            RenderTableCell {TD} at (373,2) size 157x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
    4040              RenderText {#text} at (2,2) size 69x18
    4141                text run at (2,2) width 69: "30% width"
    42           RenderTableRow {TR} at (0,26) size 533x22
    43             RenderTableCell {TD} at (2,26) size 529x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=3]
     42          RenderTableRow {TR} at (0,26) size 532x22
     43            RenderTableCell {TD} at (2,26) size 528x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=3]
    4444              RenderText {#text} at (2,2) size 93x18
    4545                text run at (2,2) width 93: "500 colspan=3"
  • trunk/WebCore/ChangeLog

    r25010 r25011  
     12007-08-11  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=13670
     6          <rdar://problem/5399619> Table misrender when one of the TDs has width=100%
     7
     8        Tests: fast/table/100-percent-cell-width.html
     9               fast/table/percent-widths-stretch.html
     10
     11        * rendering/AutoTableLayout.cpp:
     12        (WebCore::AutoTableLayout::calcPrefWidths): Changed the value used instead of
     13        0% to avoid division by zero from 1% to less than 0.01%. Removed code that
     14        added 0.5px to non-percent widths when calculating the scaling factor. The
     15        latter change is covered by the percent-widths-stretch test, where the new
     16        results match both WinIE 7 and Firefox 3.
     17
    1182007-08-11  Darin Adler  <darin@apple.com>
    219
  • trunk/WebCore/rendering/AutoTableLayout.cpp

    r23850 r25011  
    258258    int maxNonPercent = 0;
    259259
     260    // We substitute 0 percent by (epsilon / percentScaleFactor) percent in two places below to avoid division by zero.
     261    // FIXME: Handle the 0% cases properly.
     262    const int epsilon = 1;
     263
    260264    int remainingPercent = 100 * percentScaleFactor;
    261265    for (unsigned int i = 0; i < m_layoutStruct.size(); i++) {
     
    264268        if (m_layoutStruct[i].effWidth.isPercent()) {
    265269            int percent = min(m_layoutStruct[i].effWidth.rawValue(), remainingPercent);
    266             int pw = (m_layoutStruct[i].effMaxWidth * 100 * percentScaleFactor) / max(percent, percentScaleFactor);
     270            int pw = (m_layoutStruct[i].effMaxWidth * 100 * percentScaleFactor) / max(percent, epsilon);
    267271            remainingPercent -= percent;
    268272            maxPercent = max(pw,  maxPercent);
     
    273277
    274278    if (shouldScaleColumns(m_table)) {
    275         // FIXME: Why 50?
    276         maxNonPercent = (maxNonPercent * 100 + 50) * percentScaleFactor / max(remainingPercent, percentScaleFactor);
     279        maxNonPercent = maxNonPercent * 100 * percentScaleFactor / max(remainingPercent, epsilon);
    277280        maxWidth = max(maxNonPercent,  maxWidth);
    278281        maxWidth = max(maxWidth, maxPercent);
Note: See TracChangeset for help on using the changeset viewer.