Chromium Code Reviews| Index: Source/core/layout/LayoutBlock.cpp |
| diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp |
| index 116c979367c9b7c7fc0eb820d6eeff761531ee70..2d990569a6bf2be8d1d34d3c0c26fd7a401612de 100644 |
| --- a/Source/core/layout/LayoutBlock.cpp |
| +++ b/Source/core/layout/LayoutBlock.cpp |
| @@ -555,23 +555,7 @@ void LayoutBlock::makeChildrenNonInline(LayoutObject *insertionPoint) |
| 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); |
| + moveAllChildrenTo(toLayoutBoxModelObject(parent()), nextSibling()); |
|
mstensho (USE GERRIT)
2015/08/24 10:37:27
Might as well get rid of promoteAllChildrenAndInse
Xianzhu
2015/08/24 16:41:34
Done.
|
| } |
| void LayoutBlock::removeLeftoverAnonymousBlock(LayoutBlock* child) |
| @@ -2778,7 +2762,7 @@ static bool recalcNormalFlowChildOverflowIfNeeded(LayoutObject* layoutObject) |
| bool LayoutBlock::recalcChildOverflowAfterStyleChange() |
| { |
| ASSERT(childNeedsOverflowRecalcAfterStyleChange()); |
| - setChildNeedsOverflowRecalcAfterStyleChange(false); |
| + clearChildNeedsOverflowRecalcAfterStyleChange(); |
| bool childrenOverflowChanged = false; |
| @@ -2834,7 +2818,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()) |