Changeset 156816 in webkit
- Timestamp:
- Oct 2, 2013, 7:26:52 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 69 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156815 r156816 1 2013-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 1 21 2013-10-02 Andreas Kling <akling@apple.com> 2 22 -
trunk/Source/WebCore/html/HTMLFrameSetElement.cpp
r156231 r156816 204 204 { 205 205 if (needsStyleRecalc() && renderer()) { 206 renderer()->setNeedsLayout( true);206 renderer()->setNeedsLayout(); 207 207 clearNeedsStyleRecalc(); 208 208 } -
trunk/Source/WebCore/html/RangeInputType.cpp
r156339 r156816 345 345 HTMLElement* sliderTrackElement = sliderTrackElementOf(element()); 346 346 if (sliderTrackElement->renderer()) 347 sliderTrackElement->renderer()->setNeedsLayout( true);347 sliderTrackElement->renderer()->setNeedsLayout(); 348 348 } 349 349 -
trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp
r156761 r156816 180 180 // FIXME: Make a custom Render class for the track and move the thumb positioning code there. 181 181 if (track) 182 track->setChildNeedsLayout( true,MarkOnlyThis);182 track->setChildNeedsLayout(MarkOnlyThis); 183 183 184 184 RenderFlexibleBox::layout(); … … 218 218 // renderer directly to trigger layout. 219 219 if (renderer()) 220 renderer()->setNeedsLayout( true);220 renderer()->setNeedsLayout(); 221 221 } 222 222 … … 315 315 input->setValueFromRenderer(valueString); 316 316 if (renderer()) 317 renderer()->setNeedsLayout( true);317 renderer()->setNeedsLayout(); 318 318 input->dispatchFormControlChangeEvent(); 319 319 } … … 336 336 m_inDragMode = false; 337 337 if (renderer()) 338 renderer()->setNeedsLayout( true);338 renderer()->setNeedsLayout(); 339 339 } 340 340 -
trunk/Source/WebCore/page/FrameView.cpp
r156793 r156816 920 920 921 921 if (RenderView* renderView = this->renderView()) 922 renderView->setNeedsLayout( true);922 renderView->setNeedsLayout(); 923 923 } 924 924 … … 930 930 931 931 if (RenderView* renderView = this->renderView()) 932 renderView->setNeedsLayout( true);932 renderView->setNeedsLayout(); 933 933 } 934 934 … … 1188 1188 if (body && body->renderer()) { 1189 1189 if (body->hasTagName(framesetTag) && !frameFlatteningEnabled()) { 1190 body->renderer()->setChildNeedsLayout( true);1190 body->renderer()->setChildNeedsLayout(); 1191 1191 } else if (body->hasTagName(bodyTag)) { 1192 1192 if (!m_firstLayout && m_size.height() != layoutHeight() && body->renderer()->enclosingBox()->stretchesToViewport()) 1193 body->renderer()->setChildNeedsLayout( true);1193 body->renderer()->setChildNeedsLayout(); 1194 1194 } 1195 1195 } … … 1245 1245 RenderBox* bodyRenderer = rootRenderer && document.body() ? document.body()->renderBox() : 0; 1246 1246 if (bodyRenderer && bodyRenderer->stretchesToViewport()) 1247 bodyRenderer->setChildNeedsLayout( true);1247 bodyRenderer->setChildNeedsLayout(); 1248 1248 else if (rootRenderer && rootRenderer->stretchesToViewport()) 1249 rootRenderer->setChildNeedsLayout( true);1249 rootRenderer->setChildNeedsLayout(); 1250 1250 } 1251 1251 } … … 1943 1943 1944 1944 for (auto it = m_viewportConstrainedObjects->begin(), end = m_viewportConstrainedObjects->end(); it != end; ++it) 1945 (*it)->setNeedsLayout( true);1945 (*it)->setNeedsLayout(); 1946 1946 } 1947 1947 … … 2383 2383 // Also invalidate parent frame starting from the owner element of this frame. 2384 2384 if (frame().ownerRenderer() && isInChildFrameWithFrameFlattening()) 2385 frame().ownerRenderer()->setNeedsLayout( true,MarkContainingBlockChain);2385 frame().ownerRenderer()->setNeedsLayout(MarkContainingBlockChain); 2386 2386 2387 2387 int delay = frame().document()->minimumLayoutDelay(); … … 2492 2492 2493 2493 if (RenderView* renderView = this->renderView()) 2494 renderView->setNeedsLayout( true);2494 renderView->setNeedsLayout(); 2495 2495 } 2496 2496 -
trunk/Source/WebCore/page/Page.cpp
r156751 r156816 763 763 if (!m_settings->applyPageScaleFactorInCompositor()) { 764 764 if (document->renderView()) 765 document->renderView()->setNeedsLayout( true);765 document->renderView()->setNeedsLayout(); 766 766 767 767 document->recalcStyle(Style::Force); -
trunk/Source/WebCore/rendering/FlowThreadController.h
r156250 r156816 57 57 m_isRenderNamedFlowThreadOrderDirty = dirty; 58 58 if (dirty) 59 m_view->setNeedsLayout( true);59 m_view->setNeedsLayout(); 60 60 } 61 61 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r156767 r156816 1401 1401 // Propagate layout markers only up to the child, as we are still in the middle 1402 1402 // of a layout pass 1403 child->setNormalChildNeedsLayout (true);1403 child->setNormalChildNeedsLayoutBit(true); 1404 1404 child->markShapeInsideDescendantsForLayout(); 1405 1405 child->layoutIfNeeded(); … … 1473 1473 return; 1474 1474 if (childrenInline()) { 1475 setNeedsLayout( true);1475 setNeedsLayout(); 1476 1476 return; 1477 1477 } … … 1593 1593 { 1594 1594 ASSERT_NOT_REACHED(); 1595 setNeedsLayout(false);1595 clearNeedsLayout(); 1596 1596 } 1597 1597 … … 1941 1941 // an auto value. Add a method to determine this, so that we can avoid the relayout. 1942 1942 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView()) || child->hasViewportPercentageLogicalHeight()) 1943 child->setChildNeedsLayout( true,MarkOnlyThis);1943 child->setChildNeedsLayout(MarkOnlyThis); 1944 1944 1945 1945 // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths. … … 1963 1963 if (box->normalChildNeedsLayout()) 1964 1964 break; 1965 box->setChildNeedsLayout( true,MarkOnlyThis);1965 box->setChildNeedsLayout(MarkOnlyThis); 1966 1966 1967 1967 // If the width of an image is affected by the height of a child (e.g., an image with an aspect ratio), … … 1990 1990 lineBoxes.add(&toRenderBox(o)->inlineBoxWrapper()->root()); 1991 1991 } else if (o->isText() || (o->isRenderInline() && !walker.atEndOfInline())) 1992 o-> setNeedsLayout(false);1992 o->clearNeedsLayout(); 1993 1993 } 1994 1994 … … 2052 2052 updateScrollInfoAfterLayout(); 2053 2053 2054 setNeedsLayout(false);2054 clearNeedsLayout(); 2055 2055 return true; 2056 2056 } … … 2078 2078 LayoutUnit newLeft = computedValues.m_position; 2079 2079 if (newLeft != box->logicalLeft()) 2080 child->setChildNeedsLayout(true,MarkOnlyThis);2080 box->setChildNeedsLayout(MarkOnlyThis); 2081 2081 } else if (hasStaticBlockPosition) { 2082 2082 LayoutUnit oldTop = box->logicalTop(); 2083 2083 box->updateLogicalHeight(); 2084 2084 if (box->logicalTop() != oldTop) 2085 child->setChildNeedsLayout(true,MarkOnlyThis);2085 box->setChildNeedsLayout(MarkOnlyThis); 2086 2086 } 2087 2087 } … … 2117 2117 // positioned explicitly) this should not incur a performance penalty. 2118 2118 if (relayoutChildren || (r->style()->hasStaticBlockPosition(isHorizontalWritingMode()) && r->parent() != this)) 2119 r->setChildNeedsLayout( true,MarkOnlyThis);2119 r->setChildNeedsLayout(MarkOnlyThis); 2120 2120 2121 2121 // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths. … … 2129 2129 // and we hit the available width constraint, the layoutIfNeeded() will catch it and do a full layout. 2130 2130 if (r->needsPositionedMovementLayoutOnly() && r->tryLayoutDoingPositionedMovementOnly()) 2131 r-> setNeedsLayout(false);2131 r->clearNeedsLayout(); 2132 2132 2133 2133 // If we are paginated or in a line grid, go ahead and compute a vertical position for our object now. … … 2147 2147 // Lay out again if our estimate was wrong. 2148 2148 if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop) { 2149 r->setChildNeedsLayout( true,MarkOnlyThis);2149 r->setChildNeedsLayout(MarkOnlyThis); 2150 2150 r->layoutIfNeeded(); 2151 2151 } 2152 2152 2153 2153 if (updateRegionRangeForBoxChild(r)) { 2154 r->setNeedsLayout( true,MarkOnlyThis);2154 r->setNeedsLayout(MarkOnlyThis); 2155 2155 r->layoutIfNeeded(); 2156 2156 } … … 2169 2169 for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin(); it != end; ++it) { 2170 2170 r = *it; 2171 r->setChildNeedsLayout( true);2171 r->setChildNeedsLayout(); 2172 2172 } 2173 2173 } … … 2181 2181 2182 2182 if (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(this, logicalTop()) != pageLogicalOffset())) 2183 setChildNeedsLayout( true,MarkOnlyThis);2183 setChildNeedsLayout(MarkOnlyThis); 2184 2184 } 2185 2185 … … 3239 3239 if (!o || r->isDescendantOf(o)) { 3240 3240 if (containingBlockState == NewContainingBlock) 3241 r->setChildNeedsLayout( true,MarkOnlyThis);3241 r->setChildNeedsLayout(MarkOnlyThis); 3242 3242 3243 3243 // It is parent blocks job to add positioned child to positioned objects list of its containing block 3244 3244 // Parent layout needs to be invalidated to ensure this happens. 3245 Render Object* p = r->parent();3245 RenderElement* p = r->parent(); 3246 3246 while (p && !p->isRenderBlock()) 3247 3247 p = p->parent(); 3248 3248 if (p) 3249 p->setChildNeedsLayout( true);3249 p->setChildNeedsLayout(); 3250 3250 3251 3251 deadObjects.append(r); … … 3288 3288 bool isChildRenderBlock = o->isRenderBlock(); 3289 3289 if (isChildRenderBlock && !o->needsLayout() && view().layoutState()->pageLogicalHeightChanged()) 3290 o->setChildNeedsLayout( true,MarkOnlyThis);3290 o->setChildNeedsLayout(MarkOnlyThis); 3291 3291 3292 3292 bool needsBlockDirectionLocationSetBeforeLayout = isChildRenderBlock && view().layoutState()->needsBlockDirectionLocationSetBeforeLayout(); … … 3524 3524 3525 3525 if (childBlock) 3526 childBlock->setChildNeedsLayout( true,MarkOnlyThis);3526 childBlock->setChildNeedsLayout(MarkOnlyThis); 3527 3527 childBox->layoutIfNeeded(); 3528 3528 } 3529 3529 3530 3530 if (updateRegionRangeForBoxChild(childBox)) { 3531 childBox->setNeedsLayout( true,MarkOnlyThis);3531 childBox->setNeedsLayout(MarkOnlyThis); 3532 3532 childBox->layoutIfNeeded(); 3533 3533 } … … 3932 3932 3933 3933 MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainingBlockChain; 3934 setChildNeedsLayout( true,markParents);3934 setChildNeedsLayout(markParents); 3935 3935 3936 3936 if (floatToRemove) … … 4030 4030 // from previous siblings when negative margins exist on a child (see the addOverhangingFloats call at the end of collapseMargins). 4031 4031 if (childLogicalWidthAtOldLogicalTopOffset != childLogicalWidthAtNewLogicalTopOffset) 4032 child->setChildNeedsLayout( true,MarkOnlyThis);4032 child->setChildNeedsLayout(MarkOnlyThis); 4033 4033 return newLogicalTop - logicalTop; 4034 4034 } -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r156738 r156816 393 393 } 394 394 395 setNeedsLayout(false);395 clearNeedsLayout(); 396 396 } 397 397 … … 537 537 // change (because it has more available line width). 538 538 // So go ahead and mark the item as dirty. 539 child->setChildNeedsLayout( true,MarkOnlyThis);539 child->setChildNeedsLayout(MarkOnlyThis); 540 540 } 541 541 … … 552 552 553 553 if (updateRegionRangeForBoxChild(child)) { 554 child->setNeedsLayout( true,MarkOnlyThis);554 child->setNeedsLayout(MarkOnlyThis); 555 555 child->layoutIfNeeded(); 556 556 } … … 625 625 childLayer->setStaticBlockPosition(logicalTop); 626 626 if (hasStaticBlockPosition) 627 child->setChildNeedsLayout( true,MarkOnlyThis);627 child->setChildNeedsLayout(MarkOnlyThis); 628 628 } 629 629 } … … 1266 1266 // change (because it has more available line width). 1267 1267 // So go ahead and mark the item as dirty. 1268 child->setChildNeedsLayout( true,MarkOnlyThis);1268 child->setChildNeedsLayout(MarkOnlyThis); 1269 1269 } 1270 1270 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r156618 r156816 1274 1274 // determineStartPosition first will break fast/repaint/line-flow-with-floats-9.html. 1275 1275 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. 1277 1277 if (!view().doingFullRepaint() && hasLayer()) { 1278 1278 // Because we waited until we were already inside layout to discover … … 1867 1867 1868 1868 if (relayoutChildren || box->hasRelativeDimensions()) 1869 o->setChildNeedsLayout(true,MarkOnlyThis);1869 box->setChildNeedsLayout(MarkOnlyThis); 1870 1870 1871 1871 // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths. … … 1890 1890 if (layoutState.isFullLayout() || o->selfNeedsLayout()) 1891 1891 dirtyLineBoxesForRenderer(o, layoutState.isFullLayout()); 1892 o-> setNeedsLayout(false);1892 o->clearNeedsLayout(); 1893 1893 } 1894 1894 } … … 3451 3451 setLogicalTopForChild(o, logicalTopForChild(o) + marginBeforeForChild(o) + paginationStrut); 3452 3452 if (o->isRenderBlock()) 3453 toRenderBlock(o)->setChildNeedsLayout( true,MarkOnlyThis);3453 toRenderBlock(o)->setChildNeedsLayout(MarkOnlyThis); 3454 3454 o->layoutIfNeeded(); 3455 3455 // Save the old logical top before calling removePlacedObject which will set -
trunk/Source/WebCore/rendering/RenderBox.cpp
r156767 r156816 284 284 repaint(); 285 285 else if (newStyle->hasOutOfFlowPosition()) 286 parent()->setChildNeedsLayout( true);286 parent()->setChildNeedsLayout(); 287 287 if (isFloating() && !isOutOfFlowPositioned() && newStyle->hasOutOfFlowPosition()) 288 288 removeFloatingOrPositionedChildFromBlockLists(); … … 312 312 if (isOutOfFlowPositioned() && newStyle->hasStaticBlockPosition(isHorizontalWritingMode()) && oldStyle->marginBefore() != newStyle->marginBefore() 313 313 && parent() && !parent()->normalChildNeedsLayout()) 314 parent()->setChildNeedsLayout( true);314 parent()->setChildNeedsLayout(); 315 315 } 316 316 … … 451 451 RenderObject* child = firstChild(); 452 452 if (!child) { 453 setNeedsLayout(false);453 clearNeedsLayout(); 454 454 return; 455 455 } … … 463 463 statePusher.pop(); 464 464 invalidateBackgroundObscurationStatus(); 465 setNeedsLayout(false);465 clearNeedsLayout(); 466 466 } 467 467 … … 1963 1963 rootBox.block().setStaticInlinePositionForChild(this, rootBox.lineTopWithLeading(), roundedLayoutUnit(box->logicalLeft())); 1964 1964 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. 1966 1966 } else { 1967 1967 // Our object was a block originally, so we make our normal flow position be … … 1971 1971 layer()->setStaticBlockPosition(box->logicalTop()); 1972 1972 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. 1974 1974 } 1975 1975 -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r156738 r156816 352 352 repainter.repaintAfterLayout(); 353 353 354 setNeedsLayout(false);354 clearNeedsLayout(); 355 355 } 356 356 … … 365 365 child->clearOverrideSize(); 366 366 if (!relayoutChildren) 367 child->setChildNeedsLayout( true,MarkOnlyThis);367 child->setChildNeedsLayout(MarkOnlyThis); 368 368 haveFlex = true; 369 369 unsigned int flexGroup = child->style()->boxFlexGroup(); … … 426 426 for (RenderBox* child = iterator.first(); child; child = iterator.next()) { 427 427 if (relayoutChildren) 428 child->setChildNeedsLayout( true,MarkOnlyThis);428 child->setChildNeedsLayout(MarkOnlyThis); 429 429 430 430 if (child->isOutOfFlowPositioned()) … … 490 490 childLayer->setStaticBlockPosition(yPos); 491 491 if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode())) 492 child->setChildNeedsLayout( true,MarkOnlyThis);492 child->setChildNeedsLayout(MarkOnlyThis); 493 493 } 494 494 continue; … … 510 510 child->updateLogicalHeight(); 511 511 if (oldChildHeight != child->height()) 512 child->setChildNeedsLayout( true,MarkOnlyThis);512 child->setChildNeedsLayout(MarkOnlyThis); 513 513 514 514 if (!child->needsLayout()) … … 728 728 // Make sure we relayout children if we need it. 729 729 if (!haveLineClamp && relayoutChildren) 730 child->setChildNeedsLayout( true,MarkOnlyThis);730 child->setChildNeedsLayout(MarkOnlyThis); 731 731 732 732 if (child->isOutOfFlowPositioned()) { … … 737 737 childLayer->setStaticBlockPosition(height()); 738 738 if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode())) 739 child->setChildNeedsLayout( true,MarkOnlyThis);739 child->setChildNeedsLayout(MarkOnlyThis); 740 740 } 741 741 continue; … … 956 956 if (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())) 957 957 || (child->style()->height().isAuto() && child->isRenderBlock())) { 958 child->setChildNeedsLayout( true,MarkOnlyThis);958 child->setChildNeedsLayout(MarkOnlyThis); 959 959 960 960 // Dirty all the positioned objects. … … 989 989 continue; 990 990 991 child->setChildNeedsLayout( true,MarkOnlyThis);991 child->setChildNeedsLayout(MarkOnlyThis); 992 992 child->setOverrideLogicalContentHeight(newHeight - child->borderAndPaddingHeight()); 993 993 child->layoutIfNeeded(); … … 1056 1056 if ((child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())) 1057 1057 || (child->style()->height().isAuto() && child->isRenderBlock())) { 1058 child->setChildNeedsLayout( true);1058 child->setChildNeedsLayout(); 1059 1059 1060 1060 if (child->isRenderBlock()) { -
trunk/Source/WebCore/rendering/RenderElement.cpp
r156779 r156816 559 559 setPreferredLogicalWidthsDirty(true); 560 560 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. 562 562 563 563 if (AXObjectCache* cache = document().axObjectCache()) … … 996 996 } 997 997 998 void 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 1013 void RenderElement::clearChildNeedsLayout() 1014 { 1015 setNormalChildNeedsLayoutBit(false); 1016 setPosChildNeedsLayoutBit(false); 1017 setNeedsSimplifiedNormalFlowLayoutBit(false); 1018 setNormalChildNeedsLayoutBit(false); 1019 setNeedsPositionedMovementLayoutBit(false); 1020 } 1021 1022 void RenderElement::setNeedsSimplifiedNormalFlowLayout() 1023 { 1024 ASSERT(!isSetNeedsLayoutForbidden()); 1025 if (needsSimplifiedNormalFlowLayout()) 1026 return; 1027 setNeedsSimplifiedNormalFlowLayoutBit(true); 1028 markContainingBlocksForLayout(); 1029 if (hasLayer()) 1030 setLayerNeedsFullRepaint(); 1031 } 1032 998 1033 RenderElement* RenderElement::rendererForRootBackground() 999 1034 { -
trunk/Source/WebCore/rendering/RenderElement.h
r156738 r156816 83 83 void setAncestorLineBoxDirty(bool f = true); 84 84 85 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain); 86 void clearChildNeedsLayout(); 87 void setNeedsPositionedMovementLayout(const RenderStyle* oldStyle); 88 void setNeedsSimplifiedNormalFlowLayout(); 89 85 90 // 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. 86 91 RenderElement* rendererForRootBackground(); … … 170 175 m_ancestorLineBoxDirty = f; 171 176 if (m_ancestorLineBoxDirty) 172 setNeedsLayout(true); 177 setNeedsLayout(); 178 } 179 180 inline void RenderElement::setChildNeedsLayout(MarkingBehavior markParents) 181 { 182 ASSERT(!isSetNeedsLayoutForbidden()); 183 if (normalChildNeedsLayout()) 184 return; 185 setNormalChildNeedsLayoutBit(true); 186 if (markParents == MarkContainingBlockChain) 187 markContainingBlocksForLayout(); 173 188 } 174 189 … … 285 300 } 286 301 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 NDEBUG308 checkBlockPositionedObjectsNeedLayout();309 #endif310 }311 }312 313 302 inline RenderElement* ContainerNode::renderer() const 314 303 { -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp
r156761 r156816 476 476 } 477 477 478 setNeedsLayout(false);478 clearNeedsLayout(); 479 479 480 480 LayoutSize newSize = contentBoxRect().size(); … … 516 516 childBox->style()->setHeight(Length(newSize.height(), Fixed)); 517 517 childBox->style()->setWidth(Length(newSize.width(), Fixed)); 518 childBox->setNeedsLayout( true,MarkOnlyThis);518 childBox->setNeedsLayout(MarkOnlyThis); 519 519 childBox->layout(); 520 setChildNeedsLayout(false);520 clearChildNeedsLayout(); 521 521 522 522 statePusher.pop(); -
trunk/Source/WebCore/rendering/RenderFieldset.cpp
r155680 r156816 67 67 if (legend) { 68 68 if (relayoutChildren) 69 legend->setNeedsLayout( true);69 legend->setNeedsLayout(); 70 70 legend->layoutIfNeeded(); 71 71 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r156738 r156816 317 317 EAlignItems previousAlignment = resolveAlignment(oldStyle, child->style()); 318 318 if (previousAlignment == AlignStretch && previousAlignment != resolveAlignment(style(), child->style())) 319 child->setChildNeedsLayout( true,MarkOnlyThis);319 child->setChildNeedsLayout(MarkOnlyThis); 320 320 } 321 321 } … … 386 386 repainter.repaintAfterLayout(); 387 387 388 setNeedsLayout(false);388 clearNeedsLayout(); 389 389 } 390 390 … … 752 752 if (hasOrthogonalFlow(child)) { 753 753 if (hasOverrideSize) 754 child->setChildNeedsLayout( true,MarkOnlyThis);754 child->setChildNeedsLayout(MarkOnlyThis); 755 755 child->layoutIfNeeded(); 756 756 } … … 1098 1098 childLayer->setStaticBlockPosition(staticBlockPosition); 1099 1099 if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode())) 1100 child->setChildNeedsLayout( true,MarkOnlyThis);1100 child->setChildNeedsLayout(MarkOnlyThis); 1101 1101 } 1102 1102 } … … 1172 1172 // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905. 1173 1173 if (needToStretchChild(child) || childPreferredSize != mainAxisExtentForChild(child)) 1174 child->setChildNeedsLayout( true,MarkOnlyThis);1174 child->setChildNeedsLayout(MarkOnlyThis); 1175 1175 else { 1176 1176 // To avoid double applying margin changes in updateAutoMarginsInCrossAxis, we reset the margins here. … … 1406 1406 child->setOverrideLogicalContentHeight(desiredLogicalHeight - child->borderAndPaddingLogicalHeight()); 1407 1407 child->setLogicalHeight(0); 1408 child->setChildNeedsLayout( true,MarkOnlyThis);1408 child->setChildNeedsLayout(MarkOnlyThis); 1409 1409 child->layout(); 1410 1410 } … … 1418 1418 if (childWidth != child->logicalWidth()) { 1419 1419 child->setOverrideLogicalContentWidth(childWidth - child->borderAndPaddingLogicalWidth()); 1420 child->setChildNeedsLayout( true,MarkOnlyThis);1420 child->setChildNeedsLayout(MarkOnlyThis); 1421 1421 child->layout(); 1422 1422 } -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r156767 r156816 127 127 m_breakBeforeToRegionMap.clear(); 128 128 m_breakAfterToRegionMap.clear(); 129 setNeedsLayout( true);129 setNeedsLayout(); 130 130 131 131 m_regionsInvalidated = true; … … 966 966 // FIXME: We need to find a way to avoid marking all the regions ancestors for layout 967 967 // as we are already inside layout. 968 region->setNeedsLayout( true);968 region->setNeedsLayout(); 969 969 } 970 970 } -
trunk/Source/WebCore/rendering/RenderFrameBase.cpp
r156285 r156816 62 62 if (childFrameView) 63 63 childFrameView->layout(); 64 setNeedsLayout(false);64 clearNeedsLayout(); 65 65 return; 66 66 } … … 99 99 ASSERT(!childRoot->firstChild() || !childRoot->firstChild()->firstChildSlow() || !childRoot->firstChild()->firstChildSlow()->needsLayout()); 100 100 101 setNeedsLayout(false);101 clearNeedsLayout(); 102 102 } 103 103 -
trunk/Source/WebCore/rendering/RenderFrameSet.cpp
r156738 r156816 489 489 } 490 490 491 setNeedsLayout(false);491 clearNeedsLayout(); 492 492 } 493 493 … … 514 514 child->setWidth(width); 515 515 child->setHeight(height); 516 child->setNeedsLayout( true);516 child->setNeedsLayout(); 517 517 child->layout(); 518 518 } … … 531 531 child->setWidth(0); 532 532 child->setHeight(0); 533 child-> setNeedsLayout(false);533 child->clearNeedsLayout(); 534 534 } 535 535 } … … 568 568 child->setHeight(height); 569 569 570 child->setNeedsLayout( true);570 child->setNeedsLayout(); 571 571 572 572 if (child->isFrameSet()) … … 612 612 613 613 // update to final size 614 child->setNeedsLayout( true);614 child->setNeedsLayout(); 615 615 if (child->isFrameSet()) 616 616 toRenderFrameSet(child)->layout(); … … 639 639 child->setWidth(0); 640 640 child->setHeight(0); 641 child-> setNeedsLayout(false);641 child->clearNeedsLayout(); 642 642 } 643 643 } … … 671 671 axis.m_deltas[axis.m_splitBeingResized - 1] += delta; 672 672 axis.m_deltas[axis.m_splitBeingResized] -= delta; 673 setNeedsLayout( true);673 setNeedsLayout(); 674 674 } 675 675 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r156738 r156816 185 185 repainter.repaintAfterLayout(); 186 186 187 setNeedsLayout(false);187 clearNeedsLayout(); 188 188 } 189 189 … … 368 368 // 2) Relayout if the column track's used breadth changed OR the logical height is unavailable. 369 369 if (!child->needsLayout()) 370 child->setNeedsLayout( true,MarkOnlyThis);370 child->setNeedsLayout(MarkOnlyThis); 371 371 372 372 child->setOverrideContainingBlockContentLogicalWidth(gridAreaBreadthForChild(child, ForColumns, columnTracks)); … … 675 675 LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadthForChild(child, ForRows, rowTracks); 676 676 if (oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth || oldOverrideContainingBlockContentLogicalHeight != overrideContainingBlockContentLogicalHeight) 677 child->setNeedsLayout( true,MarkOnlyThis);677 child->setNeedsLayout(MarkOnlyThis); 678 678 679 679 child->setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth); -
trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp
r156155 r156816 112 112 113 113 if (!selfNeedsLayout()) 114 setNeedsLayout( true);114 setNeedsLayout(); 115 115 } 116 116 -
trunk/Source/WebCore/rendering/RenderIFrame.cpp
r155806 r156816 174 174 updateLayerTransform(); 175 175 176 setNeedsLayout(false);176 clearNeedsLayout(); 177 177 } 178 178 -
trunk/Source/WebCore/rendering/RenderImage.cpp
r156613 r156816 263 263 shouldRepaint = false; 264 264 if (!selfNeedsLayout()) 265 setNeedsLayout( true);265 setNeedsLayout(); 266 266 } 267 267 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r156738 r156816 198 198 if (oldStyle && alwaysCreateLineBoxes) { 199 199 dirtyLineBoxes(false); 200 setNeedsLayout( true);200 setNeedsLayout(); 201 201 } 202 202 m_alwaysCreateLineBoxes = alwaysCreateLineBoxes; -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r156622 r156816 3160 3160 // Our proprietary overflow: overlay value doesn't trigger a layout. 3161 3161 m_inOverflowRelayout = true; 3162 renderer().setNeedsLayout( true,MarkOnlyThis);3162 renderer().setNeedsLayout(MarkOnlyThis); 3163 3163 if (renderer().isRenderBlock()) { 3164 3164 RenderBlock& block = toRenderBlock(renderer()); -
trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp
r156738 r156816 143 143 if (!layer() && layerCreationAllowedForSubtree()) { 144 144 if (s_wasFloating && isFloating()) 145 setChildNeedsLayout( true);145 setChildNeedsLayout(); 146 146 ensureLayer(); 147 147 if (parent() && !needsLayout() && containingBlock()) { … … 157 157 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_layer 158 158 if (s_wasFloating && isFloating()) 159 setChildNeedsLayout( true);159 setChildNeedsLayout(); 160 160 if (s_hadTransform) 161 161 setNeedsLayoutAndPrefWidthsRecalc(); … … 165 165 layer()->styleChanged(diff, oldStyle); 166 166 if (s_hadLayer && layer()->isSelfPaintingLayer() != s_layerWasSelfPainting) 167 setChildNeedsLayout( true);167 setChildNeedsLayout(); 168 168 } 169 169 -
trunk/Source/WebCore/rendering/RenderListMarker.cpp
r156738 r156816 1408 1408 setMarginEnd(endMargin.value()); 1409 1409 1410 setNeedsLayout(false);1410 clearNeedsLayout(); 1411 1411 } 1412 1412 -
trunk/Source/WebCore/rendering/RenderMarquee.cpp
r155374 r156816 247 247 bool activate = (m_totalLoops <= 0 || m_currentLoop < m_totalLoops); 248 248 if (activate && !m_timer.isActive()) 249 m_layer->renderer().setNeedsLayout( true);249 m_layer->renderer().setNeedsLayout(); 250 250 else if (!activate && m_timer.isActive()) 251 251 m_timer.stop(); -
trunk/Source/WebCore/rendering/RenderMedia.cpp
r156278 r156816 84 84 controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed)); 85 85 controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed)); 86 controlsRenderer->setNeedsLayout( true,MarkOnlyThis);86 controlsRenderer->setNeedsLayout(MarkOnlyThis); 87 87 controlsRenderer->layout(); 88 setChildNeedsLayout(false);88 clearChildNeedsLayout(); 89 89 90 90 statePusher.pop(); -
trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
r155825 r156816 117 117 RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(childBox); 118 118 if (multicolSet->calculateBalancedHeight(firstPass)) { 119 multicolSet->setChildNeedsLayout( true,MarkOnlyThis);119 multicolSet->setChildNeedsLayout(MarkOnlyThis); 120 120 needsRelayout = true; 121 121 } … … 125 125 // Layout again. Column balancing resulted in a new height. 126 126 neededRelayout = true; 127 m_flowThread->setChildNeedsLayout( true,MarkOnlyThis);128 setChildNeedsLayout( true,MarkOnlyThis);127 m_flowThread->setChildNeedsLayout(MarkOnlyThis); 128 setChildNeedsLayout(MarkOnlyThis); 129 129 if (firstPass) 130 130 statePusher.pop(); … … 171 171 172 172 if (relayoutChildren) 173 m_flowThread->setChildNeedsLayout( true,MarkOnlyThis);173 m_flowThread->setChildNeedsLayout(MarkOnlyThis); 174 174 175 175 setLogicalTopForChild(m_flowThread, borderAndPaddingBefore()); -
trunk/Source/WebCore/rendering/RenderObject.cpp
r156639 r156816 620 620 } 621 621 622 void 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 622 637 void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, RenderObject* newRoot) 623 638 { … … 641 656 if (!container && !object->isRenderView()) 642 657 return; 643 if ( !last->isText() &&last->style()->hasOutOfFlowPosition()) {658 if (last->style()->hasOutOfFlowPosition()) { 644 659 bool willSkipRelativelyPositionedInlines = !object->isRenderBlock() || object->isAnonymousBlock(); 645 660 // Skip relatively positioned inlines and anonymous blocks to get to the enclosing RenderBlock. … … 650 665 if (willSkipRelativelyPositionedInlines) 651 666 container = object->container(); 652 object->setPosChildNeedsLayout (true);667 object->setPosChildNeedsLayoutBit(true); 653 668 simplifiedNormalFlowLayout = true; 654 669 ASSERT(!object->isSetNeedsLayoutForbidden()); … … 656 671 if (object->needsSimplifiedNormalFlowLayout()) 657 672 return; 658 object->setNeedsSimplifiedNormalFlowLayout (true);673 object->setNeedsSimplifiedNormalFlowLayoutBit(true); 659 674 ASSERT(!object->isSetNeedsLayoutForbidden()); 660 675 } else { 661 676 if (object->normalChildNeedsLayout()) 662 677 return; 663 object->setNormalChildNeedsLayout (true);678 object->setNormalChildNeedsLayoutBit(true); 664 679 ASSERT(!object->isSetNeedsLayoutForbidden()); 665 680 } … … 2210 2225 child = child->nextSibling(); 2211 2226 } 2212 setNeedsLayout(false);2227 clearNeedsLayout(); 2213 2228 } 2214 2229 -
trunk/Source/WebCore/rendering/RenderObject.h
r156738 r156816 618 618 619 619 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(); 624 622 void setPreferredLogicalWidthsDirty(bool, MarkingBehavior = MarkContainingBlockChain); 625 623 void invalidateContainerPreferredLogicalWidths(); … … 627 625 void setNeedsLayoutAndPrefWidthsRecalc() 628 626 { 629 setNeedsLayout( true);627 setNeedsLayout(); 630 628 setPreferredLogicalWidthsDirty(true); 631 629 } … … 941 939 942 940 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); } 943 946 944 947 private: … … 1078 1081 RenderObjectBitfields m_bitfields; 1079 1082 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); }1084 1083 void setIsDragging(bool b) { m_bitfields.setIsDragging(b); } 1085 1084 void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); } … … 1116 1115 } 1117 1116 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); 1117 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents) 1118 { 1138 1119 ASSERT(!isSetNeedsLayoutForbidden()); 1139 if (!alreadyNeededLayout) { 1120 if (m_bitfields.needsLayout()) 1121 return; 1122 m_bitfields.setNeedsLayout(true); 1123 if (markParents == MarkContainingBlockChain) 1140 1124 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(); 1160 1127 } 1161 1128 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r156738 r156816 97 97 98 98 repainter.repaintAfterLayout(); 99 setNeedsLayout(false);99 clearNeedsLayout(); 100 100 } 101 101 -
trunk/Source/WebCore/rendering/RenderReplica.cpp
r156738 r156816 61 61 setFrameRect(parentBox()->borderBoxRect()); 62 62 updateLayerTransform(); 63 setNeedsLayout(false);63 clearNeedsLayout(); 64 64 } 65 65 -
trunk/Source/WebCore/rendering/RenderRubyRun.cpp
r156608 r156816 226 226 return 0; 227 227 if (relayoutChildren) 228 rt->setChildNeedsLayout( true,MarkOnlyThis);228 rt->setChildNeedsLayout(MarkOnlyThis); 229 229 rt->layoutIfNeeded(); 230 230 return rt; -
trunk/Source/WebCore/rendering/RenderScrollbar.cpp
r155825 r156816 191 191 setFrameRect(IntRect(location(), IntSize(isHorizontal ? width() : newThickness, isHorizontal ? newThickness : height()))); 192 192 if (RenderBox* box = owningRenderer()) 193 box->setChildNeedsLayout( true);193 box->setChildNeedsLayout(); 194 194 } 195 195 } -
trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp
r156738 r156816 64 64 layoutVerticalPart(); 65 65 66 setNeedsLayout(false);66 clearNeedsLayout(); 67 67 } 68 68 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r156738 r156816 415 415 if (logicalWidth() != oldLogicalWidth) { 416 416 for (unsigned i = 0; i < m_captions.size(); i++) 417 m_captions[i]->setNeedsLayout( true,MarkOnlyThis);417 m_captions[i]->setNeedsLayout(MarkOnlyThis); 418 418 } 419 419 // FIXME: The optimisation below doesn't work since the internal table … … 435 435 RenderTableSection* section = toRenderTableSection(child); 436 436 if (m_columnLogicalWidthChanged) 437 section->setChildNeedsLayout( true,MarkOnlyThis);437 section->setChildNeedsLayout(MarkOnlyThis); 438 438 section->layoutIfNeeded(); 439 439 totalSectionLogicalHeight += section->calcRowLogicalHeight(); … … 557 557 558 558 m_columnLogicalWidthChanged = false; 559 setNeedsLayout(false);559 clearNeedsLayout(); 560 560 } 561 561 -
trunk/Source/WebCore/rendering/RenderTable.h
r153380 r156816 222 222 return; 223 223 m_needsSectionRecalc = true; 224 setNeedsLayout( true);224 setNeedsLayout(); 225 225 } 226 226 -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r156622 r156816 219 219 // doesn't change the logical height. 220 220 if (intrinsicPaddingBefore != oldIntrinsicPaddingBefore || intrinsicPaddingAfter != oldIntrinsicPaddingAfter) 221 setNeedsLayout( true,MarkOnlyThis);221 setNeedsLayout(MarkOnlyThis); 222 222 } 223 223 … … 231 231 return; 232 232 233 setNeedsLayout( true,MarkOnlyThis);234 row()->setChildNeedsLayout( true,MarkOnlyThis);233 setNeedsLayout(MarkOnlyThis); 234 row()->setChildNeedsLayout(MarkOnlyThis); 235 235 236 236 if (!table()->selfNeedsLayout() && checkForRepaintDuringLayout()) … … 256 256 int newIntrinsicPaddingBefore = max<LayoutUnit>(0, intrinsicPaddingBefore() - max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline)); 257 257 setIntrinsicPaddingBefore(newIntrinsicPaddingBefore); 258 setNeedsLayout( true,MarkOnlyThis);258 setNeedsLayout(MarkOnlyThis); 259 259 layoutBlock(cellWidthChanged()); 260 260 } -
trunk/Source/WebCore/rendering/RenderTableRow.cpp
r156738 r156816 83 83 // itself. 84 84 for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) 85 cell->setChildNeedsLayout( true,MarkOnlyThis);85 cell->setChildNeedsLayout(MarkOnlyThis); 86 86 } 87 87 } … … 164 164 for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { 165 165 if (!cell->needsLayout() && paginated && view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset()) 166 cell->setChildNeedsLayout( true,MarkOnlyThis);166 cell->setChildNeedsLayout(MarkOnlyThis); 167 167 168 168 if (cell->needsLayout()) { … … 184 184 statePusher.pop(); 185 185 // RenderTableSection::layoutRows will set our logical height and width later, so it calls updateLayerTransform(). 186 setNeedsLayout(false);186 clearNeedsLayout(); 187 187 } 188 188 -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r156738 r156816 327 327 cell->clearIntrinsicPadding(); 328 328 cell->clearOverrideSize(); 329 cell->setChildNeedsLayout( true,MarkOnlyThis);329 cell->setChildNeedsLayout(MarkOnlyThis); 330 330 cell->layoutIfNeeded(); 331 331 } … … 407 407 408 408 statePusher.pop(); 409 setNeedsLayout(false);409 clearNeedsLayout(); 410 410 } 411 411 … … 567 567 // Tables with no sections do not flex. 568 568 if (!o->isTable() || toRenderTable(o)->hasSections()) { 569 o->setNeedsLayout( true,MarkOnlyThis);569 o->setNeedsLayout(MarkOnlyThis); 570 570 cellChildrenFlex = true; 571 571 } … … 583 583 if (box->normalChildNeedsLayout()) 584 584 break; 585 box->setChildNeedsLayout( true,MarkOnlyThis);585 box->setChildNeedsLayout(MarkOnlyThis); 586 586 box = box->containingBlock(); 587 587 ASSERT(box); … … 594 594 595 595 if (cellChildrenFlex) { 596 cell->setChildNeedsLayout( true,MarkOnlyThis);596 cell->setChildNeedsLayout(MarkOnlyThis); 597 597 // Alignment within a cell is based off the calculated 598 598 // height, which becomes irrelevant once the cell has … … 616 616 617 617 if (!cell->needsLayout() && view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset()) 618 cell->setChildNeedsLayout( true,MarkOnlyThis);618 cell->setChildNeedsLayout(MarkOnlyThis); 619 619 620 620 cell->layoutIfNeeded(); … … 1239 1239 1240 1240 m_grid.shrinkToFit(); 1241 setNeedsLayout( true);1241 setNeedsLayout(); 1242 1242 } 1243 1243 -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r156613 r156816 292 292 { 293 293 HTMLElement* placeholder = textFormControlElement().placeholderElement(); 294 Render Object* placeholderRenderer = placeholder ? placeholder->renderer() : 0;294 RenderElement* placeholderRenderer = placeholder ? placeholder->renderer() : 0; 295 295 if (!placeholderRenderer) 296 296 return 0; … … 299 299 // called from layout() of the parent and the placeholder layout doesn't 300 300 // affect the parent layout. 301 placeholderRenderer->setChildNeedsLayout( true,MarkOnlyThis);301 placeholderRenderer->setChildNeedsLayout(MarkOnlyThis); 302 302 } 303 303 return placeholderRenderer; -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
r156397 r156816 103 103 for (RenderObject* renderer = start; renderer != ancestor; renderer = renderer->parent()) { 104 104 ASSERT(renderer); 105 renderer->setNeedsLayout( true,MarkOnlyThis);105 renderer->setNeedsLayout(MarkOnlyThis); 106 106 } 107 107 } … … 145 145 if (innerTextRenderer && innerTextRenderer->logicalHeight() > logicalHeightLimit) { 146 146 if (desiredLogicalHeight != innerTextRenderer->logicalHeight()) 147 setNeedsLayout( true,MarkOnlyThis);147 setNeedsLayout(MarkOnlyThis); 148 148 149 149 m_desiredInnerTextLogicalHeight = desiredLogicalHeight; 150 150 151 151 innerTextRenderer->style()->setLogicalHeight(Length(desiredLogicalHeight, Fixed)); 152 innerTextRenderer->setNeedsLayout( true,MarkOnlyThis);152 innerTextRenderer->setNeedsLayout(MarkOnlyThis); 153 153 if (innerBlockRenderer) { 154 154 innerBlockRenderer->style()->setLogicalHeight(Length(desiredLogicalHeight, Fixed)); 155 innerBlockRenderer->setNeedsLayout( true,MarkOnlyThis);155 innerBlockRenderer->setNeedsLayout(MarkOnlyThis); 156 156 } 157 157 } … … 162 162 if (containerLogicalHeight > logicalHeightLimit) { 163 163 containerRenderer->style()->setLogicalHeight(Length(logicalHeightLimit, Fixed)); 164 setNeedsLayout( true,MarkOnlyThis);164 setNeedsLayout(MarkOnlyThis); 165 165 } else if (containerRenderer->logicalHeight() < contentLogicalHeight()) { 166 166 containerRenderer->style()->setLogicalHeight(Length(contentLogicalHeight(), Fixed)); 167 setNeedsLayout( true,MarkOnlyThis);167 setNeedsLayout(MarkOnlyThis); 168 168 } else 169 169 containerRenderer->style()->setLogicalHeight(Length(containerLogicalHeight, Fixed)); … … 264 264 RenderObject* innerTextRenderer = innerTextElement()->renderer(); 265 265 if (innerTextRenderer && diff == StyleDifferenceLayout) 266 innerTextRenderer->setNeedsLayout( true,MarkContainingBlockChain);266 innerTextRenderer->setNeedsLayout(MarkContainingBlockChain); 267 267 if (HTMLElement* placeholder = inputElement().placeholderElement()) 268 268 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldBeTruncated() ? CSSValueEllipsis : CSSValueClip); -
trunk/Source/WebCore/rendering/RenderVideo.cpp
r155811 r156816 93 93 setIntrinsicSize(size); 94 94 setPreferredLogicalWidthsDirty(true); 95 setNeedsLayout( true);95 setNeedsLayout(); 96 96 } 97 97 -
trunk/Source/WebCore/rendering/RenderView.cpp
r156622 r156816 303 303 bool relayoutChildren = !shouldUsePrintingLayout() && (width() != viewWidth() || height() != viewHeight()); 304 304 if (relayoutChildren) { 305 setChildNeedsLayout( true,MarkOnlyThis);305 setChildNeedsLayout(MarkOnlyThis); 306 306 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() 314 318 #if ENABLE(SVG) 315 || child->isSVGRoot()319 || box.isSVGRoot() 316 320 #endif 317 321 ) 318 child->setChildNeedsLayout(true,MarkOnlyThis);322 box.setChildNeedsLayout(MarkOnlyThis); 319 323 } 320 324 } … … 341 345 #endif 342 346 m_layoutState = 0; 343 setNeedsLayout(false);347 clearNeedsLayout(); 344 348 345 349 if (isSeamlessAncestorInFlowThread) -
trunk/Source/WebCore/rendering/RenderWidget.cpp
r155817 r156816 218 218 ASSERT(needsLayout()); 219 219 220 setNeedsLayout(false);220 clearNeedsLayout(); 221 221 } 222 222 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
r155944 r156816 83 83 84 84 // Ensure a full repaint will happen after layout finishes. 85 setNeedsLayout( true,MarkOnlyThis);85 setNeedsLayout(MarkOnlyThis); 86 86 87 87 bool hadLayoutState = view().layoutState(); … … 101 101 // Because our width changed, |child| may need layout. 102 102 if (child->maxPreferredLogicalWidth() > oldAvailableLogicalWidth) 103 child->setNeedsLayout( true,MarkOnlyThis);103 child->setNeedsLayout(MarkOnlyThis); 104 104 105 105 RenderMathMLBlock* childMathMLBlock = child->isRenderMathMLBlock() ? toRenderMathMLBlock(child) : 0; -
trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp
r156036 r156816 350 350 return; 351 351 352 setNeedsLayout( true,MarkOnlyThis);353 m_baseWrapper->setChildNeedsLayout( true,MarkOnlyThis);352 setNeedsLayout(MarkOnlyThis); 353 m_baseWrapper->setChildNeedsLayout(MarkOnlyThis); 354 354 355 355 RenderMathMLBlock::layout(); -
trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp
r155755 r156816 87 87 88 88 repainter.repaintAfterLayout(); 89 setNeedsLayout(false);89 clearNeedsLayout(); 90 90 } 91 91 -
trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp
r156738 r156816 67 67 { 68 68 StackStats::LayoutCheckPoint layoutCheckPoint; 69 setNeedsLayout(false);69 clearNeedsLayout(); 70 70 } 71 71 -
trunk/Source/WebCore/rendering/svg/RenderSVGHiddenContainer.cpp
r155755 r156816 39 39 ASSERT(needsLayout()); 40 40 SVGRenderSupport::layoutChildren(this, selfNeedsLayout()); 41 setNeedsLayout(false);41 clearNeedsLayout(); 42 42 } 43 43 -
trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp
r155755 r156816 116 116 117 117 repainter.repaintAfterLayout(); 118 setNeedsLayout(false);118 clearNeedsLayout(); 119 119 } 120 120 -
trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp
r155055 r156816 196 196 197 197 if (needsLayout && !object->documentBeingDestroyed()) 198 object->setNeedsLayout( true);198 object->setNeedsLayout(); 199 199 200 200 removeFromCacheAndInvalidateDependencies(object, needsLayout); -
trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp
r155963 r156816 194 194 continue; 195 195 SVGResourcesCache::clientStyleChanged(renderer, StyleDifferenceLayout, renderer->style()); 196 renderer->setNeedsLayout( true);196 renderer->setNeedsLayout(); 197 197 } 198 198 } -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r156155 r156816 237 237 repainter.repaintAfterLayout(); 238 238 239 setNeedsLayout(false);239 clearNeedsLayout(); 240 240 } 241 241 -
trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp
r155755 r156816 173 173 174 174 repainter.repaintAfterLayout(); 175 setNeedsLayout(false);175 clearNeedsLayout(); 176 176 } 177 177 -
trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp
r156377 r156816 439 439 440 440 repainter.repaintAfterLayout(); 441 setNeedsLayout(false);441 clearNeedsLayout(); 442 442 } 443 443 -
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp
r156285 r156816 270 270 271 271 if (needsLayout) 272 child->setNeedsLayout( true,MarkOnlyThis);272 child->setNeedsLayout(MarkOnlyThis); 273 273 274 274 if (child->needsLayout()) { -
trunk/Source/WebCore/svg/SVGClipPathElement.cpp
r156147 r156816 101 101 102 102 if (RenderObject* object = renderer()) 103 object->setNeedsLayout( true);103 object->setNeedsLayout(); 104 104 } 105 105 … … 112 112 113 113 if (RenderObject* object = renderer()) 114 object->setNeedsLayout( true);114 object->setNeedsLayout(); 115 115 } 116 116 -
trunk/Source/WebCore/svg/SVGFilterElement.cpp
r156147 r156816 101 101 102 102 if (RenderObject* object = renderer()) 103 object->setNeedsLayout( true);103 object->setNeedsLayout(); 104 104 } 105 105 … … 175 175 176 176 if (RenderObject* object = renderer()) 177 object->setNeedsLayout( true);177 object->setNeedsLayout(); 178 178 } 179 179 … … 186 186 187 187 if (RenderObject* object = renderer()) 188 object->setNeedsLayout( true);188 object->setNeedsLayout(); 189 189 } 190 190 -
trunk/Source/WebCore/svg/SVGGradientElement.cpp
r155815 r156816 124 124 125 125 if (RenderObject* object = renderer()) 126 object->setNeedsLayout( true);126 object->setNeedsLayout(); 127 127 } 128 128 … … 135 135 136 136 if (RenderObject* object = renderer()) 137 object->setNeedsLayout( true);137 object->setNeedsLayout(); 138 138 } 139 139 -
trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp
r156408 r156816 116 116 117 117 if (RenderObject* object = renderer()) 118 object->setNeedsLayout( true);118 object->setNeedsLayout(); 119 119 } 120 120 -
trunk/Source/WebCore/svg/SVGMarkerElement.cpp
r156147 r156816 177 177 178 178 if (RenderObject* object = renderer()) 179 object->setNeedsLayout( true);179 object->setNeedsLayout(); 180 180 } 181 181 … … 188 188 189 189 if (RenderObject* object = renderer()) 190 object->setNeedsLayout( true);190 object->setNeedsLayout(); 191 191 } 192 192 -
trunk/Source/WebCore/svg/SVGMaskElement.cpp
r156147 r156816 144 144 145 145 if (RenderObject* object = renderer()) 146 object->setNeedsLayout( true);146 object->setNeedsLayout(); 147 147 } 148 148 … … 155 155 156 156 if (RenderObject* object = renderer()) 157 object->setNeedsLayout( true);157 object->setNeedsLayout(); 158 158 } 159 159 -
trunk/Source/WebCore/svg/SVGPatternElement.cpp
r156408 r156816 169 169 170 170 if (RenderObject* object = renderer()) 171 object->setNeedsLayout( true);171 object->setNeedsLayout(); 172 172 } 173 173 … … 180 180 181 181 if (RenderObject* object = renderer()) 182 object->setNeedsLayout( true);182 object->setNeedsLayout(); 183 183 } 184 184 -
trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp
r156408 r156816 128 128 129 129 if (RenderObject* object = renderer()) 130 object->setNeedsLayout( true);130 object->setNeedsLayout(); 131 131 } 132 132 -
trunk/Source/WebCore/svg/SVGSVGElement.cpp
r156251 r156816 222 222 { 223 223 if (RenderObject* object = renderer()) 224 object->setNeedsLayout( true);224 object->setNeedsLayout(); 225 225 226 226 if (parentNode() == &document() && document().renderView())
Note:
See TracChangeset
for help on using the changeset viewer.