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

    r156397 r156816  
    103103    for (RenderObject* renderer = start; renderer != ancestor; renderer = renderer->parent()) {
    104104        ASSERT(renderer);
    105         renderer->setNeedsLayout(true, MarkOnlyThis);
     105        renderer->setNeedsLayout(MarkOnlyThis);
    106106    }
    107107}
     
    145145    if (innerTextRenderer && innerTextRenderer->logicalHeight() > logicalHeightLimit) {
    146146        if (desiredLogicalHeight != innerTextRenderer->logicalHeight())
    147             setNeedsLayout(true, MarkOnlyThis);
     147            setNeedsLayout(MarkOnlyThis);
    148148
    149149        m_desiredInnerTextLogicalHeight = desiredLogicalHeight;
    150150
    151151        innerTextRenderer->style()->setLogicalHeight(Length(desiredLogicalHeight, Fixed));
    152         innerTextRenderer->setNeedsLayout(true, MarkOnlyThis);
     152        innerTextRenderer->setNeedsLayout(MarkOnlyThis);
    153153        if (innerBlockRenderer) {
    154154            innerBlockRenderer->style()->setLogicalHeight(Length(desiredLogicalHeight, Fixed));
    155             innerBlockRenderer->setNeedsLayout(true, MarkOnlyThis);
     155            innerBlockRenderer->setNeedsLayout(MarkOnlyThis);
    156156        }
    157157    }
     
    162162        if (containerLogicalHeight > logicalHeightLimit) {
    163163            containerRenderer->style()->setLogicalHeight(Length(logicalHeightLimit, Fixed));
    164             setNeedsLayout(true, MarkOnlyThis);
     164            setNeedsLayout(MarkOnlyThis);
    165165        } else if (containerRenderer->logicalHeight() < contentLogicalHeight()) {
    166166            containerRenderer->style()->setLogicalHeight(Length(contentLogicalHeight(), Fixed));
    167             setNeedsLayout(true, MarkOnlyThis);
     167            setNeedsLayout(MarkOnlyThis);
    168168        } else
    169169            containerRenderer->style()->setLogicalHeight(Length(containerLogicalHeight, Fixed));
     
    264264    RenderObject* innerTextRenderer = innerTextElement()->renderer();
    265265    if (innerTextRenderer && diff == StyleDifferenceLayout)
    266         innerTextRenderer->setNeedsLayout(true, MarkContainingBlockChain);
     266        innerTextRenderer->setNeedsLayout(MarkContainingBlockChain);
    267267    if (HTMLElement* placeholder = inputElement().placeholderElement())
    268268        placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldBeTruncated() ? CSSValueEllipsis : CSSValueClip);
Note: See TracChangeset for help on using the changeset viewer.