Skip to content
  • mitz@apple.com's avatar
    WebCore: · 89557c51
    mitz@apple.com authored
            Reviewed by Dave Hyatt.
    
            - fix https://bugs.webkit.org/show_bug.cgi?id=19717
              <rdar://problem/6026832> REGRESSION (r31876): menu items render horizontally at the Economist
    
            * rendering/RenderBlock.cpp:
            (WebCore::RenderBlock::layoutOnlyPositionedObjects): In the
            positioned movement only case, call
            tryLayoutDoingPositionedMovementOnly() and fall back on doing a full
            layout if that fails.
            (WebCore::RenderBlock::layoutPositionedObjects): Ditto.
            * rendering/RenderBox.h:
            (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly): Renamed
            layoutDoingPositionedMovementOnly to this, and made this function
            check if the width changed. If it did, return, leaving the object
            dirty. The caller can then call layout(). The width can change even
            in the "positioned movement only" case if the object is shrink-to-fit
            and the available width constraint is met. (This was the case in the
            bug).
            * rendering/RenderObject.h:
            (WebCore::RenderObject::tryLayoutDoingPositionedMovementOnly):
            Renamed layoutDoingPositionedMovementOnly() to this.
    
    LayoutTests:
    
            Reviewed by Dave Hyatt.
    
            - test for https://bugs.webkit.org/show_bug.cgi?id=19717
              <rdar://problem/6026832> REGRESSION (r31876): menu items render horizontally at the Economist
    
            * fast/block/positioning/move-with-auto-width.html: Added.
            * platform/mac/fast/block/positioning/move-with-auto-width-expected.checksum: Added.
            * platform/mac/fast/block/positioning/move-with-auto-width-expected.png: Added.
            * platform/mac/fast/block/positioning/move-with-auto-width-expected.txt: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    89557c51