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

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

Issue 1181483005: Avoid stretching the parent of a column spanner. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update unit tests that used to test the container stretching mechanism Created 5 years, 6 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 5e023afc729f20058212f4add1439ced302e50ff..423cde52e9e5ac21432e0831966b1b1ad43c20b4 100644
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -581,25 +581,13 @@ void LayoutMultiColumnFlowThread::willBeRemovedFromTree()
LayoutFlowThread::willBeRemovedFromTree();
}
-LayoutUnit LayoutMultiColumnFlowThread::skipColumnSpanner(LayoutBox* layoutObject, LayoutUnit logicalTopInFlowThread)
+void LayoutMultiColumnFlowThread::skipColumnSpanner(LayoutBox* layoutObject, LayoutUnit logicalTopInFlowThread)
{
ASSERT(layoutObject->isColumnSpanAll());
LayoutMultiColumnSpannerPlaceholder* placeholder = layoutObject->spannerPlaceholder();
- LayoutUnit adjustment;
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.
- LayoutMultiColumnSet* previousSet = toLayoutMultiColumnSet(previousColumnBox);
- if (previousSet->pageLogicalHeight()) {
- LayoutUnit columnLogicalTopInFlowThread = previousSet->pageLogicalTopForOffset(logicalTopInFlowThread);
- if (columnLogicalTopInFlowThread != logicalTopInFlowThread) {
- adjustment = columnLogicalTopInFlowThread + previousSet->pageLogicalHeight() - logicalTopInFlowThread;
- logicalTopInFlowThread += adjustment;
- }
- }
- previousSet->endFlow(logicalTopInFlowThread);
- }
+ if (previousColumnBox && previousColumnBox->isLayoutMultiColumnSet())
+ toLayoutMultiColumnSet(previousColumnBox)->endFlow(logicalTopInFlowThread);
LayoutBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox();
if (nextColumnBox && nextColumnBox->isLayoutMultiColumnSet()) {
LayoutMultiColumnSet* nextSet = toLayoutMultiColumnSet(nextColumnBox);
@@ -618,8 +606,6 @@ LayoutUnit LayoutMultiColumnFlowThread::skipColumnSpanner(LayoutBox* layoutObjec
if (descendant->isBox() && descendant->isOutOfFlowPositioned())
descendant->containingBlock()->insertPositionedObject(toLayoutBox(descendant));
}
-
- return adjustment;
}
// When processing layout objects to remove or when processing layout objects that have just been
« 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