Changeset 156816 in webkit for trunk/Source/WebCore/rendering/RenderBlock.cpp
- Timestamp:
- Oct 2, 2013, 7:26:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.