Changeset 91277 in webkit


Ignore:
Timestamp:
Jul 19, 2011 11:40:25 AM (13 years ago)
Author:
robert@webkit.org
Message:

REGRESSION: Incorrect layout at recline-online.com
https://bugs.webkit.org/show_bug.cgi?id=64030

Reviewed by David Hyatt.

Source/WebCore:

http://trac.webkit.org/changeset/68362 dropped the check for cases
where the render box is floating or inline. When the box is left or right
aligned it is considered to be floating and needs to its margins set appropriately.

Test: fast/table/align-right-within-left-aligned-div.html

created by Dominic Cooney <dominicc@chromium.org>

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeInlineDirectionMargins):

LayoutTests:

  • fast/table/align-right-within-left-aligned-div-expected.png: Added.
  • fast/table/align-right-within-left-aligned-div-expected.txt: Added.
  • fast/table/align-right-within-left-aligned-div.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r91270 r91277  
     12011-07-19  Robert Hogan  <robert@webkit.org>
     2
     3        REGRESSION: Incorrect layout at recline-online.com
     4        https://bugs.webkit.org/show_bug.cgi?id=64030
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/table/align-right-within-left-aligned-div-expected.png: Added.
     9        * fast/table/align-right-within-left-aligned-div-expected.txt: Added.
     10        * fast/table/align-right-within-left-aligned-div.html: Added.
     11
    1122011-07-19  Abhishek Arya  <inferno@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r91270 r91277  
     12011-07-19  Robert Hogan  <robert@webkit.org>
     2
     3        REGRESSION: Incorrect layout at recline-online.com
     4        https://bugs.webkit.org/show_bug.cgi?id=64030
     5
     6        Reviewed by David Hyatt.
     7
     8        http://trac.webkit.org/changeset/68362 dropped the check for cases
     9        where the render box is floating or inline. When the box is left or right
     10        aligned it is considered to be floating and needs to its margins set appropriately.
     11
     12        Test: fast/table/align-right-within-left-aligned-div.html
     13              created by Dominic Cooney <dominicc@chromium.org>
     14
     15        * rendering/RenderBox.cpp:
     16        (WebCore::RenderBox::computeInlineDirectionMargins):
     17
    1182011-07-19  Abhishek Arya  <inferno@chromium.org>
    219
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r91090 r91277  
    16061606
    16071607    // Margin calculations.
    1608     if (logicalWidthLength.isAuto() || hasPerpendicularContainingBlock || isFloating() || isInline()) {
     1608    if (logicalWidthLength.isAuto() || hasPerpendicularContainingBlock) {
    16091609        setMarginStart(style()->marginStart().calcMinValue(containerLogicalWidth));
    16101610        setMarginEnd(style()->marginEnd().calcMinValue(containerLogicalWidth));
     
    16921692    Length marginStartLength = style()->marginStartUsing(containingBlockStyle);
    16931693    Length marginEndLength = style()->marginEndUsing(containingBlockStyle);
    1694    
     1694
     1695    if (isFloating() || isInline()) {
     1696        // Inline blocks/tables and floats don't have their margins increased.
     1697        containingBlock->setMarginStartForChild(this, marginStartLength.calcMinValue(containerWidth));
     1698        containingBlock->setMarginEndForChild(this, marginEndLength.calcMinValue(containerWidth));
     1699        return;
     1700    }
     1701
    16951702    // Case One: The object is being centered in the containing block's available logical width.
    16961703    if ((marginStartLength.isAuto() && marginEndLength.isAuto() && childWidth < containerWidth)
Note: See TracChangeset for help on using the changeset viewer.