Index: Source/core/layout/LayoutBlock.cpp |
diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp |
index 116c979367c9b7c7fc0eb820d6eeff761531ee70..624d8a4d88b6f6eb9825d9bd49722a680ba47fd2 100644 |
--- a/Source/core/layout/LayoutBlock.cpp |
+++ b/Source/core/layout/LayoutBlock.cpp |
@@ -553,27 +553,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()); |
@@ -586,7 +565,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(); |
@@ -2778,7 +2757,7 @@ static bool recalcNormalFlowChildOverflowIfNeeded(LayoutObject* layoutObject) |
bool LayoutBlock::recalcChildOverflowAfterStyleChange() |
{ |
ASSERT(childNeedsOverflowRecalcAfterStyleChange()); |
- setChildNeedsOverflowRecalcAfterStyleChange(false); |
+ clearChildNeedsOverflowRecalcAfterStyleChange(); |
bool childrenOverflowChanged = false; |
@@ -2834,7 +2813,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()) |