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

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

Issue 1124133002: Rename findSetLayoutObjects() to mapDescendantToColumnSet() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
Index: Source/core/layout/LayoutMultiColumnFlowThread.cpp
diff --git a/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
index f792bfb6ec75e5b27fe00e0bab9d9e2f923932d7..124584fd352f486ba5252524fe48fc0281c91b1f 100644
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -95,7 +95,7 @@ static LayoutObject* lastLayoutObjectInSet(LayoutMultiColumnSet* multicolSet)
return toLayoutMultiColumnSpannerPlaceholder(sibling)->layoutObjectInFlowThread()->previousInPreOrder(multicolSet->flowThread());
}
-LayoutMultiColumnSet* LayoutMultiColumnFlowThread::findSetLayoutObjects(LayoutObject* layoutObject) const
+LayoutMultiColumnSet* LayoutMultiColumnFlowThread::mapDescendantToColumnSet(LayoutObject* layoutObject) const
{
ASSERT(!containingColumnSpannerPlaceholder(layoutObject)); // should not be used for spanners or content inside them.
ASSERT(layoutObject != this);
@@ -516,8 +516,8 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWasInserted(LayoutObject*
// We're inside regular column content with both feet. Find out which column
// set this is. It needs to be split it into two sets, so that we can insert
// a new spanner placeholder between them.
- setToSplit = findSetLayoutObjects(previousLayoutObject);
- ASSERT(setToSplit == findSetLayoutObjects(objectAfterSubtree));
+ setToSplit = mapDescendantToColumnSet(previousLayoutObject);
+ ASSERT(setToSplit == mapDescendantToColumnSet(objectAfterSubtree));
setToSplit->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::ColumnsChanged);
insertBefore = setToSplit->nextSiblingMultiColumnBox();
// We've found out which set that needs to be split. Now proceed to
@@ -556,8 +556,8 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWasInserted(LayoutObject*
} else {
// Otherwise, since |objectAfterSubtree| isn't a spanner, it has to mean that there's
// already a set for that content. We can use it for this layoutObject too.
- ASSERT(findSetLayoutObjects(objectAfterSubtree));
- ASSERT(findSetLayoutObjects(layoutObject) == findSetLayoutObjects(objectAfterSubtree));
+ ASSERT(mapDescendantToColumnSet(objectAfterSubtree));
+ ASSERT(mapDescendantToColumnSet(layoutObject) == mapDescendantToColumnSet(objectAfterSubtree));
}
} else {
// Inserting at the end. Then we just need to make sure that there's a column set at the end.
@@ -623,8 +623,9 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWillBeRemoved(LayoutObject
return; // Followed by column content. Set still needed.
}
// We have now determined that, with the removal of |descendant|, we should remove a column
- // set. Locate it and remove it. Do it without involving findSetLayoutObjects(), as that might be
- // very slow. Deduce the right set from the spanner placeholders that we've already found.
+ // set. Locate it and remove it. Do it without involving mapDescendantToColumnSet(), as that
+ // might be very slow. Deduce the right set from the spanner placeholders that we've already
+ // found.
LayoutMultiColumnSet* columnSetToRemove;
if (adjacentNextSpannerPlaceholder) {
columnSetToRemove = toLayoutMultiColumnSet(adjacentNextSpannerPlaceholder->previousSiblingMultiColumnBox());
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.h ('k') | Source/core/layout/LayoutMultiColumnFlowThreadTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698