Changeset 151737 in webkit


Ignore:
Timestamp:
Jun 19, 2013 10:20:46 AM (11 years ago)
Author:
robert@webkit.org
Message:

Incorrect computation of shrink-to-fit width for block with white-space:nowrap and floating children
https://bugs.webkit.org/show_bug.cgi?id=114879

Source/WebCore:

Reviewed by David Hyatt.
Per http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins when width is auto then floating non-replaced,
absolute non-replaced, and inline-block non-replaced elements should use shrink-to-fit width. This trumps any no-wrap property
on the element so if we are shrinking to fit ensure our minimum width respects all possible line breaks.

Test: fast/block/shrink-to-fit-width-container-with-floating-children.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computeIntrinsicLogicalWidths):

LayoutTests:

Reviewed by David Hyatt.

  • fast/block/shrink-to-fit-width-container-with-floating-children-expected.txt: Added.
  • fast/block/shrink-to-fit-width-container-with-floating-children.html: Added.
  • platform/qt/fast/css/word-space-extra-expected.txt:
  • platform/qt/fast/replaced/width100percent-image-expected.txt:
  • platform/qt/fast/replaced/width100percent-searchfield-expected.txt:
  • platform/qt/fast/replaced/width100percent-textfield-expected.txt:
  • platform/qt/tables/mozilla/bugs/bug57828-expected.txt:
Location:
trunk
Files:
2 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151733 r151737  
     12013-06-19  Robert Hogan  <robert@webkit.org>
     2
     3        Incorrect computation of shrink-to-fit width for block with white-space:nowrap and floating children
     4        https://bugs.webkit.org/show_bug.cgi?id=114879
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/block/shrink-to-fit-width-container-with-floating-children-expected.txt: Added.
     9        * fast/block/shrink-to-fit-width-container-with-floating-children.html: Added.
     10        * platform/qt/fast/css/word-space-extra-expected.txt:
     11        * platform/qt/fast/replaced/width100percent-image-expected.txt:
     12        * platform/qt/fast/replaced/width100percent-searchfield-expected.txt:
     13        * platform/qt/fast/replaced/width100percent-textfield-expected.txt:
     14        * platform/qt/tables/mozilla/bugs/bug57828-expected.txt:
     15
    1162013-06-19  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
    217
  • trunk/LayoutTests/platform/mac/fast/css/word-space-extra-expected.txt

    r149210 r151737  
    77        RenderText {#text} at (0,0) size 138x28
    88          text run at (0,0) width 138: "word-spacing"
    9       RenderBlock (floating) {PRE} at (0,60) size 1264x167
    10         RenderBlock {H3} at (0,15) size 1264x17
     9      RenderBlock (floating) {PRE} at (0,60) size 1004x167
     10        RenderBlock {H3} at (0,15) size 1004x17
    1111          RenderText {#text} at (0,0) size 204x17
    1212            text run at (0,0) width 204: "In a floated pre"
    13         RenderBlock (anonymous) at (0,47) size 1264x120
     13        RenderBlock (anonymous) at (0,47) size 1004x120
    1414          RenderText {#text} at (0,0) size 260x30
    1515            text run at (0,0) width 0: " "
     
    146146            text run at (1108,105) width 0: " "
    147147      RenderBlock (anonymous) at (0,47) size 769x193
    148         RenderBR {BR} at (1264,0) size 0x18
     148        RenderBR {BR} at (1004,0) size 0x18
    149149      RenderBlock {PRE} at (0,255) size 769x152
    150150        RenderBlock {H3} at (0,0) size 769x17
     
    450450        RenderText {#text} at (0,0) size 141x28
    451451          text run at (0,0) width 141: "letter-spacing"
    452       RenderBlock (floating) {PRE} at (0,814) size 1521x167
    453         RenderBlock {H3} at (0,15) size 1521x17
     452      RenderBlock (floating) {PRE} at (0,814) size 1209x167
     453        RenderBlock {H3} at (0,15) size 1209x17
    454454          RenderText {#text} at (0,0) size 224x17
    455455            text run at (0,0) width 224: "In a floated pre"
    456         RenderBlock (anonymous) at (0,47) size 1521x120
     456        RenderBlock (anonymous) at (0,47) size 1209x120
    457457          RenderText {#text} at (0,0) size 286x30
    458458            text run at (0,0) width 0: " "
     
    589589            text run at (1274,105) width 0: " "
    590590      RenderBlock (anonymous) at (0,801) size 769x193
    591         RenderBR {BR} at (1521,0) size 0x18
     591        RenderBR {BR} at (1209,0) size 0x18
    592592      RenderBlock {PRE} at (0,1009) size 769x152
    593593        RenderBlock {H3} at (0,0) size 769x17
     
    894894        RenderText {#text} at (0,0) size 131x28
    895895          text run at (0,0) width 131: "both-spacing"
    896       RenderBlock (floating) {PRE} at (0,1599) size 2018x167
    897         RenderBlock {H3} at (0,15) size 2018x17
     896      RenderBlock (floating) {PRE} at (0,1599) size 1469x167
     897        RenderBlock {H3} at (0,15) size 1469x17
    898898          RenderText {#text} at (0,0) size 284x17
    899899            text run at (0,0) width 284: "In a floated pre"
    900         RenderBlock (anonymous) at (0,47) size 2018x120
     900        RenderBlock (anonymous) at (0,47) size 1469x120
    901901          RenderText {#text} at (0,0) size 543x30
    902902            text run at (0,0) width 0: " "
     
    10331033            text run at (1771,105) width 0: " "
    10341034      RenderBlock (anonymous) at (0,1586) size 769x193
    1035         RenderBR {BR} at (2018,0) size 0x18
     1035        RenderBR {BR} at (1469,0) size 0x18
    10361036      RenderBlock {PRE} at (0,1794) size 769x152
    10371037        RenderBlock {H3} at (0,0) size 769x17
  • trunk/LayoutTests/platform/mac/fast/replaced/width100percent-image-expected.txt

    r142945 r151737  
    1212        RenderTableSection {TBODY} at (0,0) size 769x279
    1313          RenderTableRow {TR} at (0,1) size 769x277
    14             RenderTableCell {TD} at (1,1) size 216x277 [r=0 c=0 rs=1 cs=1]
     14            RenderTableCell {TD} at (1,1) size 2x277 [r=0 c=0 rs=1 cs=1]
    1515              RenderImage {IMG} at (1,1) size 214x275
    16             RenderTableCell {TD} at (218,1) size 2x277 [r=0 c=1 rs=1 cs=1]
     16            RenderTableCell {TD} at (4,1) size 2x277 [r=0 c=1 rs=1 cs=1]
    1717              RenderImage {IMG} at (1,1) size 214x275
    18             RenderTableCell {TD} at (221,1) size 2x277 [r=0 c=2 rs=1 cs=1]
     18            RenderTableCell {TD} at (7,1) size 2x277 [r=0 c=2 rs=1 cs=1]
    1919              RenderImage {IMG} at (1,1) size 214x275
    20             RenderTableCell {TD} at (224,129) size 544x20 [r=0 c=3 rs=1 cs=1]
     20            RenderTableCell {TD} at (10,129) size 758x20 [r=0 c=3 rs=1 cs=1]
    2121              RenderText {#text} at (1,1) size 4x18
    2222                text run at (1,1) width 4: " "
  • trunk/LayoutTests/platform/mac/fast/replaced/width100percent-menulist-expected.txt

    r30635 r151737  
    1010        RenderTableSection {TBODY} at (0,0) size 784x26
    1111          RenderTableRow {TR} at (0,1) size 784x24
    12             RenderTableCell {TD} at (1,1) size 53x24 [r=0 c=0 rs=1 cs=1]
    13               RenderMenuList {SELECT} at (1,3) size 51x18 [bgcolor=#FFFFFF]
    14                 RenderBlock (anonymous) at (0,0) size 51x18
     12            RenderTableCell {TD} at (1,1) size 2x24 [r=0 c=0 rs=1 cs=1]
     13              RenderMenuList {SELECT} at (1,3) size 0x18 [bgcolor=#FFFFFF]
     14                RenderBlock (anonymous) at (0,0) size 31x18
    1515                  RenderText at (8,2) size 20x13
    1616                    text run at (8,2) width 20: "one"
    17             RenderTableCell {TD} at (55,1) size 2x24 [r=0 c=1 rs=1 cs=1]
     17            RenderTableCell {TD} at (4,1) size 2x24 [r=0 c=1 rs=1 cs=1]
    1818              RenderMenuList {SELECT} at (1,3) size 0x18 [bgcolor=#FFFFFF]
    1919                RenderBlock (anonymous) at (0,0) size 31x18
    2020                  RenderText at (8,2) size 20x13
    2121                    text run at (8,2) width 20: "two"
    22             RenderTableCell {TD} at (58,1) size 2x24 [r=0 c=2 rs=1 cs=1]
     22            RenderTableCell {TD} at (7,1) size 2x24 [r=0 c=2 rs=1 cs=1]
    2323              RenderMenuList {SELECT} at (1,3) size 0x18 [bgcolor=#FFFFFF]
    2424                RenderBlock (anonymous) at (0,0) size 31x18
    2525                  RenderText at (8,2) size 28x13
    2626                    text run at (8,2) width 28: "three"
    27             RenderTableCell {TD} at (61,3) size 722x20 [r=0 c=3 rs=1 cs=1]
     27            RenderTableCell {TD} at (10,3) size 773x20 [r=0 c=3 rs=1 cs=1]
    2828              RenderText {#text} at (1,1) size 4x18
    2929                text run at (1,1) width 4: " "
  • trunk/LayoutTests/platform/mac/fast/replaced/width100percent-searchfield-expected.txt

    r145977 r151737  
    1010        RenderTableSection {TBODY} at (0,0) size 784x27
    1111          RenderTableRow {TR} at (0,1) size 784x25
    12             RenderTableCell {TD} at (1,1) size 125x25 [r=0 c=0 rs=1 cs=1]
    13               RenderTextControl {INPUT} at (1,3) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    14                 RenderFlexibleBox {DIV} at (3,3) size 117x13
    15                   RenderBlock {DIV} at (0,1) size 8x11
    16                   RenderBlock {DIV} at (8,0) size 96x13
    17                   RenderBlock {DIV} at (104,1) size 13x11
    18             RenderTableCell {TD} at (127,1) size 8x25 [r=0 c=1 rs=1 cs=1]
     12            RenderTableCell {TD} at (1,1) size 8x25 [r=0 c=0 rs=1 cs=1]
    1913              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    2014                RenderFlexibleBox {DIV} at (3,3) size 0x13
     
    2216                  RenderBlock {DIV} at (8,0) size 0x13
    2317                  RenderBlock {DIV} at (8,1) size 13x11
    24             RenderTableCell {TD} at (136,1) size 8x25 [r=0 c=2 rs=1 cs=1]
     18            RenderTableCell {TD} at (10,1) size 8x25 [r=0 c=1 rs=1 cs=1]
    2519              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    2620                RenderFlexibleBox {DIV} at (3,3) size 0x13
     
    2822                  RenderBlock {DIV} at (8,0) size 0x13
    2923                  RenderBlock {DIV} at (8,1) size 13x11
    30             RenderTableCell {TD} at (145,3) size 638x20 [r=0 c=3 rs=1 cs=1]
     24            RenderTableCell {TD} at (19,1) size 8x25 [r=0 c=2 rs=1 cs=1]
     25              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     26                RenderFlexibleBox {DIV} at (3,3) size 0x13
     27                  RenderBlock {DIV} at (0,1) size 8x11
     28                  RenderBlock {DIV} at (8,0) size 0x13
     29                  RenderBlock {DIV} at (8,1) size 13x11
     30            RenderTableCell {TD} at (28,3) size 755x20 [r=0 c=3 rs=1 cs=1]
    3131              RenderText {#text} at (1,1) size 4x18
    3232                text run at (1,1) width 4: " "
     
    3737        RenderTableSection {TBODY} at (0,0) size 784x27
    3838          RenderTableRow {TR} at (0,1) size 784x25
    39             RenderTableCell {TD} at (1,1) size 525x25 [r=0 c=0 rs=1 cs=1]
    40               RenderTextControl {INPUT} at (1,3) size 523x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    41                 RenderFlexibleBox {DIV} at (3,3) size 517x13
    42                   RenderBlock {DIV} at (0,1) size 22x11
    43                   RenderBlock {DIV} at (22,0) size 482x13
    44                   RenderBlock {DIV} at (504,1) size 13x11
    45             RenderTableCell {TD} at (527,1) size 8x25 [r=0 c=1 rs=1 cs=1]
     39            RenderTableCell {TD} at (1,1) size 8x25 [r=0 c=0 rs=1 cs=1]
    4640              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    4741                RenderFlexibleBox {DIV} at (3,3) size 0x13
     
    4943                  RenderBlock {DIV} at (22,0) size 0x13
    5044                  RenderBlock {DIV} at (22,1) size 13x11
    51             RenderTableCell {TD} at (536,1) size 8x25 [r=0 c=2 rs=1 cs=1]
     45            RenderTableCell {TD} at (10,1) size 8x25 [r=0 c=1 rs=1 cs=1]
    5246              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    5347                RenderFlexibleBox {DIV} at (3,3) size 0x13
     
    5549                  RenderBlock {DIV} at (22,0) size 0x13
    5650                  RenderBlock {DIV} at (22,1) size 13x11
    57             RenderTableCell {TD} at (545,3) size 238x20 [r=0 c=3 rs=1 cs=1]
     51            RenderTableCell {TD} at (19,1) size 8x25 [r=0 c=2 rs=1 cs=1]
     52              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     53                RenderFlexibleBox {DIV} at (3,3) size 0x13
     54                  RenderBlock {DIV} at (0,1) size 22x11
     55                  RenderBlock {DIV} at (22,0) size 0x13
     56                  RenderBlock {DIV} at (22,1) size 13x11
     57            RenderTableCell {TD} at (28,3) size 755x20 [r=0 c=3 rs=1 cs=1]
    5858              RenderText {#text} at (1,1) size 4x18
    5959                text run at (1,1) width 4: " "
    60 layer at (21,33) size 96x13
    61   RenderBlock {DIV} at (0,0) size 96x13
    62     RenderText {#text} at (0,0) size 49x13
    63       text run at (0,0) width 49: "New Mail"
    64 layer at (35,96) size 482x13
    65   RenderBlock {DIV} at (0,0) size 482x13
    66     RenderText {#text} at (0,0) size 49x13
    67       text run at (0,0) width 49: "New Mail"
  • trunk/LayoutTests/platform/mac/fast/replaced/width100percent-textarea-expected.txt

    r149210 r151737  
    1010        RenderTableSection {TBODY} at (0,0) size 784x40
    1111          RenderTableRow {TR} at (0,1) size 784x38
    12             RenderTableCell {TD} at (1,1) size 163x38 [r=0 c=0 rs=1 cs=1]
    13             RenderTableCell {TD} at (165,1) size 8x38 [r=0 c=1 rs=1 cs=1]
    14             RenderTableCell {TD} at (174,1) size 8x38 [r=0 c=2 rs=1 cs=1]
    15             RenderTableCell {TD} at (183,10) size 600x20 [r=0 c=3 rs=1 cs=1]
     12            RenderTableCell {TD} at (1,1) size 8x38 [r=0 c=0 rs=1 cs=1]
     13            RenderTableCell {TD} at (10,1) size 8x38 [r=0 c=1 rs=1 cs=1]
     14            RenderTableCell {TD} at (19,1) size 8x38 [r=0 c=2 rs=1 cs=1]
     15            RenderTableCell {TD} at (28,10) size 755x20 [r=0 c=3 rs=1 cs=1]
    1616              RenderText {#text} at (1,1) size 4x18
    1717                text run at (1,1) width 4: " "
     
    2222        RenderTableSection {TBODY} at (0,0) size 784x40
    2323          RenderTableRow {TR} at (0,1) size 784x38
    24             RenderTableCell {TD} at (1,1) size 233x38 [r=0 c=0 rs=1 cs=1]
    25             RenderTableCell {TD} at (235,1) size 8x38 [r=0 c=1 rs=1 cs=1]
    26             RenderTableCell {TD} at (244,1) size 8x38 [r=0 c=2 rs=1 cs=1]
    27             RenderTableCell {TD} at (253,10) size 530x20 [r=0 c=3 rs=1 cs=1]
     24            RenderTableCell {TD} at (1,1) size 8x38 [r=0 c=0 rs=1 cs=1]
     25            RenderTableCell {TD} at (10,1) size 8x38 [r=0 c=1 rs=1 cs=1]
     26            RenderTableCell {TD} at (19,1) size 8x38 [r=0 c=2 rs=1 cs=1]
     27            RenderTableCell {TD} at (28,10) size 755x20 [r=0 c=3 rs=1 cs=1]
    2828              RenderText {#text} at (1,1) size 4x18
    2929                text run at (1,1) width 4: " "
    30 layer at (10,30) size 161x32 clip at (11,31) size 159x30
    31   RenderTextControl {TEXTAREA} at (1,3) size 161x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    32     RenderBlock {DIV} at (3,3) size 155x13
    33       RenderText {#text} at (0,0) size 20x13
    34         text run at (0,0) width 20: "one"
    35 layer at (174,30) size 6x32 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 43
     30layer at (10,30) size 6x32 clip at (0,0) size 0x0 scrollWidth 9 scrollHeight 43
     31  RenderTextControl {TEXTAREA} at (1,3) size 6x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
     32    RenderBlock {DIV} at (3,3) size 0x39
     33      RenderText {#text} at (0,0) size 7x39
     34        text run at (0,0) width 7: "o"
     35        text run at (0,13) width 7: "n"
     36        text run at (0,26) width 7: "e"
     37layer at (19,30) size 6x32 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 43
    3638  RenderTextControl {TEXTAREA} at (1,3) size 6x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    3739    RenderBlock {DIV} at (3,3) size 0x39
     
    4042        text run at (0,13) width 9: "w"
    4143        text run at (0,26) width 7: "o"
    42 layer at (183,30) size 6x32 clip at (0,0) size 0x0 scrollWidth 9 scrollHeight 69
     44layer at (28,30) size 6x32 clip at (0,0) size 0x0 scrollWidth 9 scrollHeight 69
    4345  RenderTextControl {TEXTAREA} at (1,3) size 6x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    4446    RenderBlock {DIV} at (3,3) size 0x65
     
    4951        text run at (0,39) width 7: "e"
    5052        text run at (0,52) width 7: "e"
    51 layer at (10,106) size 231x32 clip at (11,107) size 229x30
    52   RenderTextControl {TEXTAREA} at (1,3) size 231x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    53     RenderBlock {DIV} at (3,3) size 225x13
    54       RenderText {#text} at (0,0) size 74x13
    55         text run at (0,0) width 74: "one two three"
    56 layer at (244,106) size 6x32 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 43
     53layer at (10,106) size 6x32 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 173
     54  RenderTextControl {TEXTAREA} at (1,3) size 6x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
     55    RenderBlock {DIV} at (3,3) size 0x169
     56      RenderText {#text} at (0,0) size 9x169
     57        text run at (0,0) width 7: "o"
     58        text run at (0,13) width 7: "n"
     59        text run at (0,26) width 7: "e"
     60        text run at (0,39) width 0: " "
     61        text run at (0,52) width 5: "t"
     62        text run at (0,65) width 9: "w"
     63        text run at (0,78) width 7: "o"
     64        text run at (0,91) width 0: " "
     65        text run at (0,104) width 5: "t"
     66        text run at (0,117) width 7: "h"
     67        text run at (0,130) width 5: "r"
     68        text run at (0,143) width 7: "e"
     69        text run at (0,156) width 7: "e"
     70layer at (19,106) size 6x32 clip at (0,0) size 0x0 scrollWidth 11 scrollHeight 43
    5771  RenderTextControl {TEXTAREA} at (1,3) size 6x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    5872    RenderBlock {DIV} at (3,3) size 0x39
     
    6175        text run at (0,13) width 9: "w"
    6276        text run at (0,26) width 7: "o"
    63 layer at (253,106) size 6x32 clip at (0,0) size 0x0 scrollWidth 9 scrollHeight 69
     77layer at (28,106) size 6x32 clip at (0,0) size 0x0 scrollWidth 9 scrollHeight 69
    6478  RenderTextControl {TEXTAREA} at (1,3) size 6x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    6579    RenderBlock {DIV} at (3,3) size 0x65
  • trunk/LayoutTests/platform/mac/fast/replaced/width100percent-textfield-expected.txt

    r117673 r151737  
    1010        RenderTableSection {TBODY} at (0,0) size 784x27
    1111          RenderTableRow {TR} at (0,1) size 784x25
    12             RenderTableCell {TD} at (1,1) size 125x25 [r=0 c=0 rs=1 cs=1]
    13               RenderTextControl {INPUT} at (1,3) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    14             RenderTableCell {TD} at (127,1) size 8x25 [r=0 c=1 rs=1 cs=1]
     12            RenderTableCell {TD} at (1,1) size 8x25 [r=0 c=0 rs=1 cs=1]
    1513              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    16             RenderTableCell {TD} at (136,1) size 8x25 [r=0 c=2 rs=1 cs=1]
     14            RenderTableCell {TD} at (10,1) size 8x25 [r=0 c=1 rs=1 cs=1]
    1715              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    18             RenderTableCell {TD} at (145,3) size 638x20 [r=0 c=3 rs=1 cs=1]
     16            RenderTableCell {TD} at (19,1) size 8x25 [r=0 c=2 rs=1 cs=1]
     17              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     18            RenderTableCell {TD} at (28,3) size 755x20 [r=0 c=3 rs=1 cs=1]
    1919              RenderText {#text} at (1,1) size 4x18
    2020                text run at (1,1) width 4: " "
     
    2525        RenderTableSection {TBODY} at (0,0) size 784x27
    2626          RenderTableRow {TR} at (0,1) size 784x25
    27             RenderTableCell {TD} at (1,1) size 525x25 [r=0 c=0 rs=1 cs=1]
    28               RenderTextControl {INPUT} at (1,3) size 523x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    29             RenderTableCell {TD} at (527,1) size 8x25 [r=0 c=1 rs=1 cs=1]
     27            RenderTableCell {TD} at (1,1) size 8x25 [r=0 c=0 rs=1 cs=1]
    3028              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    31             RenderTableCell {TD} at (536,1) size 8x25 [r=0 c=2 rs=1 cs=1]
     29            RenderTableCell {TD} at (10,1) size 8x25 [r=0 c=1 rs=1 cs=1]
    3230              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    33             RenderTableCell {TD} at (545,3) size 238x20 [r=0 c=3 rs=1 cs=1]
     31            RenderTableCell {TD} at (19,1) size 8x25 [r=0 c=2 rs=1 cs=1]
     32              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     33            RenderTableCell {TD} at (28,3) size 755x20 [r=0 c=3 rs=1 cs=1]
    3434              RenderText {#text} at (1,1) size 4x18
    3535                text run at (1,1) width 4: " "
    36 layer at (13,33) size 117x13
    37   RenderBlock {DIV} at (3,3) size 117x13
    38     RenderText {#text} at (0,0) size 49x13
    39       text run at (0,0) width 49: "New Mail"
    40 layer at (13,96) size 517x13
    41   RenderBlock {DIV} at (3,3) size 517x13
    42     RenderText {#text} at (0,0) size 49x13
    43       text run at (0,0) width 49: "New Mail"
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug57828-expected.txt

    r30635 r151737  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTable {TABLE} at (0,0) size 264x54 [border: (3px outset #808080)]
    7         RenderTableSection {TBODY} at (3,3) size 258x48
    8           RenderTableRow {TR} at (0,2) size 258x44
    9             RenderTableCell {TD} at (2,2) size 254x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     6      RenderTable {TABLE} at (0,0) size 221x54 [border: (3px outset #808080)]
     7        RenderTableSection {TBODY} at (3,3) size 215x48
     8          RenderTableRow {TR} at (0,2) size 215x44
     9            RenderTableCell {TD} at (2,2) size 211x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    1010              RenderImage {IMG} at (2,2) size 40x40
    1111              RenderText {#text} at (45,2) size 207x18
     
    1313      RenderBlock (anonymous) at (0,54) size 784x18
    1414        RenderBR {BR} at (0,0) size 0x18
    15       RenderTable {TABLE} at (0,72) size 264x54 [border: (3px outset #808080)]
    16         RenderTableSection {TBODY} at (3,3) size 258x48
    17           RenderTableRow {TR} at (0,2) size 258x44
    18             RenderTableCell {TD} at (2,2) size 254x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     15      RenderTable {TABLE} at (0,72) size 221x54 [border: (3px outset #808080)]
     16        RenderTableSection {TBODY} at (3,3) size 215x48
     17          RenderTableRow {TR} at (0,2) size 215x44
     18            RenderTableCell {TD} at (2,2) size 211x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    1919              RenderImage {IMG} at (2,2) size 40x40
    2020              RenderText {#text} at (45,2) size 207x18
  • trunk/LayoutTests/platform/qt/fast/css/word-space-extra-expected.txt

    r148596 r151737  
    77        RenderText {#text} at (0,0) size 138x28
    88          text run at (0,0) width 138: "word-spacing"
    9       RenderBlock (floating) {PRE} at (0,60) size 1264x170
    10         RenderBlock {H3} at (0,15) size 1264x19
     9      RenderBlock (floating) {PRE} at (0,60) size 1004x170
     10        RenderBlock {H3} at (0,15) size 1004x19
    1111          RenderText {#text} at (0,0) size 204x18
    1212            text run at (0,0) width 204: "In a floated pre"
    13         RenderBlock (anonymous) at (0,48) size 1264x121
     13        RenderBlock (anonymous) at (0,48) size 1004x121
    1414          RenderText {#text} at (0,0) size 260x30
    1515            text run at (0,0) width 0: " "
     
    146146            text run at (1108,105) width 0: " "
    147147      RenderBlock (anonymous) at (0,47) size 769x196
    148         RenderBR {BR} at (1264,0) size 0x19
     148        RenderBR {BR} at (1004,0) size 0x19
    149149      RenderBlock {PRE} at (0,257) size 769x154
    150150        RenderBlock {H3} at (0,0) size 769x18
     
    450450        RenderText {#text} at (0,0) size 141x28
    451451          text run at (0,0) width 141: "letter-spacing"
    452       RenderBlock (floating) {PRE} at (0,835) size 1521x170
    453         RenderBlock {H3} at (0,15) size 1521x19
     452      RenderBlock (floating) {PRE} at (0,835) size 1209x170
     453        RenderBlock {H3} at (0,15) size 1209x19
    454454          RenderText {#text} at (0,0) size 224x18
    455455            text run at (0,0) width 224: "In a floated pre"
    456         RenderBlock (anonymous) at (0,48) size 1521x121
     456        RenderBlock (anonymous) at (0,48) size 1209x121
    457457          RenderText {#text} at (0,0) size 286x30
    458458            text run at (0,0) width 0: " "
     
    589589            text run at (1274,105) width 0: " "
    590590      RenderBlock (anonymous) at (0,822) size 769x196
    591         RenderBR {BR} at (1521,0) size 0x19
     591        RenderBR {BR} at (1209,0) size 0x19
    592592      RenderBlock {PRE} at (0,1032) size 769x154
    593593        RenderBlock {H3} at (0,0) size 769x18
     
    894894        RenderText {#text} at (0,0) size 131x28
    895895          text run at (0,0) width 131: "both-spacing"
    896       RenderBlock (floating) {PRE} at (0,1643) size 2018x169
    897         RenderBlock {H3} at (0,15) size 2018x19
     896      RenderBlock (floating) {PRE} at (0,1643) size 1469x169
     897        RenderBlock {H3} at (0,15) size 1469x19
    898898          RenderText {#text} at (0,0) size 284x18
    899899            text run at (0,0) width 284: "In a floated pre"
    900         RenderBlock (anonymous) at (0,48) size 2018x121
     900        RenderBlock (anonymous) at (0,48) size 1469x121
    901901          RenderText {#text} at (0,0) size 543x30
    902902            text run at (0,0) width 0: " "
     
    10331033            text run at (1771,105) width 0: " "
    10341034      RenderBlock (anonymous) at (0,1630) size 769x195
    1035         RenderBR {BR} at (2018,0) size 0x19
     1035        RenderBR {BR} at (1469,0) size 0x19
    10361036      RenderBlock {PRE} at (0,1839) size 769x154
    10371037        RenderBlock {H3} at (0,0) size 769x18
  • trunk/LayoutTests/platform/qt/fast/replaced/width100percent-image-expected.txt

    r142991 r151737  
    1212        RenderTableSection {TBODY} at (0,0) size 769x279
    1313          RenderTableRow {TR} at (0,1) size 769x277
    14             RenderTableCell {TD} at (1,1) size 216x277 [r=0 c=0 rs=1 cs=1]
     14            RenderTableCell {TD} at (1,1) size 2x277 [r=0 c=0 rs=1 cs=1]
    1515              RenderImage {IMG} at (1,1) size 214x275
    16             RenderTableCell {TD} at (218,1) size 2x277 [r=0 c=1 rs=1 cs=1]
     16            RenderTableCell {TD} at (4,1) size 2x277 [r=0 c=1 rs=1 cs=1]
    1717              RenderImage {IMG} at (1,1) size 214x275
    18             RenderTableCell {TD} at (221,1) size 2x277 [r=0 c=2 rs=1 cs=1]
     18            RenderTableCell {TD} at (7,1) size 2x277 [r=0 c=2 rs=1 cs=1]
    1919              RenderImage {IMG} at (1,1) size 214x275
    20             RenderTableCell {TD} at (224,129) size 544x21 [r=0 c=3 rs=1 cs=1]
     20            RenderTableCell {TD} at (10,129) size 758x21 [r=0 c=3 rs=1 cs=1]
    2121              RenderText {#text} at (1,1) size 4x19
    2222                text run at (1,1) width 4: " "
  • trunk/LayoutTests/platform/qt/fast/replaced/width100percent-searchfield-expected.txt

    r148596 r151737  
    1 layer at (0,0) size 945x585
    2   RenderView at (0,0) size 800x585
    3 layer at (0,0) size 800x585
    4   RenderBlock {HTML} at (0,0) size 800x585
    5     RenderBody {BODY} at (8,8) size 784x569
     1layer at (0,0) size 800x600
     2  RenderView at (0,0) size 800x600
     3layer at (0,0) size 800x600
     4  RenderBlock {HTML} at (0,0) size 800x600
     5    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock (anonymous) at (0,0) size 784x19
    77        RenderText {#text} at (0,0) size 212x19
     
    1010        RenderTableSection {TBODY} at (0,0) size 784x31
    1111          RenderTableRow {TR} at (0,1) size 784x29
    12             RenderTableCell {TD} at (1,1) size 194x29 [r=0 c=0 rs=1 cs=1]
    13               RenderTextControl {INPUT} at (1,3) size 192x23
    14                 RenderFlexibleBox {DIV} at (2,2) size 188x19
    15                   RenderBlock {DIV} at (0,9) size 0x1
    16                   RenderBlock {DIV} at (0,0) size 177x19
    17                   RenderBlock {DIV} at (177,4) size 11x11
    18             RenderTableCell {TD} at (196,1) size 6x29 [r=0 c=1 rs=1 cs=1]
     12            RenderTableCell {TD} at (1,1) size 6x29 [r=0 c=0 rs=1 cs=1]
    1913              RenderTextControl {INPUT} at (1,3) size 4x23
    2014                RenderFlexibleBox {DIV} at (2,2) size 0x19
     
    2216                  RenderBlock {DIV} at (0,0) size 0x19
    2317                  RenderBlock {DIV} at (0,4) size 11x11
    24             RenderTableCell {TD} at (203,1) size 6x29 [r=0 c=2 rs=1 cs=1]
     18            RenderTableCell {TD} at (8,1) size 6x29 [r=0 c=1 rs=1 cs=1]
    2519              RenderTextControl {INPUT} at (1,3) size 4x23
    2620                RenderFlexibleBox {DIV} at (2,2) size 0x19
     
    2822                  RenderBlock {DIV} at (0,0) size 0x19
    2923                  RenderBlock {DIV} at (0,4) size 11x11
    30             RenderTableCell {TD} at (210,5) size 573x21 [r=0 c=3 rs=1 cs=1]
     24            RenderTableCell {TD} at (15,1) size 6x29 [r=0 c=2 rs=1 cs=1]
     25              RenderTextControl {INPUT} at (1,3) size 4x23
     26                RenderFlexibleBox {DIV} at (2,2) size 0x19
     27                  RenderBlock {DIV} at (0,9) size 0x1
     28                  RenderBlock {DIV} at (0,0) size 0x19
     29                  RenderBlock {DIV} at (0,4) size 11x11
     30            RenderTableCell {TD} at (22,5) size 761x21 [r=0 c=3 rs=1 cs=1]
    3131              RenderText {#text} at (1,1) size 4x19
    3232                text run at (1,1) width 4: " "
     
    3434        RenderBR {BR} at (0,0) size 0x19
    3535        RenderBR {BR} at (0,19) size 0x19
    36       RenderTable {TABLE} at (0,88) size 937x31
    37         RenderTableSection {TBODY} at (0,0) size 937x31
    38           RenderTableRow {TR} at (0,1) size 937x29
    39             RenderTableCell {TD} at (1,1) size 914x29 [r=0 c=0 rs=1 cs=1]
    40               RenderTextControl {INPUT} at (1,3) size 912x23
    41                 RenderFlexibleBox {DIV} at (2,2) size 908x19
    42                   RenderBlock {DIV} at (0,9) size 0x1
    43                   RenderBlock {DIV} at (0,0) size 897x19
    44                   RenderBlock {DIV} at (897,4) size 11x11
    45             RenderTableCell {TD} at (916,1) size 6x29 [r=0 c=1 rs=1 cs=1]
     36      RenderTable {TABLE} at (0,88) size 784x31
     37        RenderTableSection {TBODY} at (0,0) size 784x31
     38          RenderTableRow {TR} at (0,1) size 784x29
     39            RenderTableCell {TD} at (1,1) size 6x29 [r=0 c=0 rs=1 cs=1]
    4640              RenderTextControl {INPUT} at (1,3) size 4x23
    4741                RenderFlexibleBox {DIV} at (2,2) size 0x19
     
    4943                  RenderBlock {DIV} at (0,0) size 0x19
    5044                  RenderBlock {DIV} at (0,4) size 11x11
    51             RenderTableCell {TD} at (923,1) size 6x29 [r=0 c=2 rs=1 cs=1]
     45            RenderTableCell {TD} at (8,1) size 6x29 [r=0 c=1 rs=1 cs=1]
    5246              RenderTextControl {INPUT} at (1,3) size 4x23
    5347                RenderFlexibleBox {DIV} at (2,2) size 0x19
     
    5549                  RenderBlock {DIV} at (0,0) size 0x19
    5650                  RenderBlock {DIV} at (0,4) size 11x11
    57             RenderTableCell {TD} at (930,5) size 6x21 [r=0 c=3 rs=1 cs=1]
     51            RenderTableCell {TD} at (15,1) size 6x29 [r=0 c=2 rs=1 cs=1]
     52              RenderTextControl {INPUT} at (1,3) size 4x23
     53                RenderFlexibleBox {DIV} at (2,2) size 0x19
     54                  RenderBlock {DIV} at (0,9) size 0x1
     55                  RenderBlock {DIV} at (0,0) size 0x19
     56                  RenderBlock {DIV} at (0,4) size 11x11
     57            RenderTableCell {TD} at (22,5) size 761x21 [r=0 c=3 rs=1 cs=1]
    5858              RenderText {#text} at (1,1) size 4x19
    5959                text run at (1,1) width 4: " "
    60 layer at (12,33) size 177x19
    61   RenderBlock {DIV} at (0,0) size 177x19
    62     RenderText {#text} at (0,0) size 61x19
    63       text run at (0,0) width 61: "New Mail"
    64 layer at (12,102) size 897x19
    65   RenderBlock {DIV} at (0,0) size 897x19
    66     RenderText {#text} at (0,0) size 61x19
    67       text run at (0,0) width 61: "New Mail"
  • trunk/LayoutTests/platform/qt/fast/replaced/width100percent-textfield-expected.txt

    r130286 r151737  
    1 layer at (0,0) size 945x585
    2   RenderView at (0,0) size 800x585
    3 layer at (0,0) size 800x585
    4   RenderBlock {HTML} at (0,0) size 800x585
    5     RenderBody {BODY} at (8,8) size 784x569
     1layer at (0,0) size 800x600
     2  RenderView at (0,0) size 800x600
     3layer at (0,0) size 800x600
     4  RenderBlock {HTML} at (0,0) size 800x600
     5    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock (anonymous) at (0,0) size 784x19
    77        RenderText {#text} at (0,0) size 212x19
     
    1010        RenderTableSection {TBODY} at (0,0) size 784x31
    1111          RenderTableRow {TR} at (0,1) size 784x29
    12             RenderTableCell {TD} at (1,1) size 194x29 [r=0 c=0 rs=1 cs=1]
    13               RenderTextControl {INPUT} at (1,3) size 192x23
    14             RenderTableCell {TD} at (196,1) size 6x29 [r=0 c=1 rs=1 cs=1]
     12            RenderTableCell {TD} at (1,1) size 6x29 [r=0 c=0 rs=1 cs=1]
    1513              RenderTextControl {INPUT} at (1,3) size 4x23
    16             RenderTableCell {TD} at (203,1) size 6x29 [r=0 c=2 rs=1 cs=1]
     14            RenderTableCell {TD} at (8,1) size 6x29 [r=0 c=1 rs=1 cs=1]
    1715              RenderTextControl {INPUT} at (1,3) size 4x23
    18             RenderTableCell {TD} at (210,5) size 573x21 [r=0 c=3 rs=1 cs=1]
     16            RenderTableCell {TD} at (15,1) size 6x29 [r=0 c=2 rs=1 cs=1]
     17              RenderTextControl {INPUT} at (1,3) size 4x23
     18            RenderTableCell {TD} at (22,5) size 761x21 [r=0 c=3 rs=1 cs=1]
    1919              RenderText {#text} at (1,1) size 4x19
    2020                text run at (1,1) width 4: " "
     
    2222        RenderBR {BR} at (0,0) size 0x19
    2323        RenderBR {BR} at (0,19) size 0x19
    24       RenderTable {TABLE} at (0,88) size 937x31
    25         RenderTableSection {TBODY} at (0,0) size 937x31
    26           RenderTableRow {TR} at (0,1) size 937x29
    27             RenderTableCell {TD} at (1,1) size 914x29 [r=0 c=0 rs=1 cs=1]
    28               RenderTextControl {INPUT} at (1,3) size 912x23
    29             RenderTableCell {TD} at (916,1) size 6x29 [r=0 c=1 rs=1 cs=1]
     24      RenderTable {TABLE} at (0,88) size 784x31
     25        RenderTableSection {TBODY} at (0,0) size 784x31
     26          RenderTableRow {TR} at (0,1) size 784x29
     27            RenderTableCell {TD} at (1,1) size 6x29 [r=0 c=0 rs=1 cs=1]
    3028              RenderTextControl {INPUT} at (1,3) size 4x23
    31             RenderTableCell {TD} at (923,1) size 6x29 [r=0 c=2 rs=1 cs=1]
     29            RenderTableCell {TD} at (8,1) size 6x29 [r=0 c=1 rs=1 cs=1]
    3230              RenderTextControl {INPUT} at (1,3) size 4x23
    33             RenderTableCell {TD} at (930,5) size 6x21 [r=0 c=3 rs=1 cs=1]
     31            RenderTableCell {TD} at (15,1) size 6x29 [r=0 c=2 rs=1 cs=1]
     32              RenderTextControl {INPUT} at (1,3) size 4x23
     33            RenderTableCell {TD} at (22,5) size 761x21 [r=0 c=3 rs=1 cs=1]
    3434              RenderText {#text} at (1,1) size 4x19
    3535                text run at (1,1) width 4: " "
    36 layer at (12,33) size 188x19
    37   RenderBlock {DIV} at (2,2) size 188x19
    38     RenderText {#text} at (0,0) size 61x19
    39       text run at (0,0) width 61: "New Mail"
    40 layer at (12,102) size 908x19
    41   RenderBlock {DIV} at (2,2) size 908x19
    42     RenderText {#text} at (0,0) size 61x19
    43       text run at (0,0) width 61: "New Mail"
  • trunk/LayoutTests/platform/qt/tables/mozilla/bugs/bug57828-expected.txt

    r122719 r151737  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTable {TABLE} at (0,0) size 253x54 [border: (3px outset #808080)]
    7         RenderTableSection {TBODY} at (3,3) size 247x48
    8           RenderTableRow {TR} at (0,2) size 247x44
    9             RenderTableCell {TD} at (2,2) size 243x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     6      RenderTable {TABLE} at (0,0) size 210x54 [border: (3px outset #808080)]
     7        RenderTableSection {TBODY} at (3,3) size 204x48
     8          RenderTableRow {TR} at (0,2) size 204x44
     9            RenderTableCell {TD} at (2,2) size 200x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    1010              RenderImage {IMG} at (2,2) size 40x40
    1111              RenderText {#text} at (45,2) size 196x19
     
    1313      RenderBlock (anonymous) at (0,54) size 784x19
    1414        RenderBR {BR} at (0,0) size 0x19
    15       RenderTable {TABLE} at (0,73) size 253x54 [border: (3px outset #808080)]
    16         RenderTableSection {TBODY} at (3,3) size 247x48
    17           RenderTableRow {TR} at (0,2) size 247x44
    18             RenderTableCell {TD} at (2,2) size 243x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     15      RenderTable {TABLE} at (0,73) size 210x54 [border: (3px outset #808080)]
     16        RenderTableSection {TBODY} at (3,3) size 204x48
     17          RenderTableRow {TR} at (0,2) size 204x44
     18            RenderTableCell {TD} at (2,2) size 200x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    1919              RenderImage {IMG} at (2,2) size 40x40
    2020              RenderText {#text} at (45,2) size 196x19
  • trunk/Source/WebCore/ChangeLog

    r151736 r151737  
     12013-06-19  Robert Hogan  <robert@webkit.org>
     2
     3        Incorrect computation of shrink-to-fit width for block with white-space:nowrap and floating children
     4        https://bugs.webkit.org/show_bug.cgi?id=114879
     5
     6        Reviewed by David Hyatt.
     7        Per http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins when width is auto then floating non-replaced,
     8        absolute non-replaced, and inline-block non-replaced elements should use shrink-to-fit width. This trumps any no-wrap property
     9        on the element so if we are shrinking to fit ensure our minimum width respects all possible line breaks.
     10
     11        Test: fast/block/shrink-to-fit-width-container-with-floating-children.html
     12
     13        * rendering/RenderBlock.cpp:
     14        (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
     15
    1162013-06-19  Christophe Dumez  <ch.dumez@sisa.samsung.com>
    217
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r151662 r151737  
    58905890
    58915891    if (!style()->autoWrap() && childrenInline()) {
    5892         minLogicalWidth = maxLogicalWidth;
    58935892        // A horizontal marquee with inline children has no minimum width.
    58945893        if (layer() && layer()->marquee() && layer()->marquee()->isHorizontal())
Note: See TracChangeset for help on using the changeset viewer.