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

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

Issue 944073006: Remove the concept of staticly positioned absolutes. (Closed) Base URL: git@github.com:domokit/mojo.git@position
Patch Set: Created 5 years, 10 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
Index: sky/engine/core/rendering/RenderBlockFlow.cpp
diff --git a/sky/engine/core/rendering/RenderBlockFlow.cpp b/sky/engine/core/rendering/RenderBlockFlow.cpp
index 1df301dfaeefd3a105acfc73f8859b2184fea8e9..829ad8866a3f978bc2d9cd41867957d6a754995f 100644
--- a/sky/engine/core/rendering/RenderBlockFlow.cpp
+++ b/sky/engine/core/rendering/RenderBlockFlow.cpp
@@ -144,7 +144,6 @@ void RenderBlockFlow::layoutChildren(bool relayoutChildren, SubtreeLayoutScope&
if (child->isOutOfFlowPositioned()) {
child->containingBlock()->insertPositionedObject(child);
- adjustPositionedBlock(child);
continue;
}
@@ -158,21 +157,6 @@ void RenderBlockFlow::layoutChildren(bool relayoutChildren, SubtreeLayoutScope&
setLogicalHeight(std::max(logicalHeight() + afterEdge, beforeEdge + afterEdge));
}
-void RenderBlockFlow::adjustPositionedBlock(RenderBox* child)
-{
- bool hasStaticBlockPosition = child->style()->hasStaticBlockPosition();
-
- LayoutUnit logicalTop = logicalHeight();
- updateStaticInlinePositionForChild(child);
-
- RenderLayer* childLayer = child->layer();
- if (childLayer->staticBlockPosition() != logicalTop) {
- childLayer->setStaticBlockPosition(logicalTop);
- if (hasStaticBlockPosition)
- child->setChildNeedsLayout(MarkOnlyThis);
- }
-}
-
RootInlineBox* RenderBlockFlow::createAndAppendRootInlineBox()
{
RootInlineBox* rootBox = createRootInlineBox();
@@ -186,19 +170,6 @@ void RenderBlockFlow::deleteLineBoxTree()
m_lineBoxes.deleteLineBoxTree();
}
-void RenderBlockFlow::updateStaticInlinePositionForChild(RenderBox* child)
-{
- if (child->style()->isOriginalDisplayInlineType())
- setStaticInlinePositionForChild(child, startAlignedOffsetForLine(false));
- else
- setStaticInlinePositionForChild(child, startOffsetForContent());
-}
-
-void RenderBlockFlow::setStaticInlinePositionForChild(RenderBox* child, LayoutUnit inlinePosition)
-{
- child->layer()->setStaticInlinePosition(inlinePosition);
-}
-
void RenderBlockFlow::addChild(RenderObject* newChild, RenderObject* beforeChild)
{
RenderBlock::addChild(newChild, beforeChild);

Powered by Google App Engine
This is Rietveld 408576698