Changeset 156816 in webkit


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.

Location:
trunk/Source/WebCore
Files:
69 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r156815 r156816  
     12013-10-02  Antti Koivisto  <antti@apple.com>
     2
     3        Move setting of some layout bits to RenderElement
     4        https://bugs.webkit.org/show_bug.cgi?id=122256
     5
     6        Reviewed by Andreas Kling.
     7       
     8        These bits never apply to RenderText nodes:
     9       
     10        normalChildNeedsLayout
     11        posChildNeedsLayout
     12        needsSimplifiedNormalFlowLayout
     13        normalChildNeedsLayout
     14        positionedMovementLayout
     15
     16        The code for setting them can be moved to RenderElement.
     17
     18        Also separated the code paths for setting and clearing the bits and uninlined
     19        everything that is not massively popular.
     20
    1212013-10-02  Andreas Kling  <akling@apple.com>
    222
  • trunk/Source/WebCore/html/HTMLFrameSetElement.cpp

    r156231 r156816  
    204204{
    205205    if (needsStyleRecalc() && renderer()) {
    206         renderer()->setNeedsLayout(true);
     206        renderer()->setNeedsLayout();
    207207        clearNeedsStyleRecalc();
    208208    }
  • trunk/Source/WebCore/html/RangeInputType.cpp

    r156339 r156816  
    345345    HTMLElement* sliderTrackElement = sliderTrackElementOf(element());
    346346    if (sliderTrackElement->renderer())
    347         sliderTrackElement->renderer()->setNeedsLayout(true);
     347        sliderTrackElement->renderer()->setNeedsLayout();
    348348}
    349349
  • trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp

    r156761 r156816  
    180180    // FIXME: Make a custom Render class for the track and move the thumb positioning code there.
    181181    if (track)
    182         track->setChildNeedsLayout(true, MarkOnlyThis);
     182        track->setChildNeedsLayout(MarkOnlyThis);
    183183
    184184    RenderFlexibleBox::layout();
     
    218218    // renderer directly to trigger layout.
    219219    if (renderer())
    220         renderer()->setNeedsLayout(true);
     220        renderer()->setNeedsLayout();
    221221}
    222222
     
    315315    input->setValueFromRenderer(valueString);
    316316    if (renderer())
    317         renderer()->setNeedsLayout(true);
     317        renderer()->setNeedsLayout();
    318318    input->dispatchFormControlChangeEvent();
    319319}
     
    336336    m_inDragMode = false;
    337337    if (renderer())
    338         renderer()->setNeedsLayout(true);
     338        renderer()->setNeedsLayout();
    339339}
    340340
  • trunk/Source/WebCore/page/FrameView.cpp

    r156793 r156816  
    920920
    921921    if (RenderView* renderView = this->renderView())
    922         renderView->setNeedsLayout(true);
     922        renderView->setNeedsLayout();
    923923}
    924924
     
    930930
    931931    if (RenderView* renderView = this->renderView())
    932         renderView->setNeedsLayout(true);
     932        renderView->setNeedsLayout();
    933933}
    934934
     
    11881188            if (body && body->renderer()) {
    11891189                if (body->hasTagName(framesetTag) && !frameFlatteningEnabled()) {
    1190                     body->renderer()->setChildNeedsLayout(true);
     1190                    body->renderer()->setChildNeedsLayout();
    11911191                } else if (body->hasTagName(bodyTag)) {
    11921192                    if (!m_firstLayout && m_size.height() != layoutHeight() && body->renderer()->enclosingBox()->stretchesToViewport())
    1193                         body->renderer()->setChildNeedsLayout(true);
     1193                        body->renderer()->setChildNeedsLayout();
    11941194                }
    11951195            }
     
    12451245                    RenderBox* bodyRenderer = rootRenderer && document.body() ? document.body()->renderBox() : 0;
    12461246                    if (bodyRenderer && bodyRenderer->stretchesToViewport())
    1247                         bodyRenderer->setChildNeedsLayout(true);
     1247                        bodyRenderer->setChildNeedsLayout();
    12481248                    else if (rootRenderer && rootRenderer->stretchesToViewport())
    1249                         rootRenderer->setChildNeedsLayout(true);
     1249                        rootRenderer->setChildNeedsLayout();
    12501250                }
    12511251            }
     
    19431943
    19441944    for (auto it = m_viewportConstrainedObjects->begin(), end = m_viewportConstrainedObjects->end(); it != end; ++it)
    1945         (*it)->setNeedsLayout(true);
     1945        (*it)->setNeedsLayout();
    19461946}
    19471947
     
    23832383    // Also invalidate parent frame starting from the owner element of this frame.
    23842384    if (frame().ownerRenderer() && isInChildFrameWithFrameFlattening())
    2385         frame().ownerRenderer()->setNeedsLayout(true, MarkContainingBlockChain);
     2385        frame().ownerRenderer()->setNeedsLayout(MarkContainingBlockChain);
    23862386
    23872387    int delay = frame().document()->minimumLayoutDelay();
     
    24922492
    24932493    if (RenderView* renderView = this->renderView())
    2494         renderView->setNeedsLayout(true);
     2494        renderView->setNeedsLayout();
    24952495}
    24962496
  • trunk/Source/WebCore/page/Page.cpp

    r156751 r156816  
    763763    if (!m_settings->applyPageScaleFactorInCompositor()) {
    764764        if (document->renderView())
    765             document->renderView()->setNeedsLayout(true);
     765            document->renderView()->setNeedsLayout();
    766766
    767767        document->recalcStyle(Style::Force);
  • trunk/Source/WebCore/rendering/FlowThreadController.h

    r156250 r156816  
    5757        m_isRenderNamedFlowThreadOrderDirty = dirty;
    5858        if (dirty)
    59             m_view->setNeedsLayout(true);
     59            m_view->setNeedsLayout();
    6060    }
    6161
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r156767 r156816  
    14011401    // Propagate layout markers only up to the child, as we are still in the middle
    14021402    // of a layout pass
    1403     child->setNormalChildNeedsLayout(true);
     1403    child->setNormalChildNeedsLayoutBit(true);
    14041404    child->markShapeInsideDescendantsForLayout();
    14051405    child->layoutIfNeeded();
     
    14731473        return;
    14741474    if (childrenInline()) {
    1475         setNeedsLayout(true);
     1475        setNeedsLayout();
    14761476        return;
    14771477    }
     
    15931593{
    15941594    ASSERT_NOT_REACHED();
    1595     setNeedsLayout(false);
     1595    clearNeedsLayout();
    15961596}
    15971597
     
    19411941    // an auto value. Add a method to determine this, so that we can avoid the relayout.
    19421942    if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView()) || child->hasViewportPercentageLogicalHeight())
    1943         child->setChildNeedsLayout(true, MarkOnlyThis);
     1943        child->setChildNeedsLayout(MarkOnlyThis);
    19441944
    19451945    // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
     
    19631963            if (box->normalChildNeedsLayout())
    19641964                break;
    1965             box->setChildNeedsLayout(true, MarkOnlyThis);
     1965            box->setChildNeedsLayout(MarkOnlyThis);
    19661966           
    19671967            // If the width of an image is affected by the height of a child (e.g., an image with an aspect ratio),
     
    19901990                    lineBoxes.add(&toRenderBox(o)->inlineBoxWrapper()->root());
    19911991            } else if (o->isText() || (o->isRenderInline() && !walker.atEndOfInline()))
    1992                 o->setNeedsLayout(false);
     1992                o->clearNeedsLayout();
    19931993        }
    19941994
     
    20522052    updateScrollInfoAfterLayout();
    20532053
    2054     setNeedsLayout(false);
     2054    clearNeedsLayout();
    20552055    return true;
    20562056}
     
    20782078        LayoutUnit newLeft = computedValues.m_position;
    20792079        if (newLeft != box->logicalLeft())
    2080             child->setChildNeedsLayout(true, MarkOnlyThis);
     2080            box->setChildNeedsLayout(MarkOnlyThis);
    20812081    } else if (hasStaticBlockPosition) {
    20822082        LayoutUnit oldTop = box->logicalTop();
    20832083        box->updateLogicalHeight();
    20842084        if (box->logicalTop() != oldTop)
    2085             child->setChildNeedsLayout(true, MarkOnlyThis);
     2085            box->setChildNeedsLayout(MarkOnlyThis);
    20862086    }
    20872087}
     
    21172117        // positioned explicitly) this should not incur a performance penalty.
    21182118        if (relayoutChildren || (r->style()->hasStaticBlockPosition(isHorizontalWritingMode()) && r->parent() != this))
    2119             r->setChildNeedsLayout(true, MarkOnlyThis);
     2119            r->setChildNeedsLayout(MarkOnlyThis);
    21202120           
    21212121        // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
     
    21292129        // and we hit the available width constraint, the layoutIfNeeded() will catch it and do a full layout.
    21302130        if (r->needsPositionedMovementLayoutOnly() && r->tryLayoutDoingPositionedMovementOnly())
    2131             r->setNeedsLayout(false);
     2131            r->clearNeedsLayout();
    21322132           
    21332133        // If we are paginated or in a line grid, go ahead and compute a vertical position for our object now.
     
    21472147        // Lay out again if our estimate was wrong.
    21482148        if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop) {
    2149             r->setChildNeedsLayout(true, MarkOnlyThis);
     2149            r->setChildNeedsLayout(MarkOnlyThis);
    21502150            r->layoutIfNeeded();
    21512151        }
    21522152
    21532153        if (updateRegionRangeForBoxChild(r)) {
    2154             r->setNeedsLayout(true, MarkOnlyThis);
     2154            r->setNeedsLayout(MarkOnlyThis);
    21552155            r->layoutIfNeeded();
    21562156        }
     
    21692169        for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin(); it != end; ++it) {
    21702170            r = *it;
    2171             r->setChildNeedsLayout(true);
     2171            r->setChildNeedsLayout();
    21722172        }
    21732173    }
     
    21812181
    21822182    if (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(this, logicalTop()) != pageLogicalOffset()))
    2183         setChildNeedsLayout(true, MarkOnlyThis);
     2183        setChildNeedsLayout(MarkOnlyThis);
    21842184}
    21852185
     
    32393239        if (!o || r->isDescendantOf(o)) {
    32403240            if (containingBlockState == NewContainingBlock)
    3241                 r->setChildNeedsLayout(true, MarkOnlyThis);
     3241                r->setChildNeedsLayout(MarkOnlyThis);
    32423242           
    32433243            // It is parent blocks job to add positioned child to positioned objects list of its containing block
    32443244            // Parent layout needs to be invalidated to ensure this happens.
    3245             RenderObject* p = r->parent();
     3245            RenderElement* p = r->parent();
    32463246            while (p && !p->isRenderBlock())
    32473247                p = p->parent();
    32483248            if (p)
    3249                 p->setChildNeedsLayout(true);
     3249                p->setChildNeedsLayout();
    32503250           
    32513251            deadObjects.append(r);
     
    32883288    bool isChildRenderBlock = o->isRenderBlock();
    32893289    if (isChildRenderBlock && !o->needsLayout() && view().layoutState()->pageLogicalHeightChanged())
    3290         o->setChildNeedsLayout(true, MarkOnlyThis);
     3290        o->setChildNeedsLayout(MarkOnlyThis);
    32913291           
    32923292    bool needsBlockDirectionLocationSetBeforeLayout = isChildRenderBlock && view().layoutState()->needsBlockDirectionLocationSetBeforeLayout();
     
    35243524       
    35253525                if (childBlock)
    3526                     childBlock->setChildNeedsLayout(true, MarkOnlyThis);
     3526                    childBlock->setChildNeedsLayout(MarkOnlyThis);
    35273527                childBox->layoutIfNeeded();
    35283528            }
    35293529
    35303530            if (updateRegionRangeForBoxChild(childBox)) {
    3531                 childBox->setNeedsLayout(true, MarkOnlyThis);
     3531                childBox->setNeedsLayout(MarkOnlyThis);
    35323532                childBox->layoutIfNeeded();
    35333533            }
     
    39323932
    39333933    MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainingBlockChain;
    3934     setChildNeedsLayout(true, markParents);
     3934    setChildNeedsLayout(markParents);
    39353935 
    39363936    if (floatToRemove)
     
    40304030                // from previous siblings when negative margins exist on a child (see the addOverhangingFloats call at the end of collapseMargins).
    40314031                if (childLogicalWidthAtOldLogicalTopOffset != childLogicalWidthAtNewLogicalTopOffset)
    4032                     child->setChildNeedsLayout(true, MarkOnlyThis);
     4032                    child->setChildNeedsLayout(MarkOnlyThis);
    40334033                return newLogicalTop - logicalTop;
    40344034            }
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r156738 r156816  
    393393    }
    394394
    395     setNeedsLayout(false);
     395    clearNeedsLayout();
    396396}
    397397
     
    537537            // change (because it has more available line width).
    538538            // So go ahead and mark the item as dirty.
    539             child->setChildNeedsLayout(true, MarkOnlyThis);
     539            child->setChildNeedsLayout(MarkOnlyThis);
    540540        }
    541541       
     
    552552
    553553    if (updateRegionRangeForBoxChild(child)) {
    554         child->setNeedsLayout(true, MarkOnlyThis);
     554        child->setNeedsLayout(MarkOnlyThis);
    555555        child->layoutIfNeeded();
    556556    }
     
    625625        childLayer->setStaticBlockPosition(logicalTop);
    626626        if (hasStaticBlockPosition)
    627             child->setChildNeedsLayout(true, MarkOnlyThis);
     627            child->setChildNeedsLayout(MarkOnlyThis);
    628628    }
    629629}
     
    12661266            // change (because it has more available line width).
    12671267            // So go ahead and mark the item as dirty.
    1268             child->setChildNeedsLayout(true, MarkOnlyThis);
     1268            child->setChildNeedsLayout(MarkOnlyThis);
    12691269        }
    12701270       
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r156618 r156816  
    12741274    // determineStartPosition first will break fast/repaint/line-flow-with-floats-9.html.
    12751275    if (layoutState.isFullLayout() && hasInlineChild && !selfNeedsLayout()) {
    1276         setNeedsLayout(true, MarkOnlyThis); // Mark as needing a full layout to force us to repaint.
     1276        setNeedsLayout(MarkOnlyThis); // Mark as needing a full layout to force us to repaint.
    12771277        if (!view().doingFullRepaint() && hasLayer()) {
    12781278            // Because we waited until we were already inside layout to discover
     
    18671867
    18681868                if (relayoutChildren || box->hasRelativeDimensions())
    1869                     o->setChildNeedsLayout(true, MarkOnlyThis);
     1869                    box->setChildNeedsLayout(MarkOnlyThis);
    18701870
    18711871                // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
     
    18901890                if (layoutState.isFullLayout() || o->selfNeedsLayout())
    18911891                    dirtyLineBoxesForRenderer(o, layoutState.isFullLayout());
    1892                 o->setNeedsLayout(false);
     1892                o->clearNeedsLayout();
    18931893            }
    18941894        }
     
    34513451            setLogicalTopForChild(o, logicalTopForChild(o) + marginBeforeForChild(o) + paginationStrut);
    34523452            if (o->isRenderBlock())
    3453                 toRenderBlock(o)->setChildNeedsLayout(true, MarkOnlyThis);
     3453                toRenderBlock(o)->setChildNeedsLayout(MarkOnlyThis);
    34543454            o->layoutIfNeeded();
    34553455            // Save the old logical top before calling removePlacedObject which will set
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r156767 r156816  
    284284                repaint();
    285285            else if (newStyle->hasOutOfFlowPosition())
    286                 parent()->setChildNeedsLayout(true);
     286                parent()->setChildNeedsLayout();
    287287            if (isFloating() && !isOutOfFlowPositioned() && newStyle->hasOutOfFlowPosition())
    288288                removeFloatingOrPositionedChildFromBlockLists();
     
    312312        if (isOutOfFlowPositioned() && newStyle->hasStaticBlockPosition(isHorizontalWritingMode()) && oldStyle->marginBefore() != newStyle->marginBefore()
    313313            && parent() && !parent()->normalChildNeedsLayout())
    314             parent()->setChildNeedsLayout(true);
     314            parent()->setChildNeedsLayout();
    315315    }
    316316
     
    451451    RenderObject* child = firstChild();
    452452    if (!child) {
    453         setNeedsLayout(false);
     453        clearNeedsLayout();
    454454        return;
    455455    }
     
    463463    statePusher.pop();
    464464    invalidateBackgroundObscurationStatus();
    465     setNeedsLayout(false);
     465    clearNeedsLayout();
    466466}
    467467
     
    19631963            rootBox.block().setStaticInlinePositionForChild(this, rootBox.lineTopWithLeading(), roundedLayoutUnit(box->logicalLeft()));
    19641964            if (style()->hasStaticInlinePosition(box->isHorizontal()))
    1965                 setChildNeedsLayout(true, MarkOnlyThis); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly.
     1965                setChildNeedsLayout(MarkOnlyThis); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly.
    19661966        } else {
    19671967            // Our object was a block originally, so we make our normal flow position be
     
    19711971            layer()->setStaticBlockPosition(box->logicalTop());
    19721972            if (style()->hasStaticBlockPosition(box->isHorizontal()))
    1973                 setChildNeedsLayout(true, MarkOnlyThis); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly.
     1973                setChildNeedsLayout(MarkOnlyThis); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly.
    19741974        }
    19751975
  • 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()) {
  • trunk/Source/WebCore/rendering/RenderElement.cpp

    r156779 r156816  
    559559    setPreferredLogicalWidthsDirty(true);
    560560    if (!normalChildNeedsLayout())
    561         setChildNeedsLayout(true); // We may supply the static position for an absolute positioned child.
     561        setChildNeedsLayout(); // We may supply the static position for an absolute positioned child.
    562562
    563563    if (AXObjectCache* cache = document().axObjectCache())
     
    996996}
    997997
     998void RenderElement::setNeedsPositionedMovementLayout(const RenderStyle* oldStyle)
     999{
     1000    ASSERT(!isSetNeedsLayoutForbidden());
     1001    if (needsPositionedMovementLayout())
     1002        return;
     1003    setNeedsPositionedMovementLayoutBit(true);
     1004    markContainingBlocksForLayout();
     1005    if (!hasLayer()) {
     1006        if (oldStyle && style()->diffRequiresRepaint(oldStyle))
     1007            setLayerNeedsFullRepaint();
     1008        else
     1009            setLayerNeedsFullRepaintForPositionedMovementLayout();
     1010    }
     1011}
     1012
     1013void RenderElement::clearChildNeedsLayout()
     1014{
     1015    setNormalChildNeedsLayoutBit(false);
     1016    setPosChildNeedsLayoutBit(false);
     1017    setNeedsSimplifiedNormalFlowLayoutBit(false);
     1018    setNormalChildNeedsLayoutBit(false);
     1019    setNeedsPositionedMovementLayoutBit(false);
     1020}
     1021
     1022void RenderElement::setNeedsSimplifiedNormalFlowLayout()
     1023{
     1024    ASSERT(!isSetNeedsLayoutForbidden());
     1025    if (needsSimplifiedNormalFlowLayout())
     1026        return;
     1027    setNeedsSimplifiedNormalFlowLayoutBit(true);
     1028    markContainingBlocksForLayout();
     1029    if (hasLayer())
     1030        setLayerNeedsFullRepaint();
     1031}
     1032
    9981033RenderElement* RenderElement::rendererForRootBackground()
    9991034{
  • trunk/Source/WebCore/rendering/RenderElement.h

    r156738 r156816  
    8383    void setAncestorLineBoxDirty(bool f = true);
    8484
     85    void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain);
     86    void clearChildNeedsLayout();
     87    void setNeedsPositionedMovementLayout(const RenderStyle* oldStyle);
     88    void setNeedsSimplifiedNormalFlowLayout();
     89
    8590    // Return the renderer whose background style is used to paint the root background. Should only be called on the renderer for which isRoot() is true.
    8691    RenderElement* rendererForRootBackground();
     
    170175    m_ancestorLineBoxDirty = f;
    171176    if (m_ancestorLineBoxDirty)
    172         setNeedsLayout(true);
     177        setNeedsLayout();
     178}
     179
     180inline void RenderElement::setChildNeedsLayout(MarkingBehavior markParents)
     181{
     182    ASSERT(!isSetNeedsLayoutForbidden());
     183    if (normalChildNeedsLayout())
     184        return;
     185    setNormalChildNeedsLayoutBit(true);
     186    if (markParents == MarkContainingBlockChain)
     187        markContainingBlocksForLayout();
    173188}
    174189
     
    285300}
    286301
    287 inline void RenderObject::setNeedsLayout(bool needsLayout, MarkingBehavior markParents)
    288 {
    289     bool alreadyNeededLayout = m_bitfields.needsLayout();
    290     m_bitfields.setNeedsLayout(needsLayout);
    291     if (needsLayout) {
    292         ASSERT(!isSetNeedsLayoutForbidden());
    293         if (!alreadyNeededLayout) {
    294             if (markParents == MarkContainingBlockChain)
    295                 markContainingBlocksForLayout();
    296             if (hasLayer())
    297                 setLayerNeedsFullRepaint();
    298         }
    299     } else {
    300         setEverHadLayout(true);
    301         setPosChildNeedsLayout(false);
    302         setNeedsSimplifiedNormalFlowLayout(false);
    303         setNormalChildNeedsLayout(false);
    304         setNeedsPositionedMovementLayout(false);
    305         if (isRenderElement())
    306             toRenderElement(this)->setAncestorLineBoxDirty(false);
    307 #ifndef NDEBUG
    308         checkBlockPositionedObjectsNeedLayout();
    309 #endif
    310     }
    311 }
    312 
    313302inline RenderElement* ContainerNode::renderer() const
    314303{
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp

    r156761 r156816  
    476476    }
    477477
    478     setNeedsLayout(false);
     478    clearNeedsLayout();
    479479
    480480    LayoutSize newSize = contentBoxRect().size();
     
    516516    childBox->style()->setHeight(Length(newSize.height(), Fixed));
    517517    childBox->style()->setWidth(Length(newSize.width(), Fixed));
    518     childBox->setNeedsLayout(true, MarkOnlyThis);
     518    childBox->setNeedsLayout(MarkOnlyThis);
    519519    childBox->layout();
    520     setChildNeedsLayout(false);
     520    clearChildNeedsLayout();
    521521   
    522522    statePusher.pop();
  • trunk/Source/WebCore/rendering/RenderFieldset.cpp

    r155680 r156816  
    6767    if (legend) {
    6868        if (relayoutChildren)
    69             legend->setNeedsLayout(true);
     69            legend->setNeedsLayout();
    7070        legend->layoutIfNeeded();
    7171
  • 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            }
  • trunk/Source/WebCore/rendering/RenderFlowThread.cpp

    r156767 r156816  
    127127    m_breakBeforeToRegionMap.clear();
    128128    m_breakAfterToRegionMap.clear();
    129     setNeedsLayout(true);
     129    setNeedsLayout();
    130130
    131131    m_regionsInvalidated = true;
     
    966966        // FIXME: We need to find a way to avoid marking all the regions ancestors for layout
    967967        // as we are already inside layout.
    968         region->setNeedsLayout(true);
     968        region->setNeedsLayout();
    969969    }
    970970}
  • trunk/Source/WebCore/rendering/RenderFrameBase.cpp

    r156285 r156816  
    6262        if (childFrameView)
    6363            childFrameView->layout();
    64         setNeedsLayout(false);
     64        clearNeedsLayout();
    6565        return;
    6666    }
     
    9999    ASSERT(!childRoot->firstChild() || !childRoot->firstChild()->firstChildSlow() || !childRoot->firstChild()->firstChildSlow()->needsLayout());
    100100
    101     setNeedsLayout(false);
     101    clearNeedsLayout();
    102102}
    103103
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r156738 r156816  
    489489    }
    490490
    491     setNeedsLayout(false);
     491    clearNeedsLayout();
    492492}
    493493
     
    514514                child->setWidth(width);
    515515                child->setHeight(height);
    516                 child->setNeedsLayout(true);
     516                child->setNeedsLayout();
    517517                child->layout();
    518518            }
     
    531531        child->setWidth(0);
    532532        child->setHeight(0);
    533         child->setNeedsLayout(false);
     533        child->clearNeedsLayout();
    534534    }
    535535}
     
    568568            child->setHeight(height);
    569569
    570             child->setNeedsLayout(true);
     570            child->setNeedsLayout();
    571571
    572572            if (child->isFrameSet())
     
    612612
    613613                // update to final size
    614                 child->setNeedsLayout(true);
     614                child->setNeedsLayout();
    615615                if (child->isFrameSet())
    616616                    toRenderFrameSet(child)->layout();
     
    639639        child->setWidth(0);
    640640        child->setHeight(0);
    641         child->setNeedsLayout(false);
     641        child->clearNeedsLayout();
    642642    }
    643643}
     
    671671    axis.m_deltas[axis.m_splitBeingResized - 1] += delta;
    672672    axis.m_deltas[axis.m_splitBeingResized] -= delta;
    673     setNeedsLayout(true);
     673    setNeedsLayout();
    674674}
    675675
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r156738 r156816  
    185185    repainter.repaintAfterLayout();
    186186
    187     setNeedsLayout(false);
     187    clearNeedsLayout();
    188188}
    189189
     
    368368    // 2) Relayout if the column track's used breadth changed OR the logical height is unavailable.
    369369    if (!child->needsLayout())
    370         child->setNeedsLayout(true, MarkOnlyThis);
     370        child->setNeedsLayout(MarkOnlyThis);
    371371
    372372    child->setOverrideContainingBlockContentLogicalWidth(gridAreaBreadthForChild(child, ForColumns, columnTracks));
     
    675675        LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadthForChild(child, ForRows, rowTracks);
    676676        if (oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth || oldOverrideContainingBlockContentLogicalHeight != overrideContainingBlockContentLogicalHeight)
    677             child->setNeedsLayout(true, MarkOnlyThis);
     677            child->setNeedsLayout(MarkOnlyThis);
    678678
    679679        child->setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth);
  • trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp

    r156155 r156816  
    112112
    113113    if (!selfNeedsLayout())
    114         setNeedsLayout(true);
     114        setNeedsLayout();
    115115}
    116116
  • trunk/Source/WebCore/rendering/RenderIFrame.cpp

    r155806 r156816  
    174174    updateLayerTransform();
    175175
    176     setNeedsLayout(false);
     176    clearNeedsLayout();
    177177}
    178178
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r156613 r156816  
    263263            shouldRepaint = false;
    264264            if (!selfNeedsLayout())
    265                 setNeedsLayout(true);
     265                setNeedsLayout();
    266266        }
    267267
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r156738 r156816  
    198198        if (oldStyle && alwaysCreateLineBoxes) {
    199199            dirtyLineBoxes(false);
    200             setNeedsLayout(true);
     200            setNeedsLayout();
    201201        }
    202202        m_alwaysCreateLineBoxes = alwaysCreateLineBoxes;
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r156622 r156816  
    31603160                // Our proprietary overflow: overlay value doesn't trigger a layout.
    31613161                m_inOverflowRelayout = true;
    3162                 renderer().setNeedsLayout(true, MarkOnlyThis);
     3162                renderer().setNeedsLayout(MarkOnlyThis);
    31633163                if (renderer().isRenderBlock()) {
    31643164                    RenderBlock& block = toRenderBlock(renderer());
  • trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp

    r156738 r156816  
    143143        if (!layer() && layerCreationAllowedForSubtree()) {
    144144            if (s_wasFloating && isFloating())
    145                 setChildNeedsLayout(true);
     145                setChildNeedsLayout();
    146146            ensureLayer();
    147147            if (parent() && !needsLayout() && containingBlock()) {
     
    157157        layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_layer
    158158        if (s_wasFloating && isFloating())
    159             setChildNeedsLayout(true);
     159            setChildNeedsLayout();
    160160        if (s_hadTransform)
    161161            setNeedsLayoutAndPrefWidthsRecalc();
     
    165165        layer()->styleChanged(diff, oldStyle);
    166166        if (s_hadLayer && layer()->isSelfPaintingLayer() != s_layerWasSelfPainting)
    167             setChildNeedsLayout(true);
     167            setChildNeedsLayout();
    168168    }
    169169
  • trunk/Source/WebCore/rendering/RenderListMarker.cpp

    r156738 r156816  
    14081408        setMarginEnd(endMargin.value());
    14091409
    1410     setNeedsLayout(false);
     1410    clearNeedsLayout();
    14111411}
    14121412
  • trunk/Source/WebCore/rendering/RenderMarquee.cpp

    r155374 r156816  
    247247    bool activate = (m_totalLoops <= 0 || m_currentLoop < m_totalLoops);
    248248    if (activate && !m_timer.isActive())
    249         m_layer->renderer().setNeedsLayout(true);
     249        m_layer->renderer().setNeedsLayout();
    250250    else if (!activate && m_timer.isActive())
    251251        m_timer.stop();
  • trunk/Source/WebCore/rendering/RenderMedia.cpp

    r156278 r156816  
    8484    controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed));
    8585    controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed));
    86     controlsRenderer->setNeedsLayout(true, MarkOnlyThis);
     86    controlsRenderer->setNeedsLayout(MarkOnlyThis);
    8787    controlsRenderer->layout();
    88     setChildNeedsLayout(false);
     88    clearChildNeedsLayout();
    8989
    9090    statePusher.pop();
  • trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp

    r155825 r156816  
    117117                RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(childBox);
    118118                if (multicolSet->calculateBalancedHeight(firstPass)) {
    119                     multicolSet->setChildNeedsLayout(true, MarkOnlyThis);
     119                    multicolSet->setChildNeedsLayout(MarkOnlyThis);
    120120                    needsRelayout = true;
    121121                }
     
    125125            // Layout again. Column balancing resulted in a new height.
    126126            neededRelayout = true;
    127             m_flowThread->setChildNeedsLayout(true, MarkOnlyThis);
    128             setChildNeedsLayout(true, MarkOnlyThis);
     127            m_flowThread->setChildNeedsLayout(MarkOnlyThis);
     128            setChildNeedsLayout(MarkOnlyThis);
    129129            if (firstPass)
    130130                statePusher.pop();
     
    171171
    172172    if (relayoutChildren)
    173         m_flowThread->setChildNeedsLayout(true, MarkOnlyThis);
     173        m_flowThread->setChildNeedsLayout(MarkOnlyThis);
    174174   
    175175    setLogicalTopForChild(m_flowThread, borderAndPaddingBefore());
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r156639 r156816  
    620620}
    621621
     622void RenderObject::clearNeedsLayout()
     623{
     624    m_bitfields.setNeedsLayout(false);
     625    setEverHadLayout(true);
     626    setPosChildNeedsLayoutBit(false);
     627    setNeedsSimplifiedNormalFlowLayoutBit(false);
     628    setNormalChildNeedsLayoutBit(false);
     629    setNeedsPositionedMovementLayoutBit(false);
     630    if (isRenderElement())
     631        toRenderElement(this)->setAncestorLineBoxDirty(false);
     632#ifndef NDEBUG
     633    checkBlockPositionedObjectsNeedLayout();
     634#endif
     635}
     636
    622637void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, RenderObject* newRoot)
    623638{
     
    641656        if (!container && !object->isRenderView())
    642657            return;
    643         if (!last->isText() && last->style()->hasOutOfFlowPosition()) {
     658        if (last->style()->hasOutOfFlowPosition()) {
    644659            bool willSkipRelativelyPositionedInlines = !object->isRenderBlock() || object->isAnonymousBlock();
    645660            // Skip relatively positioned inlines and anonymous blocks to get to the enclosing RenderBlock.
     
    650665            if (willSkipRelativelyPositionedInlines)
    651666                container = object->container();
    652             object->setPosChildNeedsLayout(true);
     667            object->setPosChildNeedsLayoutBit(true);
    653668            simplifiedNormalFlowLayout = true;
    654669            ASSERT(!object->isSetNeedsLayoutForbidden());
     
    656671            if (object->needsSimplifiedNormalFlowLayout())
    657672                return;
    658             object->setNeedsSimplifiedNormalFlowLayout(true);
     673            object->setNeedsSimplifiedNormalFlowLayoutBit(true);
    659674            ASSERT(!object->isSetNeedsLayoutForbidden());
    660675        } else {
    661676            if (object->normalChildNeedsLayout())
    662677                return;
    663             object->setNormalChildNeedsLayout(true);
     678            object->setNormalChildNeedsLayoutBit(true);
    664679            ASSERT(!object->isSetNeedsLayoutForbidden());
    665680        }
     
    22102225        child = child->nextSibling();
    22112226    }
    2212     setNeedsLayout(false);
     2227    clearNeedsLayout();
    22132228}
    22142229
  • trunk/Source/WebCore/rendering/RenderObject.h

    r156738 r156816  
    618618
    619619    void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObject* newRoot = 0);
    620     void setNeedsLayout(bool needsLayout, MarkingBehavior = MarkContainingBlockChain);
    621     void setChildNeedsLayout(bool childNeedsLayout, MarkingBehavior = MarkContainingBlockChain);
    622     void setNeedsPositionedMovementLayout(const RenderStyle* oldStyle);
    623     void setNeedsSimplifiedNormalFlowLayout();
     620    void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain);
     621    void clearNeedsLayout();
    624622    void setPreferredLogicalWidthsDirty(bool, MarkingBehavior = MarkContainingBlockChain);
    625623    void invalidateContainerPreferredLogicalWidths();
     
    627625    void setNeedsLayoutAndPrefWidthsRecalc()
    628626    {
    629         setNeedsLayout(true);
     627        setNeedsLayout();
    630628        setPreferredLogicalWidthsDirty(true);
    631629    }
     
    941939
    942940    void setDocumentForAnonymous(Document& document) { ASSERT(isAnonymous()); m_node = &document; }
     941
     942    void setNeedsPositionedMovementLayoutBit(bool b) { m_bitfields.setNeedsPositionedMovementLayout(b); }
     943    void setNormalChildNeedsLayoutBit(bool b) { m_bitfields.setNormalChildNeedsLayout(b); }
     944    void setPosChildNeedsLayoutBit(bool b) { m_bitfields.setPosChildNeedsLayout(b); }
     945    void setNeedsSimplifiedNormalFlowLayoutBit(bool b) { m_bitfields.setNeedsSimplifiedNormalFlowLayout(b); }
    943946
    944947private:
     
    10781081    RenderObjectBitfields m_bitfields;
    10791082
    1080     void setNeedsPositionedMovementLayout(bool b) { m_bitfields.setNeedsPositionedMovementLayout(b); }
    1081     void setNormalChildNeedsLayout(bool b) { m_bitfields.setNormalChildNeedsLayout(b); }
    1082     void setPosChildNeedsLayout(bool b) { m_bitfields.setPosChildNeedsLayout(b); }
    1083     void setNeedsSimplifiedNormalFlowLayout(bool b) { m_bitfields.setNeedsSimplifiedNormalFlowLayout(b); }
    10841083    void setIsDragging(bool b) { m_bitfields.setIsDragging(b); }
    10851084    void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); }
     
    11161115}
    11171116
    1118 inline void RenderObject::setChildNeedsLayout(bool childNeedsLayout, MarkingBehavior markParents)
    1119 {
    1120     bool alreadyNeededLayout = normalChildNeedsLayout();
    1121     setNormalChildNeedsLayout(childNeedsLayout);
    1122     if (childNeedsLayout) {
    1123         ASSERT(!isSetNeedsLayoutForbidden());
    1124         if (!alreadyNeededLayout && markParents == MarkContainingBlockChain)
    1125             markContainingBlocksForLayout();
    1126     } else {
    1127         setPosChildNeedsLayout(false);
    1128         setNeedsSimplifiedNormalFlowLayout(false);
    1129         setNormalChildNeedsLayout(false);
    1130         setNeedsPositionedMovementLayout(false);
    1131     }
    1132 }
    1133 
    1134 inline void RenderObject::setNeedsPositionedMovementLayout(const RenderStyle* oldStyle)
    1135 {
    1136     bool alreadyNeededLayout = needsPositionedMovementLayout();
    1137     setNeedsPositionedMovementLayout(true);
     1117inline void RenderObject::setNeedsLayout(MarkingBehavior markParents)
     1118{
    11381119    ASSERT(!isSetNeedsLayoutForbidden());
    1139     if (!alreadyNeededLayout) {
     1120    if (m_bitfields.needsLayout())
     1121        return;
     1122    m_bitfields.setNeedsLayout(true);
     1123    if (markParents == MarkContainingBlockChain)
    11401124        markContainingBlocksForLayout();
    1141         if (hasLayer()) {
    1142             if (oldStyle && style()->diffRequiresRepaint(oldStyle))
    1143                 setLayerNeedsFullRepaint();
    1144             else
    1145                 setLayerNeedsFullRepaintForPositionedMovementLayout();
    1146         }
    1147     }
    1148 }
    1149 
    1150 inline void RenderObject::setNeedsSimplifiedNormalFlowLayout()
    1151 {
    1152     bool alreadyNeededLayout = needsSimplifiedNormalFlowLayout();
    1153     setNeedsSimplifiedNormalFlowLayout(true);
    1154     ASSERT(!isSetNeedsLayoutForbidden());
    1155     if (!alreadyNeededLayout) {
    1156         markContainingBlocksForLayout();
    1157         if (hasLayer())
    1158             setLayerNeedsFullRepaint();
    1159     }
     1125    if (hasLayer())
     1126        setLayerNeedsFullRepaint();
    11601127}
    11611128
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r156738 r156816  
    9797
    9898    repainter.repaintAfterLayout();
    99     setNeedsLayout(false);
     99    clearNeedsLayout();
    100100}
    101101
  • trunk/Source/WebCore/rendering/RenderReplica.cpp

    r156738 r156816  
    6161    setFrameRect(parentBox()->borderBoxRect());
    6262    updateLayerTransform();
    63     setNeedsLayout(false);
     63    clearNeedsLayout();
    6464}
    6565
  • trunk/Source/WebCore/rendering/RenderRubyRun.cpp

    r156608 r156816  
    226226        return 0;
    227227    if (relayoutChildren)
    228         rt->setChildNeedsLayout(true, MarkOnlyThis);
     228        rt->setChildNeedsLayout(MarkOnlyThis);
    229229    rt->layoutIfNeeded();
    230230    return rt;
  • trunk/Source/WebCore/rendering/RenderScrollbar.cpp

    r155825 r156816  
    191191        setFrameRect(IntRect(location(), IntSize(isHorizontal ? width() : newThickness, isHorizontal ? newThickness : height())));
    192192        if (RenderBox* box = owningRenderer())
    193             box->setChildNeedsLayout(true);
     193            box->setChildNeedsLayout();
    194194    }
    195195}
  • trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp

    r156738 r156816  
    6464        layoutVerticalPart();
    6565
    66     setNeedsLayout(false);
     66    clearNeedsLayout();
    6767}
    6868
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r156738 r156816  
    415415    if (logicalWidth() != oldLogicalWidth) {
    416416        for (unsigned i = 0; i < m_captions.size(); i++)
    417             m_captions[i]->setNeedsLayout(true, MarkOnlyThis);
     417            m_captions[i]->setNeedsLayout(MarkOnlyThis);
    418418    }
    419419    // FIXME: The optimisation below doesn't work since the internal table
     
    435435            RenderTableSection* section = toRenderTableSection(child);
    436436            if (m_columnLogicalWidthChanged)
    437                 section->setChildNeedsLayout(true, MarkOnlyThis);
     437                section->setChildNeedsLayout(MarkOnlyThis);
    438438            section->layoutIfNeeded();
    439439            totalSectionLogicalHeight += section->calcRowLogicalHeight();
     
    557557
    558558    m_columnLogicalWidthChanged = false;
    559     setNeedsLayout(false);
     559    clearNeedsLayout();
    560560}
    561561
  • trunk/Source/WebCore/rendering/RenderTable.h

    r153380 r156816  
    222222            return;
    223223        m_needsSectionRecalc = true;
    224         setNeedsLayout(true);
     224        setNeedsLayout();
    225225    }
    226226
  • trunk/Source/WebCore/rendering/RenderTableCell.cpp

    r156622 r156816  
    219219    // doesn't change the logical height.
    220220    if (intrinsicPaddingBefore != oldIntrinsicPaddingBefore || intrinsicPaddingAfter != oldIntrinsicPaddingAfter)
    221         setNeedsLayout(true, MarkOnlyThis);
     221        setNeedsLayout(MarkOnlyThis);
    222222}
    223223
     
    231231        return;
    232232
    233     setNeedsLayout(true, MarkOnlyThis);
    234     row()->setChildNeedsLayout(true, MarkOnlyThis);
     233    setNeedsLayout(MarkOnlyThis);
     234    row()->setChildNeedsLayout(MarkOnlyThis);
    235235
    236236    if (!table()->selfNeedsLayout() && checkForRepaintDuringLayout())
     
    256256        int newIntrinsicPaddingBefore = max<LayoutUnit>(0, intrinsicPaddingBefore() - max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline));
    257257        setIntrinsicPaddingBefore(newIntrinsicPaddingBefore);
    258         setNeedsLayout(true, MarkOnlyThis);
     258        setNeedsLayout(MarkOnlyThis);
    259259        layoutBlock(cellWidthChanged());
    260260    }
  • trunk/Source/WebCore/rendering/RenderTableRow.cpp

    r156738 r156816  
    8383            // itself.
    8484            for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell())
    85                 cell->setChildNeedsLayout(true, MarkOnlyThis);
     85                cell->setChildNeedsLayout(MarkOnlyThis);
    8686        }
    8787    }
     
    164164    for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) {
    165165        if (!cell->needsLayout() && paginated && view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
    166             cell->setChildNeedsLayout(true, MarkOnlyThis);
     166            cell->setChildNeedsLayout(MarkOnlyThis);
    167167
    168168        if (cell->needsLayout()) {
     
    184184    statePusher.pop();
    185185    // RenderTableSection::layoutRows will set our logical height and width later, so it calls updateLayerTransform().
    186     setNeedsLayout(false);
     186    clearNeedsLayout();
    187187}
    188188
  • 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
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r156613 r156816  
    292292{
    293293    HTMLElement* placeholder = textFormControlElement().placeholderElement();
    294     RenderObject* placeholderRenderer = placeholder ? placeholder->renderer() : 0;
     294    RenderElement* placeholderRenderer = placeholder ? placeholder->renderer() : 0;
    295295    if (!placeholderRenderer)
    296296        return 0;
     
    299299        // called from layout() of the parent and the placeholder layout doesn't
    300300        // affect the parent layout.
    301         placeholderRenderer->setChildNeedsLayout(true, MarkOnlyThis);
     301        placeholderRenderer->setChildNeedsLayout(MarkOnlyThis);
    302302    }
    303303    return placeholderRenderer;
  • 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);
  • trunk/Source/WebCore/rendering/RenderVideo.cpp

    r155811 r156816  
    9393    setIntrinsicSize(size);
    9494    setPreferredLogicalWidthsDirty(true);
    95     setNeedsLayout(true);
     95    setNeedsLayout();
    9696}
    9797   
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r156622 r156816  
    303303    bool relayoutChildren = !shouldUsePrintingLayout() && (width() != viewWidth() || height() != viewHeight());
    304304    if (relayoutChildren) {
    305         setChildNeedsLayout(true, MarkOnlyThis);
     305        setChildNeedsLayout(MarkOnlyThis);
    306306        for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    307             if ((child->isBox() && (toRenderBox(child)->hasRelativeLogicalHeight() || toRenderBox(child)->hasViewportPercentageLogicalHeight()))
    308                     || child->style()->logicalHeight().isPercent()
    309                     || child->style()->logicalMinHeight().isPercent()
    310                     || child->style()->logicalMaxHeight().isPercent()
    311                     || child->style()->logicalHeight().isViewportPercentage()
    312                     || child->style()->logicalMinHeight().isViewportPercentage()
    313                     || child->style()->logicalMaxHeight().isViewportPercentage()
     307            if (!child->isBox())
     308                continue;
     309            RenderBox& box = toRenderBox(*child);
     310            if (box.hasRelativeLogicalHeight()
     311                || box.hasViewportPercentageLogicalHeight()
     312                || box.style()->logicalHeight().isPercent()
     313                || box.style()->logicalMinHeight().isPercent()
     314                || box.style()->logicalMaxHeight().isPercent()
     315                || box.style()->logicalHeight().isViewportPercentage()
     316                || box.style()->logicalMinHeight().isViewportPercentage()
     317                || box.style()->logicalMaxHeight().isViewportPercentage()
    314318#if ENABLE(SVG)
    315                     || child->isSVGRoot()
     319                || box.isSVGRoot()
    316320#endif
    317321                )
    318                 child->setChildNeedsLayout(true, MarkOnlyThis);
     322                box.setChildNeedsLayout(MarkOnlyThis);
    319323        }
    320324    }
     
    341345#endif
    342346    m_layoutState = 0;
    343     setNeedsLayout(false);
     347    clearNeedsLayout();
    344348   
    345349    if (isSeamlessAncestorInFlowThread)
  • trunk/Source/WebCore/rendering/RenderWidget.cpp

    r155817 r156816  
    218218    ASSERT(needsLayout());
    219219
    220     setNeedsLayout(false);
     220    clearNeedsLayout();
    221221}
    222222
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

    r155944 r156816  
    8383
    8484    // Ensure a full repaint will happen after layout finishes.
    85     setNeedsLayout(true, MarkOnlyThis);
     85    setNeedsLayout(MarkOnlyThis);
    8686
    8787    bool hadLayoutState = view().layoutState();
     
    101101            // Because our width changed, |child| may need layout.
    102102            if (child->maxPreferredLogicalWidth() > oldAvailableLogicalWidth)
    103                 child->setNeedsLayout(true, MarkOnlyThis);
     103                child->setNeedsLayout(MarkOnlyThis);
    104104           
    105105            RenderMathMLBlock* childMathMLBlock = child->isRenderMathMLBlock() ? toRenderMathMLBlock(child) : 0;
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp

    r156036 r156816  
    350350        return;
    351351
    352     setNeedsLayout(true, MarkOnlyThis);
    353     m_baseWrapper->setChildNeedsLayout(true, MarkOnlyThis);
     352    setNeedsLayout(MarkOnlyThis);
     353    m_baseWrapper->setChildNeedsLayout(MarkOnlyThis);
    354354
    355355    RenderMathMLBlock::layout();
  • trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp

    r155755 r156816  
    8787
    8888    repainter.repaintAfterLayout();
    89     setNeedsLayout(false);
     89    clearNeedsLayout();
    9090}
    9191
  • trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp

    r156738 r156816  
    6767{
    6868    StackStats::LayoutCheckPoint layoutCheckPoint;
    69     setNeedsLayout(false);
     69    clearNeedsLayout();
    7070}
    7171
  • trunk/Source/WebCore/rendering/svg/RenderSVGHiddenContainer.cpp

    r155755 r156816  
    3939    ASSERT(needsLayout());
    4040    SVGRenderSupport::layoutChildren(this, selfNeedsLayout());
    41     setNeedsLayout(false);   
     41    clearNeedsLayout();   
    4242}
    4343
  • trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp

    r155755 r156816  
    116116
    117117    repainter.repaintAfterLayout();
    118     setNeedsLayout(false);
     118    clearNeedsLayout();
    119119}
    120120
  • trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp

    r155055 r156816  
    196196
    197197    if (needsLayout && !object->documentBeingDestroyed())
    198         object->setNeedsLayout(true);
     198        object->setNeedsLayout();
    199199
    200200    removeFromCacheAndInvalidateDependencies(object, needsLayout);
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp

    r155963 r156816  
    194194            continue;
    195195        SVGResourcesCache::clientStyleChanged(renderer, StyleDifferenceLayout, renderer->style());
    196         renderer->setNeedsLayout(true);
     196        renderer->setNeedsLayout();
    197197    }
    198198}
  • trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp

    r156155 r156816  
    237237    repainter.repaintAfterLayout();
    238238
    239     setNeedsLayout(false);
     239    clearNeedsLayout();
    240240}
    241241
  • trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp

    r155755 r156816  
    173173
    174174    repainter.repaintAfterLayout();
    175     setNeedsLayout(false);
     175    clearNeedsLayout();
    176176}
    177177
  • trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp

    r156377 r156816  
    439439
    440440    repainter.repaintAfterLayout();
    441     setNeedsLayout(false);
     441    clearNeedsLayout();
    442442}
    443443
  • trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp

    r156285 r156816  
    270270
    271271        if (needsLayout)
    272             child->setNeedsLayout(true, MarkOnlyThis);
     272            child->setNeedsLayout(MarkOnlyThis);
    273273
    274274        if (child->needsLayout()) {
  • trunk/Source/WebCore/svg/SVGClipPathElement.cpp

    r156147 r156816  
    101101
    102102    if (RenderObject* object = renderer())
    103         object->setNeedsLayout(true);
     103        object->setNeedsLayout();
    104104}
    105105
     
    112112
    113113    if (RenderObject* object = renderer())
    114         object->setNeedsLayout(true);
     114        object->setNeedsLayout();
    115115}
    116116
  • trunk/Source/WebCore/svg/SVGFilterElement.cpp

    r156147 r156816  
    101101
    102102    if (RenderObject* object = renderer())
    103         object->setNeedsLayout(true);
     103        object->setNeedsLayout();
    104104}
    105105
     
    175175
    176176    if (RenderObject* object = renderer())
    177         object->setNeedsLayout(true);
     177        object->setNeedsLayout();
    178178}
    179179
     
    186186
    187187    if (RenderObject* object = renderer())
    188         object->setNeedsLayout(true);
     188        object->setNeedsLayout();
    189189}
    190190
  • trunk/Source/WebCore/svg/SVGGradientElement.cpp

    r155815 r156816  
    124124   
    125125    if (RenderObject* object = renderer())
    126         object->setNeedsLayout(true);
     126        object->setNeedsLayout();
    127127}
    128128   
     
    135135
    136136    if (RenderObject* object = renderer())
    137         object->setNeedsLayout(true);
     137        object->setNeedsLayout();
    138138}
    139139
  • trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp

    r156408 r156816  
    116116
    117117    if (RenderObject* object = renderer())
    118         object->setNeedsLayout(true);
     118        object->setNeedsLayout();
    119119}
    120120
  • trunk/Source/WebCore/svg/SVGMarkerElement.cpp

    r156147 r156816  
    177177
    178178    if (RenderObject* object = renderer())
    179         object->setNeedsLayout(true);
     179        object->setNeedsLayout();
    180180}
    181181
     
    188188
    189189    if (RenderObject* object = renderer())
    190         object->setNeedsLayout(true);
     190        object->setNeedsLayout();
    191191}
    192192
  • trunk/Source/WebCore/svg/SVGMaskElement.cpp

    r156147 r156816  
    144144
    145145    if (RenderObject* object = renderer())
    146         object->setNeedsLayout(true);
     146        object->setNeedsLayout();
    147147}
    148148
     
    155155
    156156    if (RenderObject* object = renderer())
    157         object->setNeedsLayout(true);
     157        object->setNeedsLayout();
    158158}
    159159
  • trunk/Source/WebCore/svg/SVGPatternElement.cpp

    r156408 r156816  
    169169
    170170    if (RenderObject* object = renderer())
    171         object->setNeedsLayout(true);
     171        object->setNeedsLayout();
    172172}
    173173
     
    180180
    181181    if (RenderObject* object = renderer())
    182         object->setNeedsLayout(true);
     182        object->setNeedsLayout();
    183183}
    184184
  • trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp

    r156408 r156816  
    128128       
    129129    if (RenderObject* object = renderer())
    130         object->setNeedsLayout(true);
     130        object->setNeedsLayout();
    131131}
    132132
  • trunk/Source/WebCore/svg/SVGSVGElement.cpp

    r156251 r156816  
    222222{
    223223    if (RenderObject* object = renderer())
    224         object->setNeedsLayout(true);
     224        object->setNeedsLayout();
    225225
    226226    if (parentNode() == &document() && document().renderView())
Note: See TracChangeset for help on using the changeset viewer.