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

    r156738 r156816  
    327327                    cell->clearIntrinsicPadding();
    328328                    cell->clearOverrideSize();
    329                     cell->setChildNeedsLayout(true, MarkOnlyThis);
     329                    cell->setChildNeedsLayout(MarkOnlyThis);
    330330                    cell->layoutIfNeeded();
    331331                }
     
    407407
    408408    statePusher.pop();
    409     setNeedsLayout(false);
     409    clearNeedsLayout();
    410410}
    411411
     
    567567                    // Tables with no sections do not flex.
    568568                    if (!o->isTable() || toRenderTable(o)->hasSections()) {
    569                         o->setNeedsLayout(true, MarkOnlyThis);
     569                        o->setNeedsLayout(MarkOnlyThis);
    570570                        cellChildrenFlex = true;
    571571                    }
     
    583583                        if (box->normalChildNeedsLayout())
    584584                            break;
    585                         box->setChildNeedsLayout(true, MarkOnlyThis);
     585                        box->setChildNeedsLayout(MarkOnlyThis);
    586586                        box = box->containingBlock();
    587587                        ASSERT(box);
     
    594594
    595595            if (cellChildrenFlex) {
    596                 cell->setChildNeedsLayout(true, MarkOnlyThis);
     596                cell->setChildNeedsLayout(MarkOnlyThis);
    597597                // Alignment within a cell is based off the calculated
    598598                // height, which becomes irrelevant once the cell has
     
    616616
    617617            if (!cell->needsLayout() && view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
    618                 cell->setChildNeedsLayout(true, MarkOnlyThis);
     618                cell->setChildNeedsLayout(MarkOnlyThis);
    619619
    620620            cell->layoutIfNeeded();
     
    12391239
    12401240    m_grid.shrinkToFit();
    1241     setNeedsLayout(true);
     1241    setNeedsLayout();
    12421242}
    12431243
Note: See TracChangeset for help on using the changeset viewer.