Changeset 21099 in webkit


Ignore:
Timestamp:
Apr 25, 2007 2:46:21 PM (17 years ago)
Author:
hyatt
Message:

Fix for bug 13373, make sure to invalidate the pref widths for objects
with percentage padding.

Reviewed by beth

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): (WebCore::RenderBlock::layoutPositionedObjects):
  • rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r21097 r21099  
     12007-04-25  David Hyatt  <hyatt@apple.com>
     2
     3        Fix for bug 13373, make sure to invalidate the pref widths for objects
     4        with percentage padding.
     5
     6        Reviewed by beth
     7
     8        * rendering/RenderBlock.cpp:
     9        (WebCore::RenderBlock::layoutBlockChildren):
     10        (WebCore::RenderBlock::layoutPositionedObjects):
     11        * rendering/bidi.cpp:
     12        (WebCore::RenderBlock::layoutInlineChildren):
     13
    1142007-04-25  David Harrison  <harrison@apple.com>
    215
  • trunk/WebCore/rendering/RenderBlock.cpp

    r21093 r21099  
    11321132            child->setChildNeedsLayout(true, false);
    11331133
     1134        // If relayoutChildren is set and we have percentage padding, we also need to invalidate the child's pref widths.
     1135        if (relayoutChildren && (child->style()->paddingLeft().isPercent() || child->style()->paddingRight().isPercent()))
     1136            child->setPrefWidthsDirty(true, false);
     1137
    11341138        // Handle the four types of special elements first.  These include positioned content, floating content, compacts and
    11351139        // run-ins.  When we encounter these four types of objects, we don't actually lay them out as normal flow blocks.
     
    12501254            if (relayoutChildren || (r->hasStaticY() && r->parent() != this && r->parent()->isBlockFlow()))
    12511255                r->setChildNeedsLayout(true, false);
     1256               
     1257            // If relayoutChildren is set and we have percentage padding, we also need to invalidate the child's pref widths.
     1258            if (relayoutChildren && (r->style()->paddingLeft().isPercent() || r->style()->paddingRight().isPercent()))
     1259                r->setPrefWidthsDirty(true, false);
     1260                   
    12521261            r->layoutIfNeeded();
    12531262        }
  • trunk/WebCore/rendering/bidi.cpp

    r21061 r21099  
    16121612                if (relayoutChildren || o->style()->width().isPercent() || o->style()->height().isPercent())
    16131613                    o->setChildNeedsLayout(true, false);
     1614                   
     1615                // If relayoutChildren is set and we have percentage padding, we also need to invalidate the child's pref widths.
     1616                if (relayoutChildren && (o->style()->paddingLeft().isPercent() || o->style()->paddingRight().isPercent()))
     1617                    o->setPrefWidthsDirty(true, false);
     1618           
    16141619                if (o->isPositioned())
    16151620                    o->containingBlock()->insertPositionedObject(o);
Note: See TracChangeset for help on using the changeset viewer.