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

Unified Diff: Source/core/layout/LayoutBlock.cpp

Issue 1306993002: Cleanup friends of LayoutObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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/core/layout/LayoutBlock.h ('k') | Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBlock.cpp
diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp
index 071644dcf7896e3e7a66316d5d7dbfa7c23e415a..64f1b4291ff29b3d32dbc232207049b1b094a34d 100644
--- a/Source/core/layout/LayoutBlock.cpp
+++ b/Source/core/layout/LayoutBlock.cpp
@@ -554,27 +554,6 @@ void LayoutBlock::makeChildrenNonInline(LayoutObject *insertionPoint)
setShouldDoFullPaintInvalidation();
}
-void LayoutBlock::promoteAllChildrenAndInsertAfter()
-{
- LayoutObject* firstPromotee = firstChild();
- if (!firstPromotee)
- return;
- LayoutObject* lastPromotee = lastChild();
- LayoutBlock* parent = toLayoutBlock(this->parent());
- LayoutObject* nextSiblingOfPromotees = nextSibling();
- for (LayoutObject* o = firstPromotee; o; o = o->nextSibling())
- o->setParent(parent);
- children()->setFirstChild(nullptr);
- children()->setLastChild(nullptr);
- firstPromotee->setPreviousSibling(this);
- setNextSibling(firstPromotee);
- lastPromotee->setNextSibling(nextSiblingOfPromotees);
- if (nextSiblingOfPromotees)
- nextSiblingOfPromotees->setPreviousSibling(lastPromotee);
- if (parent->children()->lastChild() == this)
- parent->children()->setLastChild(lastPromotee);
-}
-
void LayoutBlock::removeLeftoverAnonymousBlock(LayoutBlock* child)
{
ASSERT(child->isAnonymousBlock());
@@ -587,7 +566,7 @@ void LayoutBlock::removeLeftoverAnonymousBlock(LayoutBlock* child)
// Promote all the leftover anonymous block's children (to become children of this block
// instead). We still want to keep the leftover block in the tree for a moment, for notification
// purposes done further below (flow threads and grids).
- child->promoteAllChildrenAndInsertAfter();
+ child->moveAllChildrenTo(this, child->nextSibling());
// Remove all the information in the flow thread associated with the leftover anonymous block.
child->removeFromLayoutFlowThread();
@@ -2785,7 +2764,7 @@ static bool recalcNormalFlowChildOverflowIfNeeded(LayoutObject* layoutObject)
bool LayoutBlock::recalcChildOverflowAfterStyleChange()
{
ASSERT(childNeedsOverflowRecalcAfterStyleChange());
- setChildNeedsOverflowRecalcAfterStyleChange(false);
+ clearChildNeedsOverflowRecalcAfterStyleChange();
bool childrenOverflowChanged = false;
@@ -2841,7 +2820,7 @@ bool LayoutBlock::recalcOverflowAfterStyleChange()
if (!selfNeedsOverflowRecalcAfterStyleChange() && !childrenOverflowChanged)
return false;
- setSelfNeedsOverflowRecalcAfterStyleChange(false);
+ clearSelfNeedsOverflowRecalcAfterStyleChange();
// If the current block needs layout, overflow will be recalculated during
// layout time anyway. We can safely exit here.
if (needsLayout())
« no previous file with comments | « Source/core/layout/LayoutBlock.h ('k') | Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698