Changeset 52127 in webkit


Ignore:
Timestamp:
Dec 14, 2009 7:05:50 PM (14 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/7460655> REGRESSION (r47255): Content shifted down at software.opensuse.org
https://bugs.webkit.org/show_bug.cgi?id=32382

Reviewed by Darin Adler.

WebCore:

Test: fast/block/float/in-margin.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::getClearDelta): Floats that do not intrude into the line (because
they are in the margin) do not need to be cleared.

LayoutTests:

  • fast/block/float/in-margin.html: Added.
  • platform/mac/fast/block/float/in-margin-expected.checksum: Added.
  • platform/mac/fast/block/float/in-margin-expected.png: Added.
  • platform/mac/fast/block/float/in-margin-expected.txt: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52126 r52127  
     12009-12-14  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        <rdar://problem/7460655> REGRESSION (r47255): Content shifted down at software.opensuse.org
     6        https://bugs.webkit.org/show_bug.cgi?id=32382
     7
     8        * fast/block/float/in-margin.html: Added.
     9        * platform/mac/fast/block/float/in-margin-expected.checksum: Added.
     10        * platform/mac/fast/block/float/in-margin-expected.png: Added.
     11        * platform/mac/fast/block/float/in-margin-expected.txt: Added.
     12
    1132009-12-14  Enrica Casucci  <enrica@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r52126 r52127  
     12009-12-14  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        <rdar://problem/7460655> REGRESSION (r47255): Content shifted down at software.opensuse.org
     6        https://bugs.webkit.org/show_bug.cgi?id=32382
     7
     8        Test: fast/block/float/in-margin.html
     9
     10        * rendering/RenderBlock.cpp:
     11        (WebCore::RenderBlock::getClearDelta): Floats that do not intrude into the line (because
     12        they are in the margin) do not need to be cleared.
     13
    1142009-12-14  Enrica Casucci  <enrica@apple.com>
    215
  • trunk/WebCore/rendering/RenderBlock.cpp

    r51883 r52127  
    31963196    int result = clearSet ? max(0, bottom - yPos) : 0;
    31973197    if (!result && child->avoidsFloats()) {
    3198         int oldYPos = child->y();
    3199         int oldWidth = child->width();
    3200         child->setY(yPos);
    3201         child->calcWidth();
    3202         if (child->width() > lineWidth(yPos, false) && child->minPrefWidth() <= availableWidth())
    3203             result = max(0, floatBottom() - yPos);
    3204         child->setY(oldYPos);
    3205         child->setWidth(oldWidth);
     3198        int widthAtCurrentHeight = lineWidth(yPos, false);
     3199        int availableWidth = this->availableWidth();
     3200        if (widthAtCurrentHeight < availableWidth) {
     3201            int oldYPos = child->y();
     3202            int oldWidth = child->width();
     3203            child->setY(yPos);
     3204            child->calcWidth();
     3205            if (child->width() > widthAtCurrentHeight && child->minPrefWidth() <= availableWidth)
     3206                result = max(0, floatBottom() - yPos);
     3207            child->setY(oldYPos);
     3208            child->setWidth(oldWidth);
     3209        }
    32063210    }
    32073211    return result;
Note: See TracChangeset for help on using the changeset viewer.