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

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

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 851ea3ee0673fa63232a7316d5469bc0443b339f..a0a73d12ee0e3c9109d12358ec579b6d2cbcbd53 100644
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -75,7 +75,7 @@ LayoutMultiColumnSet* LayoutMultiColumnFlowThread::lastMultiColumnSet() const
static LayoutObject* firstRendererInSet(LayoutMultiColumnSet* multicolSet)
{
- RenderBox* sibling = multicolSet->previousSiblingMultiColumnBox();
+ LayoutBox* sibling = multicolSet->previousSiblingMultiColumnBox();
if (!sibling)
return multicolSet->flowThread()->firstChild();
// Adjacent column content sets should not occur. We would have no way of figuring out what each
@@ -86,7 +86,7 @@ static LayoutObject* firstRendererInSet(LayoutMultiColumnSet* multicolSet)
static LayoutObject* lastRendererInSet(LayoutMultiColumnSet* multicolSet)
{
- RenderBox* sibling = multicolSet->nextSiblingMultiColumnBox();
+ LayoutBox* sibling = multicolSet->nextSiblingMultiColumnBox();
if (!sibling)
return 0; // By right we should return lastLeafChild() here, but the caller doesn't care, so just return 0.
// Adjacent column content sets should not occur. We would have no way of figuring out what each
@@ -130,7 +130,7 @@ LayoutMultiColumnSpannerPlaceholder* LayoutMultiColumnFlowThread::containingColu
// Before we spend time on searching the ancestry, see if there's a quick way to determine
// whether there might be any spanners at all.
- RenderBox* firstBox = firstMultiColumnBox();
+ LayoutBox* firstBox = firstMultiColumnBox();
if (!firstBox || (firstBox == lastMultiColumnBox() && firstBox->isLayoutMultiColumnSet()))
return 0;
@@ -158,7 +158,7 @@ void LayoutMultiColumnFlowThread::evacuateAndDestroy()
m_isBeingEvacuated = true;
// Remove all sets and spanners.
- while (RenderBox* columnBox = firstMultiColumnBox()) {
+ while (LayoutBox* columnBox = firstMultiColumnBox()) {
ASSERT(columnBox->isAnonymous());
columnBox->destroy();
}
@@ -241,7 +241,7 @@ void LayoutMultiColumnFlowThread::layoutColumns(bool relayoutChildren, SubtreeLa
return;
}
- for (RenderBox* columnBox = firstMultiColumnBox(); columnBox; columnBox = columnBox->nextSiblingMultiColumnBox()) {
+ for (LayoutBox* columnBox = firstMultiColumnBox(); columnBox; columnBox = columnBox->nextSiblingMultiColumnBox()) {
if (!columnBox->isLayoutMultiColumnSet()) {
ASSERT(columnBox->isLayoutMultiColumnSpannerPlaceholder()); // no other type is expected.
m_needsColumnHeightsRecalculation = true;
@@ -321,7 +321,7 @@ void LayoutMultiColumnFlowThread::calculateColumnCountAndWidth(LayoutUnit& width
}
}
-void LayoutMultiColumnFlowThread::createAndInsertMultiColumnSet(RenderBox* insertBefore)
+void LayoutMultiColumnFlowThread::createAndInsertMultiColumnSet(LayoutBox* insertBefore)
{
RenderBlockFlow* multicolContainer = multiColumnBlockFlow();
LayoutMultiColumnSet* newSet = LayoutMultiColumnSet::createAnonymous(*this, multicolContainer->styleRef());
@@ -334,7 +334,7 @@ void LayoutMultiColumnFlowThread::createAndInsertMultiColumnSet(RenderBox* inser
ASSERT(!newSet->nextSiblingMultiColumnBox() || !newSet->nextSiblingMultiColumnBox()->isLayoutMultiColumnSet());
}
-void LayoutMultiColumnFlowThread::createAndInsertSpannerPlaceholder(RenderBox* spanner, RenderBox* insertBefore)
+void LayoutMultiColumnFlowThread::createAndInsertSpannerPlaceholder(LayoutBox* spanner, LayoutBox* insertBefore)
{
RenderBlockFlow* multicolContainer = multiColumnBlockFlow();
LayoutMultiColumnSpannerPlaceholder* newPlaceholder = LayoutMultiColumnSpannerPlaceholder::createAnonymous(multicolContainer->styleRef(), *spanner);
@@ -410,12 +410,12 @@ void LayoutMultiColumnFlowThread::willBeRemovedFromTree()
LayoutFlowThread::willBeRemovedFromTree();
}
-LayoutUnit LayoutMultiColumnFlowThread::skipColumnSpanner(RenderBox* renderer, LayoutUnit logicalTopInFlowThread)
+LayoutUnit LayoutMultiColumnFlowThread::skipColumnSpanner(LayoutBox* renderer, LayoutUnit logicalTopInFlowThread)
{
ASSERT(renderer->isColumnSpanAll());
LayoutMultiColumnSpannerPlaceholder* placeholder = renderer->spannerPlaceholder();
LayoutUnit adjustment;
- RenderBox* previousColumnBox = placeholder->previousSiblingMultiColumnBox();
+ LayoutBox* previousColumnBox = placeholder->previousSiblingMultiColumnBox();
if (previousColumnBox && previousColumnBox->isLayoutMultiColumnSet()) {
// Pad flow thread offset to a column boundary, so that any column content that's supposed
// to come after the spanner doesn't bleed into the column row preceding the spanner.
@@ -429,7 +429,7 @@ LayoutUnit LayoutMultiColumnFlowThread::skipColumnSpanner(RenderBox* renderer, L
}
previousSet->endFlow(logicalTopInFlowThread);
}
- RenderBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox();
+ LayoutBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox();
if (nextColumnBox && nextColumnBox->isLayoutMultiColumnSet()) {
LayoutMultiColumnSet* nextSet = toLayoutMultiColumnSet(nextColumnBox);
m_lastSetWorkedOn = nextSet;
@@ -452,7 +452,7 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWasInserted(LayoutObject*
continue; // Inside a column spanner. Nothing to do, then.
if (descendantIsValidColumnSpanner(renderer)) {
// This renderer is a spanner, so it needs to establish a spanner placeholder.
- RenderBox* insertBefore = 0;
+ LayoutBox* insertBefore = 0;
LayoutMultiColumnSet* setToSplit = 0;
if (nextRenderer) {
// The spanner is inserted before something. Figure out what this entails. If the
@@ -485,7 +485,7 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWasInserted(LayoutObject*
}
ASSERT(setToSplit || insertBefore);
}
- createAndInsertSpannerPlaceholder(toRenderBox(renderer), insertBefore);
+ createAndInsertSpannerPlaceholder(toLayoutBox(renderer), insertBefore);
if (setToSplit)
createAndInsertMultiColumnSet(insertBefore);
continue;
@@ -494,7 +494,7 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWasInserted(LayoutObject*
if (nextRenderer) {
if (LayoutMultiColumnSpannerPlaceholder* placeholder = nextRenderer->spannerPlaceholder()) {
// If inserted right before a spanner, we need to make sure that there's a set for us there.
- RenderBox* previous = placeholder->previousSiblingMultiColumnBox();
+ LayoutBox* previous = placeholder->previousSiblingMultiColumnBox();
if (!previous || !previous->isLayoutMultiColumnSet())
createAndInsertMultiColumnSet(placeholder);
} else {
@@ -505,7 +505,7 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWasInserted(LayoutObject*
}
} else {
// Inserting at the end. Then we just need to make sure that there's a column set at the end.
- RenderBox* lastColumnBox = lastMultiColumnBox();
+ LayoutBox* lastColumnBox = lastMultiColumnBox();
if (!lastColumnBox || !lastColumnBox->isLayoutMultiColumnSet())
createAndInsertMultiColumnSet();
}
@@ -530,8 +530,8 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWillBeRemoved(LayoutObject
continue;
}
next = renderer->nextInPreOrderAfterChildren(descendant); // It's a spanner. Its children are of no interest to us.
- if (RenderBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox()) {
- RenderBox* previousColumnBox = placeholder->previousSiblingMultiColumnBox();
+ if (LayoutBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox()) {
+ LayoutBox* previousColumnBox = placeholder->previousSiblingMultiColumnBox();
if (nextColumnBox && nextColumnBox->isLayoutMultiColumnSet()
&& previousColumnBox && previousColumnBox->isLayoutMultiColumnSet()) {
// Need to merge two column sets.
« 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