Changeset 47255 in webkit


Ignore:
Timestamp:
Aug 13, 2009 5:40:12 PM (15 years ago)
Author:
mitz@apple.com
Message:

WebCore: misalignment because of float:left of <div> tag
https://bugs.webkit.org/show_bug.cgi?id=15869

Reviewed by Simon Fraser.

One section of http://edgar.sec.gov site draws to the right of the rest
of the content
<rdar://problem/7135951>

Tests: fast/block/float/avoidance-percent-width-compat.html

fast/block/float/avoidance-percent-width-strict.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::getClearDelta): Changed to apply the same float

avoidance logic in strict mode and in compatibility mode, which
matches Firefox and IE. Changed to compute and use the computed
width of the child, instead of ignoring non-fixed widths.

LayoutTests: misalignment because of float:left of <div> tag
https://bugs.webkit.org/show_bug.cgi?id=15869

Reviewed by Simon Fraser.

One section of http://edgar.sec.gov site draws to the right of the rest
of the content
<rdar://problem/7135951>

  • fast/block/float/avoidance-percent-width-compat.html: Added.
  • fast/block/float/avoidance-percent-width-strict.html: Added.
  • platform/mac/fast/block/float/035-expected.checksum:
  • platform/mac/fast/block/float/035-expected.png:
  • platform/mac/fast/block/float/035-expected.txt:
  • platform/mac/fast/block/float/avoidance-percent-width-compat-expected.checksum: Added.
  • platform/mac/fast/block/float/avoidance-percent-width-compat-expected.png: Added.
  • platform/mac/fast/block/float/avoidance-percent-width-compat-expected.txt: Added.
  • platform/mac/fast/block/float/avoidance-percent-width-strict-expected.checksum: Added.
  • platform/mac/fast/block/float/avoidance-percent-width-strict-expected.png: Added.
  • platform/mac/fast/block/float/avoidance-percent-width-strict-expected.txt: Added.
  • platform/mac/fast/block/float/float-avoidance-expected.checksum:
  • platform/mac/fast/block/float/float-avoidance-expected.png:
  • platform/mac/fast/block/float/float-avoidance-expected.txt:
  • platform/mac/fast/overflow/004-expected.checksum:
  • platform/mac/fast/overflow/004-expected.png:
  • platform/mac/fast/overflow/004-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug106158-1-expected.checksum:
  • platform/mac/tables/mozilla/bugs/bug106158-1-expected.png:
  • platform/mac/tables/mozilla/bugs/bug106158-1-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug106158-2-expected.checksum:
  • platform/mac/tables/mozilla/bugs/bug106158-2-expected.png:
  • platform/mac/tables/mozilla/bugs/bug106158-2-expected.txt:
Location:
trunk
Files:
8 added
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r47254 r47255  
     12009-08-13  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        misalignment because of float:left of <div> tag
     6        https://bugs.webkit.org/show_bug.cgi?id=15869
     7
     8        One section of http://edgar.sec.gov site draws to the right of the rest
     9        of the content
     10        <rdar://problem/7135951>
     11
     12        * fast/block/float/avoidance-percent-width-compat.html: Added.
     13        * fast/block/float/avoidance-percent-width-strict.html: Added.
     14        * platform/mac/fast/block/float/035-expected.checksum:
     15        * platform/mac/fast/block/float/035-expected.png:
     16        * platform/mac/fast/block/float/035-expected.txt:
     17        * platform/mac/fast/block/float/avoidance-percent-width-compat-expected.checksum: Added.
     18        * platform/mac/fast/block/float/avoidance-percent-width-compat-expected.png: Added.
     19        * platform/mac/fast/block/float/avoidance-percent-width-compat-expected.txt: Added.
     20        * platform/mac/fast/block/float/avoidance-percent-width-strict-expected.checksum: Added.
     21        * platform/mac/fast/block/float/avoidance-percent-width-strict-expected.png: Added.
     22        * platform/mac/fast/block/float/avoidance-percent-width-strict-expected.txt: Added.
     23        * platform/mac/fast/block/float/float-avoidance-expected.checksum:
     24        * platform/mac/fast/block/float/float-avoidance-expected.png:
     25        * platform/mac/fast/block/float/float-avoidance-expected.txt:
     26        * platform/mac/fast/overflow/004-expected.checksum:
     27        * platform/mac/fast/overflow/004-expected.png:
     28        * platform/mac/fast/overflow/004-expected.txt:
     29        * platform/mac/tables/mozilla/bugs/bug106158-1-expected.checksum:
     30        * platform/mac/tables/mozilla/bugs/bug106158-1-expected.png:
     31        * platform/mac/tables/mozilla/bugs/bug106158-1-expected.txt:
     32        * platform/mac/tables/mozilla/bugs/bug106158-2-expected.checksum:
     33        * platform/mac/tables/mozilla/bugs/bug106158-2-expected.png:
     34        * platform/mac/tables/mozilla/bugs/bug106158-2-expected.txt:
     35
    1362009-08-13  Eric Seidel  <eric@webkit.org>
    237
  • trunk/LayoutTests/platform/mac/fast/block/float/035-expected.checksum

    r38121 r47255  
    1 d975c001de9476347c2d1168ea94a4e7
     135051258731f368ef14b63a8254ba5cc
  • trunk/LayoutTests/platform/mac/fast/block/float/035-expected.txt

    r25970 r47255  
    1 layer at (0,0) size 800x600
    2   RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x600
    4   RenderBlock {HTML} at (0,0) size 800x600
    5     RenderBody {BODY} at (8,8) size 784x584
    6       RenderBlock (floating) {DIV} at (0,0) size 673x520 [border: (10px solid #0000FF)]
     1layer at (0,0) size 785x828
     2  RenderView at (0,0) size 785x600
     3layer at (0,0) size 785x828
     4  RenderBlock {HTML} at (0,0) size 785x600
     5    RenderBody {BODY} at (8,8) size 769x584
     6      RenderBlock (floating) {DIV} at (0,0) size 673x820 [border: (10px solid #0000FF)]
    77        RenderImage {IMG} at (10,10) size 300x300 [bgcolor=#008000]
    8         RenderImage {IMG} at (163,10) size 500x500 [bgcolor=#800080]
     8        RenderImage {IMG} at (-140,310) size 500x500 [bgcolor=#800080]
  • trunk/LayoutTests/platform/mac/fast/block/float/float-avoidance-expected.checksum

    r38121 r47255  
    1 daf506163454bd4c5c8f2447480f3cd8
     1bfd1d9cca70442a55191d87cfc24332b
  • trunk/LayoutTests/platform/mac/fast/block/float/float-avoidance-expected.txt

    r30635 r47255  
    1 layer at (0,0) size 785x2332
     1layer at (0,0) size 785x2368
    22  RenderView at (0,0) size 785x600
    3 layer at (0,0) size 785x2332
    4   RenderBlock {HTML} at (0,0) size 785x2332
    5     RenderBody {BODY} at (8,8) size 769x2316
     3layer at (0,0) size 785x2368
     4  RenderBlock {HTML} at (0,0) size 785x2368
     5    RenderBody {BODY} at (8,8) size 769x2352
    66      RenderBlock (anonymous) at (0,0) size 769x36
    77        RenderText {#text} at (0,0) size 765x36
     
    130130          text run at (0,0) width 578: "The block-level table below has a percentage width and should still be even with the select. "
    131131          text run at (578,0) width 152: "It spills out of the block."
    132       RenderBlock {P} at (0,898) size 220x122 [border: (10px solid #FF0000)]
    133         RenderBlock (anonymous) at (10,10) size 200x18
    134           RenderText {#text} at (0,0) size 60x18
    135             text run at (0,0) width 60: "Line One"
    136           RenderBR {BR} at (60,14) size 0x0
    137           RenderMenuList {SELECT} at (0,20) size 100x18 [bgcolor=#FFFFFF]
    138             RenderBlock (anonymous) at (0,0) size 100x18
    139               RenderText at (8,2) size 22x13
    140                 text run at (8,2) width 22: "One"
    141           RenderText {#text} at (0,0) size 0x0
    142         RenderTable {TABLE} at (110,28) size 200x66 [border: (2px outset #808080)]
     132      RenderBlock {P} at (0,898) size 220x144 [border: (10px solid #FF0000)]
     133        RenderBlock (anonymous) at (10,10) size 200x18
     134          RenderText {#text} at (0,0) size 60x18
     135            text run at (0,0) width 60: "Line One"
     136          RenderBR {BR} at (60,14) size 0x0
     137          RenderMenuList {SELECT} at (0,20) size 100x18 [bgcolor=#FFFFFF]
     138            RenderBlock (anonymous) at (0,0) size 100x18
     139              RenderText at (8,2) size 22x13
     140                text run at (8,2) width 22: "One"
     141          RenderText {#text} at (0,0) size 0x0
     142        RenderTable {TABLE} at (10,50) size 200x66 [border: (2px outset #808080)]
    143143          RenderTableSection {TBODY} at (2,2) size 196x62
    144144            RenderTableRow {TR} at (0,2) size 196x58
     
    148148                  text run at (2,20) width 161: "shrink so it can be next to"
    149149                  text run at (2,38) width 90: "previous float."
    150         RenderBlock (anonymous) at (10,94) size 200x18
    151           RenderBR {BR} at (0,0) size 0x18
    152       RenderBlock (anonymous) at (0,1036) size 769x18
     150        RenderBlock (anonymous) at (10,116) size 200x18
     151          RenderBR {BR} at (0,0) size 0x18
     152      RenderBlock (anonymous) at (0,1058) size 769x18
    153153        RenderText {#text} at (0,0) size 743x18
    154154          text run at (0,0) width 545: "The block-level table below has an auto width and should still be even with the select. "
    155155          text run at (545,0) width 198: "It shrinks to fit inside the block."
    156       RenderBlock {P} at (0,1070) size 220x176 [border: (10px solid #FF0000)]
     156      RenderBlock {P} at (0,1092) size 220x176 [border: (10px solid #FF0000)]
    157157        RenderBlock (anonymous) at (10,10) size 200x18
    158158          RenderText {#text} at (0,0) size 60x18
     
    177177        RenderBlock (anonymous) at (10,148) size 200x18
    178178          RenderBR {BR} at (0,0) size 0x18
    179       RenderBlock (anonymous) at (0,1262) size 769x18
     179      RenderBlock (anonymous) at (0,1284) size 769x18
    180180        RenderText {#text} at (0,0) size 538x18
    181181          text run at (0,0) width 538: "The floating overflow section with a percentage width should be even with the select."
    182       RenderBlock {DIV} at (0,1280) size 220x146 [border: (10px solid #FF0000)]
     182      RenderBlock {DIV} at (0,1302) size 220x146 [border: (10px solid #FF0000)]
    183183        RenderText {#text} at (10,10) size 60x18
    184184          text run at (10,10) width 60: "Line One"
     
    191191        RenderText {#text} at (0,0) size 0x0
    192192        RenderBR {BR} at (210,28) size 0x18
    193       RenderBlock (anonymous) at (0,1426) size 769x36
     193      RenderBlock (anonymous) at (0,1448) size 769x36
    194194        RenderText {#text} at (0,0) size 728x36
    195195          text run at (0,0) width 728: "The floating overflow section with an auto width should be even with the select and shrinks to use the available line"
    196196          text run at (0,18) width 268: "width. THIS IS CURRENTLY BUGGY."
    197       RenderBlock {DIV} at (0,1462) size 220x114 [border: (10px solid #FF0000)]
     197      RenderBlock {DIV} at (0,1484) size 220x114 [border: (10px solid #FF0000)]
    198198        RenderText {#text} at (10,10) size 60x18
    199199          text run at (10,10) width 60: "Line One"
     
    206206        RenderText {#text} at (0,0) size 0x0
    207207        RenderBR {BR} at (110,28) size 0x18
    208       RenderBlock (anonymous) at (0,1576) size 769x18
     208      RenderBlock (anonymous) at (0,1598) size 769x18
    209209        RenderText {#text} at (0,0) size 649x18
    210210          text run at (0,0) width 649: "The block-level overflow section below has a percentage width and should still be even with the select."
    211       RenderBlock {DIV} at (0,1594) size 220x164 [border: (10px solid #FF0000)]
     211      RenderBlock {DIV} at (0,1616) size 220x164 [border: (10px solid #FF0000)]
    212212        RenderBlock (anonymous) at (10,10) size 200x18
    213213          RenderText {#text} at (0,0) size 60x18
     
    221221        RenderBlock (anonymous) at (10,136) size 200x18
    222222          RenderBR {BR} at (0,0) size 0x18
    223       RenderBlock (anonymous) at (0,1758) size 769x36
     223      RenderBlock (anonymous) at (0,1780) size 769x36
    224224        RenderText {#text} at (0,0) size 752x36
    225225          text run at (0,0) width 620: "The block-level overflow section below has an auto width and should still be even with the select. "
    226226          text run at (620,0) width 132: "It shrinks to fit inside"
    227227          text run at (0,18) width 62: "the block."
    228       RenderBlock {DIV} at (0,1794) size 220x164 [border: (10px solid #FF0000)]
     228      RenderBlock {DIV} at (0,1816) size 220x164 [border: (10px solid #FF0000)]
    229229        RenderBlock (anonymous) at (10,10) size 200x18
    230230          RenderText {#text} at (0,0) size 60x18
     
    238238        RenderBlock (anonymous) at (10,136) size 200x18
    239239          RenderBR {BR} at (0,0) size 0x18
    240       RenderBlock (anonymous) at (0,1958) size 769x18
     240      RenderBlock (anonymous) at (0,1980) size 769x18
    241241        RenderText {#text} at (0,0) size 446x18
    242242          text run at (0,0) width 446: "The floating hr with a percentage width should be even with the select."
    243       RenderBlock {DIV} at (0,1976) size 220x60 [border: (10px solid #FF0000)]
     243      RenderBlock {DIV} at (0,1998) size 220x60 [border: (10px solid #FF0000)]
    244244        RenderText {#text} at (10,10) size 60x18
    245245          text run at (10,10) width 60: "Line One"
     
    253253        RenderText {#text} at (0,0) size 0x0
    254254        RenderBR {BR} at (196,28) size 0x18
    255       RenderBlock (anonymous) at (0,2036) size 769x36
     255      RenderBlock (anonymous) at (0,2058) size 769x36
    256256        RenderText {#text} at (0,0) size 750x36
    257257          text run at (0,0) width 750: "The floating hr below should still be even with the select and shrinks to use its intrinsic width (which is basically like 1-"
    258258          text run at (0,18) width 33: "2px)."
    259       RenderBlock {DIV} at (0,2072) size 220x60 [border: (10px solid #FF0000)]
     259      RenderBlock {DIV} at (0,2094) size 220x60 [border: (10px solid #FF0000)]
    260260        RenderText {#text} at (10,10) size 60x18
    261261          text run at (10,10) width 60: "Line One"
     
    269269        RenderText {#text} at (0,0) size 0x0
    270270        RenderBR {BR} at (116,28) size 0x18
    271       RenderBlock (anonymous) at (0,2132) size 769x18
     271      RenderBlock (anonymous) at (0,2154) size 769x18
    272272        RenderText {#text} at (0,0) size 557x18
    273273          text run at (0,0) width 557: "The block-level hr below has a percentage width and should still be even with the select."
    274       RenderBlock {DIV} at (0,2150) size 220x74 [border: (10px solid #FF0000)]
    275         RenderBlock (anonymous) at (10,10) size 200x18
    276           RenderText {#text} at (0,0) size 60x18
    277             text run at (0,0) width 60: "Line One"
    278           RenderBR {BR} at (60,14) size 0x0
    279           RenderMenuList {SELECT} at (0,20) size 100x18 [bgcolor=#FFFFFF]
    280             RenderBlock (anonymous) at (0,0) size 100x18
    281               RenderText at (8,2) size 22x13
    282                 text run at (8,2) width 22: "One"
    283           RenderText {#text} at (0,0) size 0x0
    284         RenderBlock {HR} at (110,36) size 202x2 [border: (1px inset #000000)]
    285         RenderBlock (anonymous) at (10,46) size 200x18
    286           RenderBR {BR} at (100,0) size 0x18
    287       RenderBlock (anonymous) at (0,2224) size 769x18
     274      RenderBlock {DIV} at (0,2172) size 220x88 [border: (10px solid #FF0000)]
     275        RenderBlock (anonymous) at (10,10) size 200x18
     276          RenderText {#text} at (0,0) size 60x18
     277            text run at (0,0) width 60: "Line One"
     278          RenderBR {BR} at (60,14) size 0x0
     279          RenderMenuList {SELECT} at (0,20) size 100x18 [bgcolor=#FFFFFF]
     280            RenderBlock (anonymous) at (0,0) size 100x18
     281              RenderText at (8,2) size 22x13
     282                text run at (8,2) width 22: "One"
     283          RenderText {#text} at (0,0) size 0x0
     284        RenderBlock {HR} at (10,50) size 202x2 [border: (1px inset #000000)]
     285        RenderBlock (anonymous) at (10,60) size 200x18
     286          RenderBR {BR} at (0,0) size 0x18
     287      RenderBlock (anonymous) at (0,2260) size 769x18
    288288        RenderText {#text} at (0,0) size 623x18
    289289          text run at (0,0) width 528: "The block-level hr below has an auto width and should still be even with the select. "
    290290          text run at (528,0) width 95: "It shrinks to fit."
    291       RenderBlock {DIV} at (0,2242) size 220x74 [border: (10px solid #FF0000)]
     291      RenderBlock {DIV} at (0,2278) size 220x74 [border: (10px solid #FF0000)]
    292292        RenderBlock (anonymous) at (10,10) size 200x18
    293293          RenderText {#text} at (0,0) size 60x18
     
    302302        RenderBlock (anonymous) at (10,46) size 200x18
    303303          RenderBR {BR} at (100,0) size 0x18
    304 layer at (118,1316) size 100x108
     304layer at (118,1338) size 100x108
    305305  RenderBlock (floating) {DIV} at (110,28) size 100x108
    306306    RenderText {#text} at (0,0) size 98x108
     
    311311      text run at (0,72) width 98: "have to wrap to"
    312312      text run at (0,90) width 88: "multiple lines."
    313 layer at (18,1520) size 200x54
     313layer at (18,1542) size 200x54
    314314  RenderBlock (floating) {DIV} at (10,50) size 200x54
    315315    RenderText {#text} at (0,0) size 172x54
     
    317317      text run at (0,18) width 172: "with enough text to have to"
    318318      text run at (0,36) width 140: "wrap to multiple lines."
    319 layer at (118,1630) size 100x108
     319layer at (118,1652) size 100x108
    320320  RenderBlock {DIV} at (110,28) size 100x108
    321321    RenderText {#text} at (0,0) size 98x108
     
    326326      text run at (0,72) width 98: "have to wrap to"
    327327      text run at (0,90) width 88: "multiple lines."
    328 layer at (118,1830) size 100x108
     328layer at (118,1852) size 100x108
    329329  RenderBlock {DIV} at (110,28) size 100x108
    330330    RenderText {#text} at (0,0) size 98x108
  • trunk/LayoutTests/platform/mac/fast/overflow/004-expected.checksum

    r41742 r47255  
    1 565185230b519cff00aa40ec0770d6ce
     1e31e1d829e8e8eb8e45f513ce4833f87
  • trunk/LayoutTests/platform/mac/fast/overflow/004-expected.txt

    r25970 r47255  
    1 layer at (0,0) size 800x600
    2   RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x536
    4   RenderBlock {HTML} at (0,0) size 800x536
    5     RenderBody {BODY} at (8,8) size 784x520
    6       RenderBlock (anonymous) at (0,0) size 784x18
     1layer at (0,0) size 785x1038
     2  RenderView at (0,0) size 785x600
     3layer at (0,0) size 785x1038
     4  RenderBlock {HTML} at (0,0) size 785x1038
     5    RenderBody {BODY} at (8,8) size 769x1022
     6      RenderBlock (anonymous) at (0,0) size 769x18
    77        RenderText {#text} at (0,0) size 704x18
    88          text run at (0,0) width 704: "The two green blocks below should be identical and should each take up half the width of the browser window."
    9         RenderBlock (floating) {DIV} at (390,18) size 394x502 [bgcolor=#008000] [border: (1px solid #000000)]
     9        RenderBlock (floating) {DIV} at (383,18) size 386x502 [bgcolor=#008000] [border: (1px solid #000000)]
    1010        RenderText {#text} at (0,0) size 0x0
    11 layer at (8,26) size 394x502 clip at (9,27) size 392x500
    12   RenderBlock {DIV} at (0,18) size 394x502 [bgcolor=#008000] [border: (1px solid #000000)]
     11layer at (8,528) size 386x502 clip at (9,529) size 384x500
     12  RenderBlock {DIV} at (0,520) size 386x502 [bgcolor=#008000] [border: (1px solid #000000)]
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug106158-1-expected.checksum

    r38297 r47255  
    1 c8b22fdb435cc00102e3e207597cbeaa
     1c1a464e8b692d557d7a634cc3a8288ec
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug106158-1-expected.txt

    r30635 r47255  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTable {TABLE} at (0,0) size 450x78 [border: (1px solid #000000)]
    7         RenderTableSection {TBODY} at (1,1) size 448x76
    8           RenderTableRow {TR} at (0,2) size 448x72
    9             RenderTableCell {TD} at (2,2) size 444x72 [r=0 c=0 rs=1 cs=1]
     6      RenderTable {TABLE} at (0,0) size 450x104 [border: (1px solid #000000)]
     7        RenderTableSection {TBODY} at (1,1) size 448x102
     8          RenderTableRow {TR} at (0,2) size 448x98
     9            RenderTableCell {TD} at (2,2) size 444x98 [r=0 c=0 rs=1 cs=1]
    1010              RenderTable {TABLE} at (1,1) size 442x26 [border: (1px solid #FF0000)]
    1111                RenderTableSection {TBODY} at (1,1) size 440x24
     
    1414                      RenderText {#text} at (1,1) size 21x18
    1515                        text run at (1,1) width 21: "test"
    16               RenderTable {TABLE} at (1,1) size 437x70 [border: (1px solid #000000)]
     16              RenderTable {TABLE} at (1,27) size 437x70 [border: (1px solid #000000)]
    1717                RenderTableSection {TBODY} at (1,1) size 435x68
    1818                  RenderTableRow {TR} at (0,2) size 435x64
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug106158-2-expected.checksum

    r38297 r47255  
    1 d3d75fbf7f441f74156649b198a8a6e1
     160accaae9969e2afacc27bdb6f2f6308
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug106158-2-expected.txt

    r30635 r47255  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTable {TABLE} at (0,0) size 450x48
    7         RenderTableSection {TBODY} at (0,0) size 450x48
    8           RenderTableRow {TR} at (0,2) size 450x44
    9             RenderTableCell {TD} at (2,2) size 446x44 [r=0 c=0 rs=1 cs=1]
     6      RenderTable {TABLE} at (0,0) size 450x49
     7        RenderTableSection {TBODY} at (0,0) size 450x49
     8          RenderTableRow {TR} at (0,2) size 450x45
     9            RenderTableCell {TD} at (2,2) size 446x45 [r=0 c=0 rs=1 cs=1]
    1010              RenderBlock (anonymous) at (1,1) size 444x18
    1111                RenderTable {TABLE} at (0,0) size 444x19 [bgcolor=#FFFF00]
     
    1818                        RenderText {#text} at (0,0) size 0x0
    1919                RenderBR {BR} at (0,0) size 0x18
    20               RenderTable {TABLE} at (1,19) size 439x24 [bgcolor=#FF00FF]
     20              RenderTable {TABLE} at (1,20) size 439x24 [bgcolor=#FF00FF]
    2121                RenderTableSection {TBODY} at (0,0) size 439x24
    2222                  RenderTableRow {TR} at (0,2) size 439x20
  • trunk/WebCore/ChangeLog

    r47252 r47255  
     12009-08-13  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        misalignment because of float:left of <div> tag
     6        https://bugs.webkit.org/show_bug.cgi?id=15869
     7
     8        One section of http://edgar.sec.gov site draws to the right of the rest
     9        of the content
     10        <rdar://problem/7135951>
     11
     12        Tests: fast/block/float/avoidance-percent-width-compat.html
     13               fast/block/float/avoidance-percent-width-strict.html
     14
     15        * rendering/RenderBlock.cpp:
     16        (WebCore::RenderBlock::getClearDelta): Changed to apply the same float
     17            avoidance logic in strict mode and in compatibility mode, which
     18            matches Firefox and IE. Changed to compute and use the computed
     19            width of the child, instead of ignoring non-fixed widths.
     20
    1212009-08-13  Steve Block  <steveblock@google.com>
    222
  • trunk/WebCore/rendering/RenderBlock.cpp

    r47200 r47255  
    32823282    // FIXME: Note that the remaining space checks aren't quite accurate, since you should be able to clear only some floats (the minimum # needed
    32833283    // to fit) and not all (we should be using nextFloatBottomBelow and looping).
    3284     // Do not allow tables to wrap in quirks or even in almost strict mode
    3285     // (ebay on the PLT, finance.yahoo.com in the real world, versiontracker.com forces even almost strict mode not to work)
    32863284    int result = clearSet ? max(0, bottom - yPos) : 0;
    3287     if (!result && child->avoidsFloats() && child->style()->width().isFixed() &&
    3288         child->minPrefWidth() > lineWidth(yPos, false) && child->minPrefWidth() <= availableWidth() &&
    3289         document()->inStrictMode())   
    3290         result = max(0, floatBottom() - yPos);
     3285    if (!result && child->avoidsFloats()) {
     3286        int oldYPos = child->y();
     3287        int oldWidth = child->width();
     3288        child->setY(yPos);
     3289        child->calcWidth();
     3290        if (child->width() > lineWidth(yPos, false) && child->minPrefWidth() <= availableWidth())
     3291            result = max(0, floatBottom() - yPos);
     3292        child->setY(oldYPos);
     3293        child->setWidth(oldWidth);
     3294    }
    32913295    return result;
    32923296}
Note: See TracChangeset for help on using the changeset viewer.