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

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

Issue 729693003: First step at getting rid of anonymous blocks and continuations. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address review comments 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.cpp ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBox.cpp
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
index d74981f4a762a717f7a399c9c4f1bad48e99bdb9..6f6a079e1fa2dc8adf68866c8f4e269f7805d4c7 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -3473,47 +3473,6 @@ bool RenderBox::hasRelativeLogicalHeight() const
|| style()->logicalMaxHeight().isPercent();
}
-static void markBoxForRelayoutAfterSplit(RenderBox* box)
-{
- box->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
-}
-
-RenderObject* RenderBox::splitAnonymousBoxesAroundChild(RenderObject* beforeChild)
-{
- bool didSplitParentAnonymousBoxes = false;
-
- while (beforeChild->parent() != this) {
- RenderBox* boxToSplit = toRenderBox(beforeChild->parent());
- if (boxToSplit->slowFirstChild() != beforeChild && boxToSplit->isAnonymous()) {
- didSplitParentAnonymousBoxes = true;
-
- // We have to split the parent box into two boxes and move children
- // from |beforeChild| to end into the new post box.
- RenderBox* postBox = boxToSplit->createAnonymousBoxWithSameTypeAs(this);
- postBox->setChildrenInline(boxToSplit->childrenInline());
- RenderBox* parentBox = toRenderBox(boxToSplit->parent());
- // We need to invalidate the |parentBox| before inserting the new node
- // so that the table paint invalidation logic knows the structure is dirty.
- // See for example RenderTableCell:clippedOverflowRectForPaintInvalidation.
- markBoxForRelayoutAfterSplit(parentBox);
- parentBox->virtualChildren()->insertChildNode(parentBox, postBox, boxToSplit->nextSibling());
- boxToSplit->moveChildrenTo(postBox, beforeChild, 0, true);
-
- markBoxForRelayoutAfterSplit(boxToSplit);
- markBoxForRelayoutAfterSplit(postBox);
-
- beforeChild = postBox;
- } else
- beforeChild = boxToSplit;
- }
-
- if (didSplitParentAnonymousBoxes)
- markBoxForRelayoutAfterSplit(this);
-
- ASSERT(beforeChild->parent() == this);
- return beforeChild;
-}
-
void RenderBox::savePreviousBorderBoxSizeIfNeeded()
{
// If m_rareData is already created, always save.
« no previous file with comments | « sky/engine/core/rendering/RenderBlockFlow.cpp ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698