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

Unified Diff: sky/engine/core/rendering/RenderBlockFlow.cpp

Issue 700703002: Remove more float machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/rendering/RenderBlockFlow.h ('k') | sky/engine/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlockFlow.cpp
diff --git a/sky/engine/core/rendering/RenderBlockFlow.cpp b/sky/engine/core/rendering/RenderBlockFlow.cpp
index 7900ccd546e5f521dbccb75c624bf09a7d4aad30..e13861864b0a0694f29ace07ae606aaca65544e8 100644
--- a/sky/engine/core/rendering/RenderBlockFlow.cpp
+++ b/sky/engine/core/rendering/RenderBlockFlow.cpp
@@ -239,8 +239,6 @@ inline void RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, SubtreeLayou
// Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway).
computeOverflow(oldClientAfterEdge);
-
- m_descendantsWithFloatsMarkedForLayout = false;
}
void RenderBlockFlow::determineLogicalLeftPositionForChild(RenderBox* child)
@@ -260,17 +258,7 @@ void RenderBlockFlow::determineLogicalLeftPositionForChild(RenderBox* child)
if (style()->textAlign() == WEBKIT_CENTER || child->style()->marginStartUsing(style()).isAuto())
newPosition = std::max(newPosition, childMarginStart);
- setLogicalLeftForChild(child, style()->isLeftToRightDirection() ? newPosition : totalAvailableLogicalWidth - newPosition - logicalWidthForChild(child));
-}
-
-void RenderBlockFlow::setLogicalLeftForChild(RenderBox* child, LayoutUnit logicalLeft)
-{
- child->setX(logicalLeft);
-}
-
-void RenderBlockFlow::setLogicalTopForChild(RenderBox* child, LayoutUnit logicalTop)
-{
- child->setY(logicalTop);
+ child->setX(style()->isLeftToRightDirection() ? newPosition : totalAvailableLogicalWidth - newPosition - logicalWidthForChild(child));
}
void RenderBlockFlow::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo)
@@ -282,7 +270,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo)
// be correct. Only if we're wrong (when we compute the real logical top position)
// will we have to potentially relayout.
// Go ahead and position the child as though it didn't collapse with the top.
- setLogicalTopForChild(child, estimateLogicalTopPosition(child, marginInfo));
+ child->setY(estimateLogicalTopPosition(child, marginInfo));
child->layoutIfNeeded();
@@ -291,7 +279,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo)
// Now determine the correct ypos based off examination of collapsing margin
// values.
- setLogicalTopForChild(child, collapseMargins(child, marginInfo, childIsSelfCollapsing));
+ child->setY(collapseMargins(child, marginInfo, childIsSelfCollapsing));
// FIXME(sky): Is it still actually possible for the child to need layout here?
// This used to be needed for floats and/or margin collapsing.
@@ -643,8 +631,7 @@ void RenderBlockFlow::marginBeforeEstimateForChild(RenderBox* child, LayoutUnit&
break;
}
- // Give up if there is clearance on the box, since it probably won't collapse into us.
- if (!grandchildBox || grandchildBox->style()->clear() != CNONE)
+ if (!grandchildBox)
return;
// Make sure to update the block margins now for the grandchild box so that we're looking at current values.
@@ -1001,11 +988,6 @@ GapRects RenderBlockFlow::inlineSelectionGaps(RenderBlock* rootBlock, const Layo
return result;
}
-bool RenderBlockFlow::avoidsFloats() const
-{
- return RenderBox::avoidsFloats();
-}
-
LayoutUnit RenderBlockFlow::logicalLeftSelectionOffset(RenderBlock* rootBlock, LayoutUnit position)
{
LayoutUnit logicalLeft = logicalLeftOffsetForLine(position, false);
« no previous file with comments | « sky/engine/core/rendering/RenderBlockFlow.h ('k') | sky/engine/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698