Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

Issue 10543041: Merge 119227 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698