Changeset 97391 in webkit


Ignore:
Timestamp:
Oct 13, 2011 1:37:28 PM (13 years ago)
Author:
hyatt@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=70049

[CSS Regions] Add a test of a float being pushed down because it can't fit
next to another float and make sure it re-evaluates its position when it changes
regions as a result of the push.

Reviewed by Sam Weinig.

Source/WebCore:

Added new test in fast/regions.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computeLogicalLocationForFloat):

LayoutTests:

  • fast/regions/float-pushed-width-change.html: Added.
  • platform/mac/fast/regions/float-pushed-width-change-expected.png: Added.
  • platform/mac/fast/regions/float-pushed-width-change-expected.txt: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r97390 r97391  
     12011-10-13  David Hyatt  <hyatt@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=70049
     4       
     5        [CSS Regions] Add a test of a float being pushed down because it can't fit
     6        next to another float and make sure it re-evaluates its position when it changes
     7        regions as a result of the push.
     8
     9        Reviewed by Sam Weinig.
     10
     11        * fast/regions/float-pushed-width-change.html: Added.
     12        * platform/mac/fast/regions/float-pushed-width-change-expected.png: Added.
     13        * platform/mac/fast/regions/float-pushed-width-change-expected.txt: Added.
     14
    1152011-10-13  Robert Hogan  <robert@webkit.org>
    216
  • trunk/Source/WebCore/ChangeLog

    r97388 r97391  
     12011-10-13  David Hyatt  <hyatt@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=70049
     4       
     5        [CSS Regions] Add a test of a float being pushed down because it can't fit
     6        next to another float and make sure it re-evaluates its position when it changes
     7        regions as a result of the push.
     8
     9        Reviewed by Sam Weinig.
     10
     11        Added new test in fast/regions.
     12
     13        * rendering/RenderBlock.cpp:
     14        (WebCore::RenderBlock::computeLogicalLocationForFloat):
     15
    1162011-10-13  Adam Barth  <abarth@webkit.org>
    217
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r97289 r97391  
    33273327    LayoutUnit logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
    33283328    LayoutUnit logicalLeftOffset = logicalLeftOffsetForContent(logicalTopOffset); // Constant part of left offset.
    3329     LayoutUnit floatLogicalWidth = logicalWidthForFloat(floatingObject); // The width we look for.
    3330     if (logicalRightOffset - logicalLeftOffset < floatLogicalWidth)
    3331         floatLogicalWidth = logicalRightOffset - logicalLeftOffset; // Never look for more than what will be available.
    3332        
     3329    LayoutUnit floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset); // The width we look for.
     3330
    33333331    LayoutUnit floatLogicalLeft;
    33343332
     
    33403338            logicalTopOffset += min(heightRemainingLeft, heightRemainingRight);
    33413339            floatLogicalLeft = logicalLeftOffsetForLine(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
     3340            if (inRenderFlowThread()) {
     3341                // Have to re-evaluate all of our offsets, since they may have changed.
     3342                logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
     3343                logicalLeftOffset = logicalLeftOffsetForContent(logicalTopOffset); // Constant part of left offset.
     3344                floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
     3345            }
    33423346        }
    33433347        floatLogicalLeft = max<LayoutUnit>(logicalLeftOffset - borderAndPaddingLogicalLeft(), floatLogicalLeft);
     
    33493353            logicalTopOffset += min(heightRemainingLeft, heightRemainingRight);
    33503354            floatLogicalLeft = logicalRightOffsetForLine(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
     3355            if (inRenderFlowThread()) {
     3356                // Have to re-evaluate all of our offsets, since they may have changed.
     3357                logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
     3358                logicalLeftOffset = logicalLeftOffsetForContent(logicalTopOffset); // Constant part of left offset.
     3359                floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
     3360            }
    33513361        }
    33523362        floatLogicalLeft -= logicalWidthForFloat(floatingObject); // Use the original width of the float here, since the local variable
Note: See TracChangeset for help on using the changeset viewer.