Ignore:
Timestamp:
Oct 2, 2013, 7:26:52 PM (12 years ago)
Author:
Antti Koivisto
Message:

Move setting of some layout bits to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122256

Reviewed by Andreas Kling.

These bits never apply to RenderText nodes:

normalChildNeedsLayout
posChildNeedsLayout
needsSimplifiedNormalFlowLayout
normalChildNeedsLayout
positionedMovementLayout

The code for setting them can be moved to RenderElement.

Also separated the code paths for setting and clearing the bits and uninlined
everything that is not massively popular.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

    r156738 r156816  
    352352    repainter.repaintAfterLayout();
    353353
    354     setNeedsLayout(false);
     354    clearNeedsLayout();
    355355}
    356356
     
    365365            child->clearOverrideSize();
    366366            if (!relayoutChildren)
    367                 child->setChildNeedsLayout(true, MarkOnlyThis);
     367                child->setChildNeedsLayout(MarkOnlyThis);
    368368            haveFlex = true;
    369369            unsigned int flexGroup = child->style()->boxFlexGroup();
     
    426426        for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
    427427            if (relayoutChildren)
    428                 child->setChildNeedsLayout(true, MarkOnlyThis);
     428                child->setChildNeedsLayout(MarkOnlyThis);
    429429
    430430            if (child->isOutOfFlowPositioned())
     
    490490                    childLayer->setStaticBlockPosition(yPos);
    491491                    if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode()))
    492                         child->setChildNeedsLayout(true, MarkOnlyThis);
     492                        child->setChildNeedsLayout(MarkOnlyThis);
    493493                }
    494494                continue;
     
    510510            child->updateLogicalHeight();
    511511            if (oldChildHeight != child->height())
    512                 child->setChildNeedsLayout(true, MarkOnlyThis);
     512                child->setChildNeedsLayout(MarkOnlyThis);
    513513
    514514            if (!child->needsLayout())
     
    728728            // Make sure we relayout children if we need it.
    729729            if (!haveLineClamp && relayoutChildren)
    730                 child->setChildNeedsLayout(true, MarkOnlyThis);
     730                child->setChildNeedsLayout(MarkOnlyThis);
    731731
    732732            if (child->isOutOfFlowPositioned()) {
     
    737737                    childLayer->setStaticBlockPosition(height());
    738738                    if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode()))
    739                         child->setChildNeedsLayout(true, MarkOnlyThis);
     739                        child->setChildNeedsLayout(MarkOnlyThis);
    740740                }
    741741                continue;
     
    956956        if (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent()))
    957957            || (child->style()->height().isAuto() && child->isRenderBlock())) {
    958             child->setChildNeedsLayout(true, MarkOnlyThis);
     958            child->setChildNeedsLayout(MarkOnlyThis);
    959959
    960960            // Dirty all the positioned objects.
     
    989989            continue;
    990990
    991         child->setChildNeedsLayout(true, MarkOnlyThis);
     991        child->setChildNeedsLayout(MarkOnlyThis);
    992992        child->setOverrideLogicalContentHeight(newHeight - child->borderAndPaddingHeight());
    993993        child->layoutIfNeeded();
     
    10561056        if ((child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent()))
    10571057            || (child->style()->height().isAuto() && child->isRenderBlock())) {
    1058             child->setChildNeedsLayout(true);
     1058            child->setChildNeedsLayout();
    10591059
    10601060            if (child->isRenderBlock()) {
Note: See TracChangeset for help on using the changeset viewer.