Changeset 147021 in webkit


Ignore:
Timestamp:
Mar 27, 2013 4:59:52 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION(r143102): iframe with percentage height within table with anonymous cell fails.
https://bugs.webkit.org/show_bug.cgi?id=113077

Source/WebCore:

Patch by Zalan Bujtas <Alan Bujtas> on 2013-03-27
Reviewed by Antti Koivisto.

http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level
"Anonymous block boxes are ignored when resolving percentage values that would refer to it:
the closest non-anonymous ancestor box is used instead."
When figuring out whether auto height needs to be applied on the current box, ignore anonymous
ancestors until the first non-anonymous containing block is found. This matches both
Firefox and Opera behaviour.

Test: fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): Switch from
isAnonymousBlock() to isAnonymous() to make sure all anonymous boxes are ignored.
Remove isTableCell() check which is a noop as table cell isn't an anonymous block.

LayoutTests:

Patch by Zalan Bujtas <Alan Bujtas> on 2013-03-27
Reviewed by Antti Koivisto.

  • fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell-expected.txt: Added.
  • fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147020 r147021  
     12013-03-27  Zalan Bujtas  <zalan@apple.com>
     2
     3        REGRESSION(r143102): iframe with percentage height within table with anonymous cell fails.
     4        https://bugs.webkit.org/show_bug.cgi?id=113077
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell-expected.txt: Added.
     9        * fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell.html: Added.
     10
    1112013-03-27  Pierre Rossi  <pierre.rossi@gmail.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r147020 r147021  
     12013-03-27  Zalan Bujtas  <zalan@apple.com>
     2
     3        REGRESSION(r143102): iframe with percentage height within table with anonymous cell fails.
     4        https://bugs.webkit.org/show_bug.cgi?id=113077
     5
     6        Reviewed by Antti Koivisto.
     7       
     8        http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level
     9        "Anonymous block boxes are ignored when resolving percentage values that would refer to it:
     10        the closest non-anonymous ancestor box is used instead."
     11        When figuring out whether auto height needs to be applied on the current box, ignore anonymous
     12        ancestors until the first non-anonymous containing block is found. This matches both
     13        Firefox and Opera behaviour.
     14       
     15        Test: fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell.html
     16
     17        * rendering/RenderBoxModelObject.cpp:
     18        (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): Switch from
     19        isAnonymousBlock() to isAnonymous() to make sure all anonymous boxes are ignored.
     20        Remove isTableCell() check which is a noop as table cell isn't an anonymous block.
     21       
    1222013-03-27  Pierre Rossi  <pierre.rossi@gmail.com>
    223
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r145913 r147021  
    381381        return false;
    382382
     383    // Anonymous block boxes are ignored when resolving percentage values that would refer to it:
     384    // the closest non-anonymous ancestor box is used instead.
    383385    RenderBlock* cb = containingBlock();
    384     while (cb->isAnonymousBlock()) {
    385         if (cb->isTableCell())
    386             return true;
     386    while (cb->isAnonymous())
    387387        cb = cb->containingBlock();
    388     }
    389388
    390389    if (!cb->style()->logicalHeight().isAuto() || (!cb->style()->logicalTop().isAuto() && !cb->style()->logicalBottom().isAuto()))
Note: See TracChangeset for help on using the changeset viewer.