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/RenderFlexibleBox.cpp

    r156738 r156816  
    317317            EAlignItems previousAlignment = resolveAlignment(oldStyle, child->style());
    318318            if (previousAlignment == AlignStretch && previousAlignment != resolveAlignment(style(), child->style()))
    319                 child->setChildNeedsLayout(true, MarkOnlyThis);
     319                child->setChildNeedsLayout(MarkOnlyThis);
    320320        }
    321321    }
     
    386386    repainter.repaintAfterLayout();
    387387
    388     setNeedsLayout(false);
     388    clearNeedsLayout();
    389389}
    390390
     
    752752        if (hasOrthogonalFlow(child)) {
    753753            if (hasOverrideSize)
    754                 child->setChildNeedsLayout(true, MarkOnlyThis);
     754                child->setChildNeedsLayout(MarkOnlyThis);
    755755            child->layoutIfNeeded();
    756756        }
     
    10981098        childLayer->setStaticBlockPosition(staticBlockPosition);
    10991099        if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode()))
    1100             child->setChildNeedsLayout(true, MarkOnlyThis);
     1100            child->setChildNeedsLayout(MarkOnlyThis);
    11011101    }
    11021102}
     
    11721172        // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905.
    11731173        if (needToStretchChild(child) || childPreferredSize != mainAxisExtentForChild(child))
    1174             child->setChildNeedsLayout(true, MarkOnlyThis);
     1174            child->setChildNeedsLayout(MarkOnlyThis);
    11751175        else {
    11761176            // To avoid double applying margin changes in updateAutoMarginsInCrossAxis, we reset the margins here.
     
    14061406                child->setOverrideLogicalContentHeight(desiredLogicalHeight - child->borderAndPaddingLogicalHeight());
    14071407                child->setLogicalHeight(0);
    1408                 child->setChildNeedsLayout(true, MarkOnlyThis);
     1408                child->setChildNeedsLayout(MarkOnlyThis);
    14091409                child->layout();
    14101410            }
     
    14181418            if (childWidth != child->logicalWidth()) {
    14191419                child->setOverrideLogicalContentWidth(childWidth - child->borderAndPaddingLogicalWidth());
    1420                 child->setChildNeedsLayout(true, MarkOnlyThis);
     1420                child->setChildNeedsLayout(MarkOnlyThis);
    14211421                child->layout();
    14221422            }
Note: See TracChangeset for help on using the changeset viewer.