Changeset 112425 in webkit


Ignore:
Timestamp:
Mar 28, 2012 12:25:02 PM (12 years ago)
Author:
eric@webkit.org
Message:

setNeedsLayout(true, false) is super confusing to read and should use an enum instead
https://bugs.webkit.org/show_bug.cgi?id=82369

Reviewed by Julien Chaffraix.

I replaced all uses of the markParents bool with a MarkingBehavior
enum (which has two values: MarkContainingBlockChain and MarkOnlyThis).
I'm not sure the naming is perfect (as it's not clear to me if markParents is
used to mean the same thing in these 3 functions), but hopefully this code is more
clear. I welcome further suggested adjustment from layout experts.

  • page/FrameView.cpp:

(WebCore::FrameView::scheduleRelayout):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::adjustPositionedBlock):
(WebCore::RenderBlock::layoutBlockChildren):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
(WebCore::RenderBlock::removePositionedObjects):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
(WebCore::RenderBlock::adjustBlockChildForPagination):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::layoutRunsAndFloats):
(WebCore::RenderBlock::layoutInlineChildren):
(WebCore::RenderBlock::positionNewFloatOnLine):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::positionLineBox):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
(WebCore::gatherFlexChildrenInfo):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateScrollInfoAfterLayout):

  • rendering/RenderMedia.cpp:

(WebCore::RenderMedia::layout):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::setPreferredLogicalWidthsDirty):

  • rendering/RenderObject.h:

(RenderObject):
(WebCore::RenderObject::setNeedsLayout):
(WebCore::RenderObject::setChildNeedsLayout):

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::layoutSpecialExcludedChild):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::layout):

  • rendering/RenderTableRow.cpp:

(WebCore::RenderTableRow::layout):

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layoutRows):

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::layoutSpecialExcludedChild):

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::layout):

  • rendering/RenderView.cpp:

(WebCore::RenderView::RenderView):
(WebCore::RenderView::layout):

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::layout):

  • rendering/mathml/RenderMathMLRow.cpp:

(WebCore::RenderMathMLRow::layout):

  • rendering/mathml/RenderMathMLSubSup.cpp:

(WebCore::RenderMathMLSubSup::layout):

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::layoutChildren):

Location:
trunk/Source/WebCore
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112424 r112425  
     12012-03-28  Eric Seidel  <eric@webkit.org>
     2
     3        setNeedsLayout(true, false) is super confusing to read and should use an enum instead
     4        https://bugs.webkit.org/show_bug.cgi?id=82369
     5
     6        Reviewed by Julien Chaffraix.
     7
     8        I replaced all uses of the markParents bool with a MarkingBehavior
     9        enum (which has two values: MarkContainingBlockChain and MarkOnlyThis).
     10        I'm not sure the naming is perfect (as it's not clear to me if markParents is
     11        used to mean the same thing in these 3 functions), but hopefully this code is more
     12        clear.  I welcome further suggested adjustment from layout experts.
     13
     14        * page/FrameView.cpp:
     15        (WebCore::FrameView::scheduleRelayout):
     16        * rendering/RenderBlock.cpp:
     17        (WebCore::RenderBlock::layoutBlock):
     18        (WebCore::RenderBlock::adjustPositionedBlock):
     19        (WebCore::RenderBlock::layoutBlockChildren):
     20        (WebCore::RenderBlock::layoutBlockChild):
     21        (WebCore::RenderBlock::layoutPositionedObjects):
     22        (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
     23        (WebCore::RenderBlock::removePositionedObjects):
     24        (WebCore::RenderBlock::insertFloatingObject):
     25        (WebCore::RenderBlock::positionNewFloats):
     26        (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
     27        (WebCore::RenderBlock::adjustBlockChildForPagination):
     28        * rendering/RenderBlockLineLayout.cpp:
     29        (WebCore::RenderBlock::layoutRunsAndFloats):
     30        (WebCore::RenderBlock::layoutInlineChildren):
     31        (WebCore::RenderBlock::positionNewFloatOnLine):
     32        * rendering/RenderBox.cpp:
     33        (WebCore::RenderBox::positionLineBox):
     34        * rendering/RenderDeprecatedFlexibleBox.cpp:
     35        (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
     36        (WebCore::gatherFlexChildrenInfo):
     37        (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
     38        (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
     39        (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
     40        * rendering/RenderFlexibleBox.cpp:
     41        (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
     42        * rendering/RenderLayer.cpp:
     43        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
     44        * rendering/RenderMedia.cpp:
     45        (WebCore::RenderMedia::layout):
     46        * rendering/RenderObject.cpp:
     47        (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
     48        * rendering/RenderObject.h:
     49        (RenderObject):
     50        (WebCore::RenderObject::setNeedsLayout):
     51        (WebCore::RenderObject::setChildNeedsLayout):
     52        * rendering/RenderRubyRun.cpp:
     53        (WebCore::RenderRubyRun::layoutSpecialExcludedChild):
     54        * rendering/RenderTable.cpp:
     55        (WebCore::RenderTable::layout):
     56        * rendering/RenderTableRow.cpp:
     57        (WebCore::RenderTableRow::layout):
     58        * rendering/RenderTableSection.cpp:
     59        (WebCore::RenderTableSection::calcRowLogicalHeight):
     60        (WebCore::RenderTableSection::layoutRows):
     61        * rendering/RenderTextControl.cpp:
     62        (WebCore::RenderTextControl::layoutSpecialExcludedChild):
     63        * rendering/RenderTextControlSingleLine.cpp:
     64        (WebCore::RenderTextControlSingleLine::layout):
     65        * rendering/RenderView.cpp:
     66        (WebCore::RenderView::RenderView):
     67        (WebCore::RenderView::layout):
     68        * rendering/mathml/RenderMathMLRoot.cpp:
     69        (WebCore::RenderMathMLRoot::layout):
     70        * rendering/mathml/RenderMathMLRow.cpp:
     71        (WebCore::RenderMathMLRow::layout):
     72        * rendering/mathml/RenderMathMLSubSup.cpp:
     73        (WebCore::RenderMathMLSubSup::layout):
     74        * rendering/svg/SVGRenderSupport.cpp:
     75        (WebCore::SVGRenderSupport::layoutChildren):
     76
    1772012-03-28  Joseph Pecoraro  <pecoraro@apple.com>
    278
  • trunk/Source/WebCore/page/FrameView.cpp

    r112325 r112425  
    20292029    // Also invalidate parent frame starting from the owner element of this frame.
    20302030    if (isInChildFrameWithFrameFlattening() && m_frame->ownerRenderer())
    2031         m_frame->ownerRenderer()->setNeedsLayout(true, true);
     2031        m_frame->ownerRenderer()->setNeedsLayout(true, MarkContainingBlockChain);
    20322032
    20332033    int delay = m_frame->document()->minimumLayoutDelay();
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r112301 r112425  
    16471647   
    16481648    if (needAnotherLayoutPass && layoutPass == NormalLayoutPass) {
    1649         setChildNeedsLayout(true, false);
     1649        setChildNeedsLayout(true, MarkOnlyThis);
    16501650        layoutBlock(false, pageLogicalHeight, PositionedFloatLayoutPass);
    16511651    } else
     
    17911791        childLayer->setStaticBlockPosition(logicalTop);
    17921792        if (hasStaticBlockPosition)
    1793             child->setChildNeedsLayout(true, false);
     1793            child->setChildNeedsLayout(true, MarkOnlyThis);
    17941794    }
    17951795}
     
    22302230                    if (box->normalChildNeedsLayout())
    22312231                        break;
    2232                     box->setChildNeedsLayout(true, false);
     2232                    box->setChildNeedsLayout(true, MarkOnlyThis);
    22332233                    box = box->containingBlock();
    22342234                    ASSERT(box);
     
    22732273        // an auto value.  Add a method to determine this, so that we can avoid the relayout.
    22742274        if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView()))
    2275             child->setChildNeedsLayout(true, false);
     2275            child->setChildNeedsLayout(true, MarkOnlyThis);
    22762276
    22772277        // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
    22782278        if (relayoutChildren && child->needsPreferredWidthsRecalculation())
    2279             child->setPreferredLogicalWidthsDirty(true, false);
     2279            child->setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
    22802280
    22812281        // Handle the four types of special elements first.  These include positioned content, floating content, compacts and
     
    23752375            // change (because it has more available line width).
    23762376            // So go ahead and mark the item as dirty.
    2377             child->setChildNeedsLayout(true, false);
     2377            child->setChildNeedsLayout(true, MarkOnlyThis);
    23782378        }
    23792379       
     
    25442544        // positioned explicitly) this should not incur a performance penalty.
    25452545        if (relayoutChildren || (r->style()->hasStaticBlockPosition(isHorizontalWritingMode()) && r->parent() != this))
    2546             r->setChildNeedsLayout(true, false);
     2546            r->setChildNeedsLayout(true, MarkOnlyThis);
    25472547           
    25482548        // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
    25492549        if (relayoutChildren && r->needsPreferredWidthsRecalculation())
    2550             r->setPreferredLogicalWidthsDirty(true, false);
     2550            r->setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
    25512551       
    25522552        if (!r->needsLayout())
     
    25792579        // Lay out again if our estimate was wrong.
    25802580        if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop) {
    2581             r->setChildNeedsLayout(true, false);
     2581            r->setChildNeedsLayout(true, MarkOnlyThis);
    25822582            r->layoutIfNeeded();
    25832583        }
     
    26092609
    26102610    if (view()->layoutState()->pageLogicalHeightChanged() || (view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(logicalTop()) != pageLogicalOffset()))
    2611         setChildNeedsLayout(true, false);
     2611        setChildNeedsLayout(true, MarkOnlyThis);
    26122612}
    26132613
     
    35283528        if (!o || r->isDescendantOf(o)) {
    35293529            if (o)
    3530                 r->setChildNeedsLayout(true, false);
     3530                r->setChildNeedsLayout(true, MarkOnlyThis);
    35313531           
    35323532            // It is parent blocks job to add positioned child to positioned objects list of its containing block
     
    35703570        bool isChildRenderBlock = o->isRenderBlock();
    35713571        if (isChildRenderBlock && !o->needsLayout() && view()->layoutState()->pageLogicalHeightChanged())
    3572             o->setChildNeedsLayout(true, false);
     3572            o->setChildNeedsLayout(true, MarkOnlyThis);
    35733573           
    35743574        bool needsBlockDirectionLocationSetBeforeLayout = isChildRenderBlock && view()->layoutState()->needsBlockDirectionLocationSetBeforeLayout();
     
    37833783       
    37843784                if (childBlock)
    3785                     childBlock->setChildNeedsLayout(true, false);
     3785                    childBlock->setChildNeedsLayout(true, MarkOnlyThis);
    37863786                childBox->layoutIfNeeded();
    37873787            }
     
    43864386        return;
    43874387
    4388     setChildNeedsLayout(true, !inLayout);
     4388    MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainingBlockChain;
     4389    setChildNeedsLayout(true, markParents);
    43894390 
    43904391    if (floatToRemove)
     
    69046905            // change (because it has more available line width).
    69056906            // So go ahead and mark the item as dirty.
    6906             child->setChildNeedsLayout(true, false);
     6907            child->setChildNeedsLayout(true, MarkOnlyThis);
    69076908        }
    69086909       
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r110983 r112425  
    11721172    // determineStartPosition first will break fast/repaint/line-flow-with-floats-9.html.
    11731173    if (layoutState.isFullLayout() && hasInlineChild && !selfNeedsLayout()) {
    1174         setNeedsLayout(true, false);  // Mark ourselves as needing a full layout. This way we'll repaint like
    1175         // we're supposed to.
     1174        setNeedsLayout(true, MarkOnlyThis); // Mark as needing a full layout to force us to repaint.
    11761175        RenderView* v = view();
    11771176        if (v && !v->doingFullRepaint() && hasLayer()) {
     
    14881487
    14891488                if (relayoutChildren || box->hasRelativeDimensions())
    1490                     o->setChildNeedsLayout(true, false);
     1489                    o->setChildNeedsLayout(true, MarkOnlyThis);
    14911490
    14921491                // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
    14931492                if (relayoutChildren && box->needsPreferredWidthsRecalculation())
    1494                     o->setPreferredLogicalWidthsDirty(true, false);
     1493                    o->setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
    14951494
    14961495                if (o->isPositioned())
     
    27512750            setLogicalTopForChild(o, logicalTopForChild(o) + marginBeforeForChild(o) + paginationStrut);
    27522751            if (o->isRenderBlock())
    2753                 toRenderBlock(o)->setChildNeedsLayout(true, false);
     2752                toRenderBlock(o)->setChildNeedsLayout(true, MarkOnlyThis);
    27542753            o->layoutIfNeeded();
    27552754            // Save the old logical top before calling removePlacedObject which will set
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r112336 r112425  
    15361536            root->block()->setStaticInlinePositionForChild(this, root->lineTopWithLeading(), roundedLayoutUnit(box->logicalLeft()));
    15371537            if (style()->hasStaticInlinePosition(box->isHorizontal()))
    1538                 setChildNeedsLayout(true, false); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly.
     1538                setChildNeedsLayout(true, MarkOnlyThis); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly.
    15391539        } else {
    15401540            // Our object was a block originally, so we make our normal flow position be
     
    15441544            layer()->setStaticBlockPosition(box->logicalTop());
    15451545            if (style()->hasStaticBlockPosition(box->isHorizontal()))
    1546                 setChildNeedsLayout(true, false); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly.
     1546                setChildNeedsLayout(true, MarkOnlyThis); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly.
    15471547        }
    15481548
  • trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

    r110135 r112425  
    312312
    313313    if (needAnotherLayoutPass && layoutPass == NormalLayoutPass) {
    314         setChildNeedsLayout(true, false);
     314        setChildNeedsLayout(true, MarkOnlyThis);
    315315        layoutBlock(false, pageLogicalHeight);
    316316    } else
     
    328328            child->clearOverrideSize();
    329329            if (!relayoutChildren)
    330                 child->setChildNeedsLayout(true, false);
     330                child->setChildNeedsLayout(true, MarkOnlyThis);
    331331            haveFlex = true;
    332332            unsigned int flexGroup = child->style()->boxFlexGroup();
     
    375375            // make sure we relayout children if we need it.
    376376            if (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())))
    377                 child->setChildNeedsLayout(true, false);
     377                child->setChildNeedsLayout(true, MarkOnlyThis);
    378378
    379379            if (child->isPositioned())
     
    432432                    childLayer->setStaticBlockPosition(yPos);
    433433                    if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode()))
    434                         child->setChildNeedsLayout(true, false);
     434                        child->setChildNeedsLayout(true, MarkOnlyThis);
    435435                }
    436436                continue;
     
    449449            child->computeLogicalHeight();
    450450            if (oldChildHeight != child->height())
    451                 child->setChildNeedsLayout(true, false);
     451                child->setChildNeedsLayout(true, MarkOnlyThis);
    452452
    453453            if (!child->needsLayout())
     
    664664            // Make sure we relayout children if we need it.
    665665            if (!haveLineClamp && (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent()))))
    666                 child->setChildNeedsLayout(true, false);
     666                child->setChildNeedsLayout(true, MarkOnlyThis);
    667667
    668668            if (child->isPositioned()) {
     
    673673                    childLayer->setStaticBlockPosition(height());
    674674                    if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode()))
    675                         child->setChildNeedsLayout(true, false);
     675                        child->setChildNeedsLayout(true, MarkOnlyThis);
    676676                }
    677677                continue;
     
    886886        if (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent()))
    887887            || (child->style()->height().isAuto() && child->isBlockFlow())) {
    888             child->setChildNeedsLayout(true, false);
     888            child->setChildNeedsLayout(true, MarkOnlyThis);
    889889
    890890            // Dirty all the positioned objects.
     
    919919            continue;
    920920
    921         child->setChildNeedsLayout(true, false);
     921        child->setChildNeedsLayout(true, MarkOnlyThis);
    922922        child->setOverrideHeight(newHeight);
    923923        m_flexingChildren = true;
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r112333 r112425  
    860860        childLayer->setStaticBlockPosition(staticBlockPosition);
    861861        if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode()))
    862             child->setChildNeedsLayout(true, false);
     862            child->setChildNeedsLayout(true, MarkOnlyThis);
    863863    }
    864864}
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r112237 r112425  
    23772377                // Our proprietary overflow: overlay value doesn't trigger a layout.
    23782378                m_inOverflowRelayout = true;
    2379                 renderer()->setNeedsLayout(true, false);
     2379                renderer()->setNeedsLayout(true, MarkOnlyThis);
    23802380                if (renderer()->isRenderBlock()) {
    23812381                    RenderBlock* block = toRenderBlock(renderer());
  • trunk/Source/WebCore/rendering/RenderMedia.cpp

    r90302 r112425  
    7878    controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed));
    7979    controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed));
    80     controlsRenderer->setNeedsLayout(true, false);
     80    controlsRenderer->setNeedsLayout(true, MarkOnlyThis);
    8181    controlsRenderer->layout();
    8282    setChildNeedsLayout(false);
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r112301 r112425  
    681681}
    682682
    683 void RenderObject::setPreferredLogicalWidthsDirty(bool b, bool markParents)
     683void RenderObject::setPreferredLogicalWidthsDirty(bool shouldBeDirty, MarkingBehavior markParents)
    684684{
    685685    bool alreadyDirty = preferredLogicalWidthsDirty();
    686     m_bitfields.setPreferredLogicalWidthsDirty(b);
    687     if (b && !alreadyDirty && markParents && (isText() || !style()->isPositioned()))
     686    m_bitfields.setPreferredLogicalWidthsDirty(shouldBeDirty);
     687    if (shouldBeDirty && !alreadyDirty && markParents == MarkContainingBlockChain && (isText() || !style()->isPositioned()))
    688688        invalidateContainerPreferredLogicalWidths();
    689689}
  • trunk/Source/WebCore/rendering/RenderObject.h

    r111082 r112425  
    9898};
    9999
     100enum MarkingBehavior {
     101    MarkOnlyThis,
     102    MarkContainingBlockChain,
     103};
     104
    100105const int caretWidth = 1;
    101106
     
    559564
    560565    void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObject* newRoot = 0);
    561     void setNeedsLayout(bool b, bool markParents = true);
    562     void setChildNeedsLayout(bool b, bool markParents = true);
     566    void setNeedsLayout(bool needsLayout, MarkingBehavior = MarkContainingBlockChain);
     567    void setChildNeedsLayout(bool childNeedsLayout, MarkingBehavior = MarkContainingBlockChain);
    563568    void setNeedsPositionedMovementLayout();
    564569    void setNeedsSimplifiedNormalFlowLayout();
    565     void setPreferredLogicalWidthsDirty(bool, bool markParents = true);
     570    void setPreferredLogicalWidthsDirty(bool, MarkingBehavior = MarkContainingBlockChain);
    566571    void invalidateContainerPreferredLogicalWidths();
    567572   
     
    10351040}
    10361041
    1037 inline void RenderObject::setNeedsLayout(bool b, bool markParents)
     1042inline void RenderObject::setNeedsLayout(bool needsLayout, MarkingBehavior markParents)
    10381043{
    10391044    bool alreadyNeededLayout = m_bitfields.needsLayout();
    1040     m_bitfields.setNeedsLayout(b);
    1041     if (b) {
     1045    m_bitfields.setNeedsLayout(needsLayout);
     1046    if (needsLayout) {
    10421047        ASSERT(!isSetNeedsLayoutForbidden());
    10431048        if (!alreadyNeededLayout) {
    1044             if (markParents)
     1049            if (markParents == MarkContainingBlockChain)
    10451050                markContainingBlocksForLayout();
    10461051            if (hasLayer())
     
    10561061}
    10571062
    1058 inline void RenderObject::setChildNeedsLayout(bool b, bool markParents)
     1063inline void RenderObject::setChildNeedsLayout(bool childNeedsLayout, MarkingBehavior markParents)
    10591064{
    10601065    bool alreadyNeededLayout = normalChildNeedsLayout();
    1061     setNormalChildNeedsLayout(b);
    1062     if (b) {
     1066    setNormalChildNeedsLayout(childNeedsLayout);
     1067    if (childNeedsLayout) {
    10631068        ASSERT(!isSetNeedsLayoutForbidden());
    1064         if (!alreadyNeededLayout && markParents)
     1069        if (!alreadyNeededLayout && markParents == MarkContainingBlockChain)
    10651070            markContainingBlocksForLayout();
    10661071    } else {
  • trunk/Source/WebCore/rendering/RenderRubyRun.cpp

    r95901 r112425  
    221221        return 0;
    222222    if (relayoutChildren)
    223         rt->setChildNeedsLayout(true, false);
     223        rt->setChildNeedsLayout(true, MarkOnlyThis);
    224224    rt->layoutIfNeeded();
    225225    return rt;
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r112301 r112425  
    337337    if (logicalWidth() != oldLogicalWidth) {
    338338        for (unsigned i = 0; i < m_captions.size(); i++)
    339             m_captions[i]->setNeedsLayout(true, false);
     339            m_captions[i]->setNeedsLayout(true, MarkOnlyThis);
    340340    }
    341341    // FIXME: The optimisation below doesn't work since the internal table
  • trunk/Source/WebCore/rendering/RenderTableRow.cpp

    r105021 r112425  
    154154            RenderTableCell* cell = toRenderTableCell(child);
    155155            if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->logicalTop()) != cell->pageLogicalOffset())
    156                 cell->setChildNeedsLayout(true, false);
     156                cell->setChildNeedsLayout(true, MarkOnlyThis);
    157157
    158158            if (child->needsLayout()) {
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r112301 r112425  
    368368                cell->clearIntrinsicPadding();
    369369                cell->clearOverrideSize();
    370                 cell->setChildNeedsLayout(true, false);
     370                cell->setChildNeedsLayout(true, MarkOnlyThis);
    371371                cell->layoutIfNeeded();
    372372            }
     
    584584                    // Tables with no sections do not flex.
    585585                    if (!o->isTable() || toRenderTable(o)->hasSections()) {
    586                         o->setNeedsLayout(true, false);
     586                        o->setNeedsLayout(true, MarkOnlyThis);
    587587                        cellChildrenFlex = true;
    588588                    }
     
    600600                        if (box->normalChildNeedsLayout())
    601601                            break;
    602                         box->setChildNeedsLayout(true, false);
     602                        box->setChildNeedsLayout(true, MarkOnlyThis);
    603603                        box = box->containingBlock();
    604604                        ASSERT(box);
     
    611611
    612612            if (cellChildrenFlex) {
    613                 cell->setChildNeedsLayout(true, false);
     613                cell->setChildNeedsLayout(true, MarkOnlyThis);
    614614                // Alignment within a cell is based off the calculated
    615615                // height, which becomes irrelevant once the cell has
     
    670670
    671671            if (intrinsicPaddingBefore != oldIntrinsicPaddingBefore || intrinsicPaddingAfter != oldIntrinsicPaddingAfter)
    672                 cell->setNeedsLayout(true, false);
     672                cell->setNeedsLayout(true, MarkOnlyThis);
    673673
    674674            if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->logicalTop()) != cell->pageLogicalOffset())
    675                 cell->setChildNeedsLayout(true, false);
     675                cell->setChildNeedsLayout(true, MarkOnlyThis);
    676676
    677677            cell->layoutIfNeeded();
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r110224 r112425  
    292292        // called from layout() of the parent and the placeholder layout doesn't
    293293        // affect the parent layout.
    294         placeholderRenderer->setChildNeedsLayout(true, false);
     294        placeholderRenderer->setChildNeedsLayout(true, MarkOnlyThis);
    295295    }
    296296    return placeholderRenderer;
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r112114 r112425  
    229229    if (currentHeight > heightLimit) {
    230230        if (desiredHeight != currentHeight)
    231             setNeedsLayout(true, false);
     231            setNeedsLayout(true, MarkOnlyThis);
    232232
    233233        innerTextRenderer->style()->setHeight(Length(desiredHeight, Fixed));
     
    242242        if (containerHeight > heightLimit) {
    243243            containerRenderer->style()->setHeight(Length(heightLimit, Fixed));
    244             setNeedsLayout(true, false);
     244            setNeedsLayout(true, MarkOnlyThis);
    245245        } else if (containerRenderer->height() < contentHeight()) {
    246246            containerRenderer->style()->setHeight(Length(contentHeight(), Fixed));
    247             setNeedsLayout(true, false);
     247            setNeedsLayout(true, MarkOnlyThis);
    248248        } else
    249249            containerRenderer->style()->setHeight(Length(containerHeight, Fixed));
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r111480 r112425  
    7070    m_maxPreferredLogicalWidth = 0;
    7171
    72     setPreferredLogicalWidthsDirty(true, false);
     72    setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
    7373   
    7474    setPositioned(true); // to 0,0 :)
     
    116116    bool relayoutChildren = !printing() && (!m_frameView || width() != viewWidth() || height() != viewHeight());
    117117    if (relayoutChildren) {
    118         setChildNeedsLayout(true, false);
     118        setChildNeedsLayout(true, MarkOnlyThis);
    119119        for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    120120            if ((child->isBox() && toRenderBox(child)->hasRelativeLogicalHeight())
     
    122122                    || child->style()->logicalMinHeight().isPercent()
    123123                    || child->style()->logicalMaxHeight().isPercent())
    124                 child->setChildNeedsLayout(true, false);
     124                child->setChildNeedsLayout(true, MarkOnlyThis);
    125125        }
    126126    }
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r111636 r112425  
    235235   
    236236    setNeedsLayout(true);
    237     setPreferredLogicalWidthsDirty(true, false); // FIXME: Can this really be right?
     237    setPreferredLogicalWidthsDirty(true, MarkOnlyThis); // FIXME: Can this really be right?
    238238    RenderBlock::layout();
    239239
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp

    r110496 r112425  
    7777        if (didStretch) {
    7878            setNeedsLayout(true);
    79             setPreferredLogicalWidthsDirty(true, false);
     79            setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
    8080            RenderBlock::layout();
    8181        }
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp

    r111083 r112425  
    170170    }
    171171   
    172     setChildNeedsLayout(true, false);
     172    setChildNeedsLayout(true, MarkOnlyThis);
    173173   
    174174    RenderObject* baseWrapper = firstChild();
    175175    baseWrapper->style()->setPaddingTop(Length(basePaddingTop, Fixed));
    176     baseWrapper->setNeedsLayout(true, false);
     176    baseWrapper->setNeedsLayout(true, MarkOnlyThis);
    177177   
    178178    superscriptWrapper->style()->setPaddingBottom(Length(superPaddingBottom, Fixed));
    179     superscriptWrapper->setNeedsLayout(true, false);
    180     m_scripts->setNeedsLayout(true, false);
     179    superscriptWrapper->setNeedsLayout(true, MarkOnlyThis);
     180    m_scripts->setNeedsLayout(true, MarkOnlyThis);
    181181   
    182182    RenderBlock::layout();
  • trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp

    r112091 r112425  
    207207
    208208        if (needsLayout) {
    209             child->setNeedsLayout(true, false);
     209            child->setNeedsLayout(true, MarkOnlyThis);
    210210            child->layout();
    211211        } else {
Note: See TracChangeset for help on using the changeset viewer.