Index: Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (revision 119642) |
+++ Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (working copy) |
@@ -150,6 +150,15 @@ |
return child->isPositioned() || child->style()->visibility() == COLLAPSE; |
} |
+void RenderDeprecatedFlexibleBox::styleWillChange(StyleDifference diff, const RenderStyle* newStyle) |
+{ |
+ RenderStyle* oldStyle = style(); |
+ if (oldStyle && !oldStyle->lineClamp().isNone() && newStyle->lineClamp().isNone()) |
+ clearLineClamp(); |
+ |
+ RenderBlock::styleWillChange(diff, newStyle); |
+} |
+ |
void RenderDeprecatedFlexibleBox::calcHorizontalPrefWidths() |
{ |
for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { |
@@ -975,6 +984,25 @@ |
} |
} |
+void RenderDeprecatedFlexibleBox::clearLineClamp() |
+{ |
+ FlexBoxIterator iterator(this); |
+ for (RenderBox* child = iterator.first(); child; child = iterator.next()) { |
+ if (childDoesNotAffectWidthOrFlexing(child)) |
+ continue; |
+ |
+ if ((child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())) |
+ || (child->style()->height().isAuto() && child->isBlockFlow())) { |
+ child->setChildNeedsLayout(true); |
+ |
+ if (child->isRenderBlock()) { |
+ toRenderBlock(child)->markPositionedObjectsForLayout(); |
+ toRenderBlock(child)->clearTruncation(); |
+ } |
+ } |
+ } |
+} |
+ |
void RenderDeprecatedFlexibleBox::placeChild(RenderBox* child, const LayoutPoint& location) |
{ |
LayoutRect oldRect = child->frameRect(); |