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

Side by Side Diff: Source/core/layout/LayoutMultiColumnFlowThread.cpp

Issue 1110383002: [New Multicolumn] Out-of-flow objects don't establish column sets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/multicol/dynamic/insert-before-sole-abspos-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 525 }
526 } 526 }
527 ASSERT(setToSplit || insertBefore); 527 ASSERT(setToSplit || insertBefore);
528 } 528 }
529 createAndInsertSpannerPlaceholder(toLayoutBox(layoutObject), insertB efore); 529 createAndInsertSpannerPlaceholder(toLayoutBox(layoutObject), insertB efore);
530 if (setToSplit) 530 if (setToSplit)
531 createAndInsertMultiColumnSet(insertBefore); 531 createAndInsertMultiColumnSet(insertBefore);
532 continue; 532 continue;
533 } 533 }
534 // This layoutObject is regular column content (i.e. not a spanner). Cre ate a set if necessary. 534 // This layoutObject is regular column content (i.e. not a spanner). Cre ate a set if necessary.
535 while (objectAfterSubtree) {
536 // Walk through the siblings and find the first one which is either in-flow or has this
537 // flow thread as its containing block flow thread.
538 if (!objectAfterSubtree->isOutOfFlowPositioned()) {
539 // In-flow objects are always part of the flow thread (unless it 's a spanner - but
540 // we'll deal with that further below).
541 break;
542 }
543 if (objectAfterSubtree->containingBlock()->flowThreadContainingBlock () == this) {
544 // This out-of-flow object is still part of the flow thread, bec ause its containing
545 // block (probably relatively positioned) is part of the flow th read.
546 break;
547 }
548 objectAfterSubtree = objectAfterSubtree->nextInPreOrderAfterChildren (this);
549 }
535 if (objectAfterSubtree) { 550 if (objectAfterSubtree) {
536 if (LayoutMultiColumnSpannerPlaceholder* placeholder = objectAfterSu btree->spannerPlaceholder()) { 551 if (LayoutMultiColumnSpannerPlaceholder* placeholder = objectAfterSu btree->spannerPlaceholder()) {
537 // If inserted right before a spanner, we need to make sure that there's a set for us there. 552 // If inserted right before a spanner, we need to make sure that there's a set for us there.
538 LayoutBox* previous = placeholder->previousSiblingMultiColumnBox (); 553 LayoutBox* previous = placeholder->previousSiblingMultiColumnBox ();
539 if (!previous || !previous->isLayoutMultiColumnSet()) 554 if (!previous || !previous->isLayoutMultiColumnSet())
540 createAndInsertMultiColumnSet(placeholder); 555 createAndInsertMultiColumnSet(placeholder);
541 } else { 556 } else {
542 // Otherwise, since |objectAfterSubtree| isn't a spanner, it has to mean that there's 557 // Otherwise, since |objectAfterSubtree| isn't a spanner, it has to mean that there's
543 // already a set for that content. We can use it for this layout Object too. 558 // already a set for that content. We can use it for this layout Object too.
544 ASSERT(findSetRendering(objectAfterSubtree)); 559 ASSERT(findSetRendering(objectAfterSubtree));
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 } 730 }
716 731
717 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const 732 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const
718 { 733 {
719 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) 734 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet())
720 return columnSet->pageLogicalHeight(); 735 return columnSet->pageLogicalHeight();
721 return false; 736 return false;
722 } 737 }
723 738
724 } 739 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/dynamic/insert-before-sole-abspos-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698