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

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

Issue 1306993002: Cleanup friends of LayoutObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify 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 | « no previous file | 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 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())
« no previous file with comments | « no previous file | Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698