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

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

Issue 1149923009: Be sure to skip objects inside out-of-flow subtrees. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « LayoutTests/fast/multicol/dynamic/insert-spanner-after-abspos-subtree-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutMultiColumnFlowThread.cpp
diff --git a/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
index 4f60c7240daeb10637561442632dcf628c2f0d75..a95cfe38f234e0192abb1db311921193d23774b8 100644
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -73,6 +73,7 @@ LayoutMultiColumnSet* LayoutMultiColumnFlowThread::lastMultiColumnSet() const
return nullptr;
}
+// Find the next layout object that has the multicol container in its containing block chain.
static LayoutObject* nextInPreOrderAfterChildrenSkippingOutOfFlow(LayoutMultiColumnFlowThread* flowThread, LayoutObject* descendant)
{
ASSERT(descendant->isDescendantOf(flowThread));
@@ -92,20 +93,15 @@ static LayoutObject* nextInPreOrderAfterChildrenSkippingOutOfFlow(LayoutMultiCol
return object;
}
+// Find the previous layout object that has the multicol container in its containing block chain.
static LayoutObject* previousInPreOrderSkippingOutOfFlow(LayoutMultiColumnFlowThread* flowThread, LayoutObject* descendant)
{
ASSERT(descendant->isDescendantOf(flowThread));
LayoutObject* object = descendant->previousInPreOrder(flowThread);
while (object && object != flowThread) {
- // Walk through the siblings and find the first one which is either in-flow or has this
- // flow thread as its containing block flow thread.
- if (!object->isOutOfFlowPositioned())
- break;
- if (object->containingBlock()->flowThreadContainingBlock() == flowThread) {
- // This out-of-flow object is still part of the flow thread, because its containing
- // block (probably relatively positioned) is part of the flow thread.
+ if (object->isColumnSpanAll() || object->flowThreadContainingBlock() == flowThread)
break;
- }
+ // We're inside something that's out-of-flow. Keep looking upwards and backwards in the tree.
object = object->previousInPreOrder(flowThread);
}
return object && object != flowThread ? object : nullptr;
« no previous file with comments | « LayoutTests/fast/multicol/dynamic/insert-spanner-after-abspos-subtree-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698