Changeset 128517 in webkit


Ignore:
Timestamp:
Sep 13, 2012 3:56:07 PM (12 years ago)
Author:
ojan@chromium.org
Message:

percentage heights in quirks mode with auto-sized body are computed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=96426

Reviewed by Tony Chang.

Source/WebCore:

In quirks mode, for the body element, we need to keep walking up to the html element
if the body's height is auto. Also, we need to subtract the body/html elements
margin/border/padding so that we properly get the body's content height.

This behavior matches IE9, FF and Opera.

None of this applies to standards mode since we don't walk up the
containingBlock chain for auto-sized elements.

Test: fast/css/percentage-height-auto-sized-body-quirks.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePercentageLogicalHeight):

LayoutTests:

  • fast/css/percentage-height-auto-sized-body-quirks-expected.txt: Added.
  • fast/css/percentage-height-auto-sized-body-quirks.html: Added.

Verified that this matches IE9, FF15 and Opera12.

  • fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt:
  • platform/chromium-linux/fast/table/height-percent-test-expected.png:
  • platform/chromium-linux/tables/mozilla/core/cell_heights-expected.png:
  • platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug19526-expected.png:
  • platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
  • platform/chromium-win/tables/mozilla/core/cell_heights-expected.txt:
  • platform/chromium-win/tables/mozilla_expected_failures/bugs/bug19526-expected.txt:
  • platform/chromium-win/tables/mozilla_expected_failures/bugs/bug85016-expected.txt:
  • platform/mac/fast/table/height-percent-test-expected.txt:

Verified that all the changes match FF15.

Location:
trunk
Files:
2 added
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r128516 r128517  
     12012-09-13  Ojan Vafai  <ojan@chromium.org>
     2
     3        percentage heights in quirks mode with auto-sized body are computed incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=96426
     5
     6        Reviewed by Tony Chang.
     7
     8        * fast/css/percentage-height-auto-sized-body-quirks-expected.txt: Added.
     9        * fast/css/percentage-height-auto-sized-body-quirks.html: Added.
     10        Verified that this matches IE9, FF15 and Opera12.
     11
     12        * fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt:
     13        * platform/chromium-linux/fast/table/height-percent-test-expected.png:
     14        * platform/chromium-linux/tables/mozilla/core/cell_heights-expected.png:
     15        * platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug19526-expected.png:
     16        * platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
     17        * platform/chromium-win/tables/mozilla/core/cell_heights-expected.txt:
     18        * platform/chromium-win/tables/mozilla_expected_failures/bugs/bug19526-expected.txt:
     19        * platform/chromium-win/tables/mozilla_expected_failures/bugs/bug85016-expected.txt:
     20        * platform/mac/fast/table/height-percent-test-expected.txt:
     21        Verified that all the changes match FF15.
     22
    1232012-09-13  Ojan Vafai  <ojan@chromium.org>
    224
  • trunk/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt

    r128375 r128517  
    2626    </div>
    2727</div>
    28 FAIL:
    29 Expected 584 for height, but got 1447.
    30 
    31 <div class="container" style="width: auto; height: auto; float: left;">
    32     <div class="item" style="width: 100%; height: 100%;" data-expected-height="584" data-expected-width="0"></div>
    33 </div>
     28PASS
    3429FAIL:
    3530Expected 584 for height, but got 600.
  • trunk/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html

    r128375 r128517  
    7272</div>
    7373
    74 <!-- FIXME: We incorrectly use the size of the body element for calculating the percentage height. https://bugs.webkit.org/show_bug.cgi?id=96426 -->
    7574<div class="container" style="width: auto; height: auto; float: left;">
    7675    <div class="item" style="width: 100%; height: 100%;" data-expected-height=584 data-expected-width=0></div>
  • trunk/LayoutTests/platform/chromium-win/tables/mozilla/core/cell_heights-expected.txt

    r56259 r128517  
    1 layer at (0,0) size 785x15840
     1layer at (0,0) size 785x4366
    22  RenderView at (0,0) size 785x600
    3 layer at (0,0) size 785x15840
    4   RenderBlock {HTML} at (0,0) size 785x15840
    5     RenderBody {BODY} at (8,8) size 769x15824
     3layer at (0,0) size 785x4366
     4  RenderBlock {HTML} at (0,0) size 785x4366
     5    RenderBody {BODY} at (8,8) size 769x4350
    66      RenderTable {TABLE} at (0,0) size 39x584 [bgcolor=#0000FF] [border: (1px outset #808080)]
    77        RenderTableSection {TBODY} at (1,1) size 37x582
     
    8989      RenderBlock (anonymous) at (0,1668) size 769x20
    9090        RenderBR {BR} at (0,0) size 0x19
    91       RenderTable {TABLE} at (0,1688) size 39x1688 [bgcolor=#FFA500] [border: (1px outset #808080)]
    92         RenderTableSection {TBODY} at (1,1) size 37x1686
    93           RenderTableRow {TR} at (0,2) size 37x335
    94             RenderTableCell {TD} at (2,157) size 33x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     91      RenderTable {TABLE} at (0,1688) size 39x584 [bgcolor=#FFA500] [border: (1px outset #808080)]
     92        RenderTableSection {TBODY} at (1,1) size 37x582
     93          RenderTableRow {TR} at (0,2) size 37x114
     94            RenderTableCell {TD} at (2,47) size 33x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    9595              RenderText {#text} at (2,2) size 29x19
    9696                text run at (2,2) width 29: "20%"
    97           RenderTableRow {TR} at (0,339) size 37x1345
    98             RenderTableCell {TD} at (2,999) size 33x24 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
     97          RenderTableRow {TR} at (0,118) size 37x462
     98            RenderTableCell {TD} at (2,337) size 33x24 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
    9999              RenderText {#text} at (2,2) size 29x19
    100100                text run at (2,2) width 29: "80%"
    101       RenderBlock (anonymous) at (0,3376) size 769x20
     101      RenderBlock (anonymous) at (0,2272) size 769x20
    102102        RenderBR {BR} at (0,0) size 0x19
    103       RenderTable {TABLE} at (0,3396) size 61x206 [bgcolor=#808080] [border: (1px outset #808080)]
     103      RenderTable {TABLE} at (0,2292) size 61x206 [bgcolor=#808080] [border: (1px outset #808080)]
    104104        RenderTableSection {TBODY} at (1,1) size 59x204
    105105          RenderTableRow {TR} at (0,2) size 59x200
     
    110110              RenderText {#text} at (2,2) size 24x19
    111111                text run at (2,2) width 24: "200"
    112       RenderBlock (anonymous) at (0,3602) size 769x20
     112      RenderBlock (anonymous) at (0,2498) size 769x20
    113113        RenderBR {BR} at (0,0) size 0x19
    114       RenderTable {TABLE} at (0,3622) size 61x198 [bgcolor=#FFA500] [border: (1px outset #808080)]
     114      RenderTable {TABLE} at (0,2518) size 61x198 [bgcolor=#FFA500] [border: (1px outset #808080)]
    115115        RenderTableSection {TBODY} at (1,1) size 59x196
    116116          RenderTableRow {TR} at (0,2) size 59x192
     
    121121              RenderText {#text} at (2,2) size 16x19
    122122                text run at (2,2) width 16: "20"
    123       RenderBlock (anonymous) at (0,3820) size 769x20
     123      RenderBlock (anonymous) at (0,2716) size 769x20
    124124        RenderBR {BR} at (0,0) size 0x19
    125       RenderTable {TABLE} at (0,3840) size 39x3839 [border: (1px outset #808080)]
    126         RenderTableSection {TBODY} at (1,1) size 37x3837
    127           RenderTableRow {TR} at (0,2) size 37x537
    128             RenderTableCell {TD} at (2,258) size 33x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     125      RenderTable {TABLE} at (0,2736) size 39x584 [border: (1px outset #808080)]
     126        RenderTableSection {TBODY} at (1,1) size 37x582
     127          RenderTableRow {TR} at (0,2) size 37x500
     128            RenderTableCell {TD} at (2,240) size 33x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    129129              RenderText {#text} at (2,2) size 24x19
    130130                text run at (2,2) width 24: "500"
    131           RenderTableRow {TR} at (0,541) size 37x3294
    132             RenderTableCell {TD} at (2,2176) size 33x24 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
     131          RenderTableRow {TR} at (0,504) size 37x76
     132            RenderTableCell {TD} at (2,530) size 33x24 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
    133133              RenderText {#text} at (2,2) size 29x19
    134134                text run at (2,2) width 29: "80%"
    135       RenderBlock (anonymous) at (0,7679) size 769x20
     135      RenderBlock (anonymous) at (0,3320) size 769x20
    136136        RenderBR {BR} at (0,0) size 0x19
    137       RenderTable {TABLE} at (0,7699) size 100x7699 [bgcolor=#FF0000] [border: (1px outset #808080)]
    138         RenderTableSection {TBODY} at (1,1) size 98x7697
    139           RenderTableRow {TR} at (0,2) size 98x2413
    140             RenderTableCell {TD} at (2,2629) size 30x24 [border: (1px inset #808080)] [r=0 c=0 rs=2 cs=1]
     137      RenderTable {TABLE} at (0,3340) size 100x584 [bgcolor=#FF0000] [border: (1px outset #808080)]
     138        RenderTableSection {TBODY} at (1,1) size 98x582
     139          RenderTableRow {TR} at (0,2) size 98x41
     140            RenderTableCell {TD} at (2,257) size 30x24 [border: (1px inset #808080)] [r=0 c=0 rs=2 cs=1]
    141141              RenderText {#text} at (2,2) size 24x19
    142142                text run at (2,2) width 24: "500"
    143             RenderTableCell {TD} at (34,1196) size 30x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     143            RenderTableCell {TD} at (34,10) size 30x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    144144              RenderText {#text} at (2,2) size 26x19
    145145                text run at (2,2) width 26: "auto"
    146           RenderTableRow {TR} at (0,2417) size 98x2863
    147             RenderTableCell {TD} at (34,3836) size 30x24 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
     146          RenderTableRow {TR} at (0,45) size 98x491
     147            RenderTableCell {TD} at (34,278) size 30x24 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
    148148              RenderText {#text} at (2,2) size 26x19
    149149                text run at (2,2) width 26: "auto"
    150             RenderTableCell {TD} at (66,3836) size 30x24 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
     150            RenderTableCell {TD} at (66,278) size 30x24 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
    151151              RenderText {#text} at (2,2) size 26x19
    152152                text run at (2,2) width 26: "auto"
    153           RenderTableRow {TR} at (0,5282) size 98x2413
    154             RenderTableCell {TD} at (2,6476) size 30x24 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
     153          RenderTableRow {TR} at (0,538) size 98x42
     154            RenderTableCell {TD} at (2,547) size 30x24 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
    155155              RenderText {#text} at (2,2) size 26x19
    156156                text run at (2,2) width 26: "auto"
    157             RenderTableCell {TD} at (34,6476) size 30x24 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=1]
     157            RenderTableCell {TD} at (34,547) size 30x24 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=1]
    158158              RenderText {#text} at (2,2) size 26x19
    159159                text run at (2,2) width 26: "auto"
    160       RenderBlock (anonymous) at (0,15398) size 769x20
     160      RenderBlock (anonymous) at (0,3924) size 769x20
    161161        RenderBR {BR} at (0,0) size 0x19
    162       RenderTable {TABLE} at (0,15418) size 53x406 [bgcolor=#FFA500] [border: (1px outset #808080)]
     162      RenderTable {TABLE} at (0,3944) size 53x406 [bgcolor=#FFA500] [border: (1px outset #808080)]
    163163        RenderTableSection {TBODY} at (1,1) size 51x404
    164164          RenderTableRow {TR} at (0,2) size 51x400
  • trunk/LayoutTests/platform/chromium-win/tables/mozilla_expected_failures/bugs/bug19526-expected.txt

    r56259 r128517  
    1 layer at (0,0) size 785x1344
     1layer at (0,0) size 785x1272
    22  RenderView at (0,0) size 785x600
    3 layer at (0,0) size 785x1344
    4   RenderBlock {HTML} at (0,0) size 785x1344
    5     RenderBody {BODY} at (8,8) size 769x1328
     3layer at (0,0) size 785x1272
     4  RenderBlock {HTML} at (0,0) size 785x1272
     5    RenderBody {BODY} at (8,8) size 769x1256
    66      RenderBlock {P} at (0,0) size 769x20
    77        RenderText {#text} at (0,0) size 335x19
     
    2626        RenderText {#text} at (0,0) size 327x19
    2727          text run at (0,0) width 327: "50 percent height table inside 100 percent height table:"
    28       RenderTable {TABLE} at (0,672) size 769x656 [bgcolor=#808080] [border: (1px outset #808080)]
    29         RenderTableSection {TBODY} at (1,1) size 767x654
    30           RenderTableRow {TR} at (0,2) size 767x650
    31             RenderTableCell {TD} at (2,163) size 381x327 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    32               RenderTable {TABLE} at (2,2) size 377x323 [bgcolor=#FFFF00] [border: (1px outset #808080)]
    33                 RenderTableSection {TBODY} at (1,1) size 375x321
    34                   RenderTableRow {TR} at (0,2) size 375x317
    35                     RenderTableCell {TD} at (2,148) size 185x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     28      RenderTable {TABLE} at (0,672) size 769x584 [bgcolor=#808080] [border: (1px outset #808080)]
     29        RenderTableSection {TBODY} at (1,1) size 767x582
     30          RenderTableRow {TR} at (0,2) size 767x578
     31            RenderTableCell {TD} at (2,145) size 381x291 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     32              RenderTable {TABLE} at (2,2) size 377x287 [bgcolor=#FFFF00] [border: (1px outset #808080)]
     33                RenderTableSection {TBODY} at (1,1) size 375x285
     34                  RenderTableRow {TR} at (0,2) size 375x281
     35                    RenderTableCell {TD} at (2,130) size 185x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    3636                      RenderText {#text} at (2,2) size 126x19
    3737                        text run at (2,2) width 126: " Inner Table (yellow)"
    38                     RenderTableCell {TD} at (189,148) size 184x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     38                    RenderTableCell {TD} at (189,130) size 184x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    3939                      RenderText {#text} at (2,2) size 4x19
    4040                        text run at (2,2) width 4: " "
    41             RenderTableCell {TD} at (385,315) size 380x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     41            RenderTableCell {TD} at (385,279) size 380x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    4242              RenderText {#text} at (2,2) size 117x19
    4343                text run at (2,2) width 117: " Outer Table (grey)"
  • trunk/LayoutTests/platform/chromium-win/tables/mozilla_expected_failures/bugs/bug85016-expected.txt

    r112904 r128517  
    1 layer at (0,0) size 960x2988
     1layer at (0,0) size 960x2063
    22  RenderView at (0,0) size 785x585
    3 layer at (0,0) size 785x2988
    4   RenderBlock {HTML} at (0,0) size 785x2988
    5     RenderBody {BODY} at (32,32) size 721x2924
     3layer at (0,0) size 785x2063
     4  RenderBlock {HTML} at (0,0) size 785x2063
     5    RenderBody {BODY} at (32,32) size 721x1999
    66      RenderBlock {DIV} at (32,0) size 657x653 [border: (1px solid #008000)]
    77        RenderBlock {DIV} at (33,33) size 591x587 [border: (1px solid #FF0000)]
     
    1818        RenderText {#text} at (0,0) size 443x19
    1919          text run at (0,0) width 443: "percentage height image in table cell (red), in a DIV with no height (green)"
    20       RenderBlock {DIV} at (32,1478) size 657x1446
    21         RenderTable {TABLE} at (0,0) size 260x1446 [border: (1px solid #FF0000)]
    22           RenderTableSection {TBODY} at (1,1) size 258x1444
    23             RenderTableRow {TR} at (0,2) size 258x1440
    24               RenderTableCell {TD} at (2,635) size 254x174 [border: (1px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
     20      RenderBlock {DIV} at (32,1478) size 657x521
     21        RenderTable {TABLE} at (0,0) size 260x521 [border: (1px solid #FF0000)]
     22          RenderTableSection {TBODY} at (1,1) size 258x519
     23            RenderTableRow {TR} at (0,2) size 258x515
     24              RenderTableCell {TD} at (2,172) size 254x174 [border: (1px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
    2525                RenderImage {IMG} at (2,2) size 250x170
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r128515 r128517  
    36273627BUGWK96524 WIN LINUX DEBUG : fast/filesystem/workers/detached-frame-crash.html = PASS CRASH
    36283628
     3629BUG_OJAN WIN MAC : fast/table/height-percent-test.html = TEXT IMAGE+TEXT IMAGE
     3630BUG_OJAN WIN MAC : tables/mozilla/core/cell_heights.html = TEXT IMAGE+TEXT IMAGE
     3631BUG_OJAN WIN MAC : tables/mozilla_expected_failures/bugs/bug19526.html = TEXT IMAGE+TEXT IMAGE
     3632BUG_OJAN WIN MAC : tables/mozilla_expected_failures/bugs/bug85016.html = TEXT IMAGE+TEXT IMAGE
     3633
    36293634BUGWK96549 MAC : platform/chromium/virtual/gpu/fast/hidpi/focus-rings.html = IMAGE
    36303635BUGWK96549 MAC : platform/chromium/virtual/gpu/fast/hidpi/video-controls-in-hidpi.html = IMAGE
  • trunk/LayoutTests/platform/efl/TestExpectations

    r128454 r128517  
    10481048BUGWK88238 SKIP : editing/pasteboard/paste-global-selection.html = TEXT
    10491049
     1050BUG_OJAN : fast/table/height-percent-test.html = TEXT IMAGE+TEXT IMAGE
     1051BUG_OJAN : tables/mozilla/core/cell_heights.html = TEXT IMAGE+TEXT IMAGE
     1052BUG_OJAN : tables/mozilla_expected_failures/bugs/bug19526.html = TEXT IMAGE+TEXT IMAGE
     1053
    10501054// Fails after r128270.
    10511055BUGWK96517 : fast/events/popup-blocking-timers.html = TEXT
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r128452 r128517  
    13751375BUGWK96594 : fast/table/bad-replaced-sizing-preferred-logical-widths.html = TEXT
    13761376
     1377BUG_OJAN : fast/table/height-percent-test.html = TEXT IMAGE+TEXT IMAGE
     1378BUG_OJAN : tables/mozilla/core/cell_heights.html = TEXT IMAGE+TEXT IMAGE
     1379BUG_OJAN : tables/mozilla_expected_failures/bugs/bug19526.html = TEXT IMAGE+TEXT IMAGE
     1380BUG_OJAN : tables/mozilla_expected_failures/bugs/bug85016.html = TEXT IMAGE+TEXT IMAGE
     1381
    13771382BUGWK73003 DEBUG : editing/spelling/spellcheck-async.html = TEXT
    13781383BUGWK73003 DEBUG : editing/spelling/spellcheck-paste.html = PASS
  • trunk/LayoutTests/platform/mac/TestExpectations

    r128412 r128517  
    356356BUGWK96583 : fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html = TEXT
    357357
     358BUG_OJAN : fast/table/height-percent-test.html = TEXT IMAGE+TEXT IMAGE
     359BUG_OJAN : tables/mozilla/core/cell_heights.html = TEXT IMAGE+TEXT IMAGE
     360BUG_OJAN : tables/mozilla_expected_failures/bugs/bug19526.html = TEXT IMAGE+TEXT IMAGE
     361
    358362// New test added in r128389
    359363BUGWK96594 : fast/table/bad-replaced-sizing-preferred-logical-widths.html = TEXT
  • trunk/LayoutTests/platform/mac/fast/table/height-percent-test-expected.txt

    r25970 r128517  
    1 layer at (0,0) size 785x1374
     1layer at (0,0) size 785x1304
    22  RenderView at (0,0) size 785x600
    3 layer at (0,0) size 785x1374
    4   RenderBlock {HTML} at (0,0) size 785x1374
    5     RenderBody {BODY} at (8,16) size 769x1342
     3layer at (0,0) size 785x1304
     4  RenderBlock {HTML} at (0,0) size 785x1304
     5    RenderBody {BODY} at (8,16) size 769x1272
    66      RenderBlock {DIV} at (16,0) size 737x26 [border: (1px solid #000000)]
    77        RenderBlock (floating) {DIV} at (1,1) size 100x24
     
    1414                RenderTableCell {TD} at (0,1) size 96x22 [r=0 c=0 rs=1 cs=1]
    1515                  RenderImage {IMG} at (0,0) size 96x22 [bgcolor=#008000]
    16       RenderBlock {DIV} at (16,84) size 737x578 [border: (1px solid #000000)]
    17         RenderBlock {DIV} at (1,1) size 735x576
    18           RenderBlock {DIV} at (0,0) size 100x576 [bgcolor=#008000]
    19       RenderBlock {DIV} at (16,678) size 737x664 [border: (1px solid #000000)]
    20         RenderBlock {DIV} at (1,1) size 735x662
    21           RenderTable {TABLE} at (0,0) size 96x662 [bgcolor=#FF0000]
    22             RenderTableSection {TBODY} at (0,0) size 96x662
    23               RenderTableRow {TR} at (0,0) size 96x662
    24                 RenderTableCell {TD} at (0,320) size 96x22 [r=0 c=0 rs=1 cs=1]
     16      RenderBlock {DIV} at (16,84) size 737x586 [border: (1px solid #000000)]
     17        RenderBlock {DIV} at (1,1) size 735x584
     18          RenderBlock {DIV} at (0,0) size 100x584 [bgcolor=#008000]
     19      RenderBlock {DIV} at (16,686) size 737x586 [border: (1px solid #000000)]
     20        RenderBlock {DIV} at (1,1) size 735x584
     21          RenderTable {TABLE} at (0,0) size 96x584 [bgcolor=#FF0000]
     22            RenderTableSection {TBODY} at (0,0) size 96x584
     23              RenderTableRow {TR} at (0,0) size 96x584
     24                RenderTableCell {TD} at (0,281) size 96x22 [r=0 c=0 rs=1 cs=1]
    2525                  RenderImage {IMG} at (0,0) size 96x22 [bgcolor=#008000]
  • trunk/LayoutTests/platform/qt/TestExpectations

    r128129 r128517  
    134134BUGWK94004 : css2.1/20110323/c541-word-sp-000.htm = IMAGE
    135135
     136BUG_OJAN : fast/table/height-percent-test.html = TEXT IMAGE+TEXT IMAGE
     137BUG_OJAN : tables/mozilla/core/cell_heights.html = TEXT IMAGE+TEXT IMAGE
     138BUG_OJAN : tables/mozilla_expected_failures/bugs/bug19526.html = TEXT IMAGE+TEXT IMAGE
     139BUG_OJAN : tables/mozilla_expected_failures/bugs/bug85016.html = TEXT IMAGE+TEXT IMAGE
     140
    136141// Added by bug 89826
    137142BUGWK94005 : css2.1/20110323/word-spacing-remove-space-003.htm = IMAGE
  • trunk/Source/WebCore/ChangeLog

    r128514 r128517  
     12012-09-13  Ojan Vafai  <ojan@chromium.org>
     2
     3        percentage heights in quirks mode with auto-sized body are computed incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=96426
     5
     6        Reviewed by Tony Chang.
     7
     8        In quirks mode, for the body element, we need to keep walking up to the html element
     9        if the body's height is auto. Also, we need to subtract the body/html elements
     10        margin/border/padding so that we properly get the body's content height.
     11
     12        This behavior matches IE9, FF and Opera.
     13
     14        None of this applies to standards mode since we don't walk up the
     15        containingBlock chain for auto-sized elements.
     16
     17        Test: fast/css/percentage-height-auto-sized-body-quirks.html
     18
     19        * rendering/RenderBox.cpp:
     20        (WebCore::RenderBox::computePercentageLogicalHeight):
     21
    1222012-09-13  Adrienne Walker  <enne@google.com>
    223
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r128478 r128517  
    21312131    bool skippedAutoHeightContainingBlock = false;
    21322132    RenderBlock* cb = containingBlock();
    2133     while (!cb->isRenderView() && !cb->isBody() && !cb->isTableCell() && !cb->isOutOfFlowPositioned() && cb->style()->logicalHeight().isAuto() && isHorizontalWritingMode() == cb->isHorizontalWritingMode()) {
     2133    LayoutUnit rootMarginBorderPaddingHeight = 0;
     2134    while (!cb->isRenderView() && !cb->isTableCell() && !cb->isOutOfFlowPositioned() && cb->style()->logicalHeight().isAuto() && isHorizontalWritingMode() == cb->isHorizontalWritingMode()) {
    21342135        if (!document()->inQuirksMode() && !cb->isAnonymousBlock())
    21352136            break;
     2137        if (cb->isBody() || cb->isRoot())
     2138            rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfter() + cb->borderAndPaddingLogicalHeight();
    21362139        skippedAutoHeightContainingBlock = true;
    21372140        cb = cb->containingBlock();
     
    21832186            availableHeight = max<LayoutUnit>(0, contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight());
    21842187        }
    2185     } else if (cb->isRenderView() || (cb->isBody() && document()->inQuirksMode()) || isOutOfFlowPositionedWithSpecifiedHeight) {
     2188    } else if (cb->isRenderView() || isOutOfFlowPositionedWithSpecifiedHeight) {
    21862189        // Don't allow this to affect the block' height() member variable, since this
    21872190        // can get called while the block is still laying out its kids.
     
    21942197    if (availableHeight == -1)
    21952198        return availableHeight;
     2199
     2200    availableHeight -= rootMarginBorderPaddingHeight;
    21962201
    21972202    LayoutUnit result = valueForLength(height, availableHeight);
Note: See TracChangeset for help on using the changeset viewer.