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

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

Issue 1181693004: Add out-of-flow descendants of spanners to their containing blocks in time. (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 unified diff | Download patch | Annotate | Revision Log
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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } 560 }
561 } 561 }
562 previousSet->endFlow(logicalTopInFlowThread); 562 previousSet->endFlow(logicalTopInFlowThread);
563 } 563 }
564 LayoutBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox(); 564 LayoutBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox();
565 if (nextColumnBox && nextColumnBox->isLayoutMultiColumnSet()) { 565 if (nextColumnBox && nextColumnBox->isLayoutMultiColumnSet()) {
566 LayoutMultiColumnSet* nextSet = toLayoutMultiColumnSet(nextColumnBox); 566 LayoutMultiColumnSet* nextSet = toLayoutMultiColumnSet(nextColumnBox);
567 m_lastSetWorkedOn = nextSet; 567 m_lastSetWorkedOn = nextSet;
568 nextSet->beginFlow(logicalTopInFlowThread); 568 nextSet->beginFlow(logicalTopInFlowThread);
569 } 569 }
570
571 // We'll lay out of spanners after flow thread layout has finished (during l ayout of the spanner
572 // placeholders). There may be containing blocks for out-of-flow positioned descendants of the
573 // spanner in the flow thread, so that out-of-flow objects inside the spanne r will be laid out
574 // as part of flow thread layout (even if the spanner itself won't). We need to add such
575 // out-of-flow positioned objects to their containing blocks now, or they'll never get laid
576 // out. Since it's non-trivial to determine if we need this, and where such out-of-flow objects
577 // might be, just go through the whole subtree.
578 for (LayoutObject* descendant = layoutObject->slowFirstChild(); descendant; descendant = descendant->nextInPreOrder()) {
579 if (descendant->isBox() && descendant->isOutOfFlowPositioned())
580 descendant->containingBlock()->insertPositionedObject(toLayoutBox(de scendant));
581 }
582
570 return adjustment; 583 return adjustment;
571 } 584 }
572 585
573 // When processing layout objects to remove or when processing layout objects th at have just been 586 // When processing layout objects to remove or when processing layout objects th at have just been
574 // inserted, certain types of objects should be skipped. 587 // inserted, certain types of objects should be skipped.
575 static bool shouldSkipInsertedOrRemovedChild(LayoutMultiColumnFlowThread* flowTh read, const LayoutObject& child) 588 static bool shouldSkipInsertedOrRemovedChild(LayoutMultiColumnFlowThread* flowTh read, const LayoutObject& child)
576 { 589 {
577 if (child.isSVG() && !child.isSVGRoot()) { 590 if (child.isSVG() && !child.isSVGRoot()) {
578 // Don't descend into SVG objects. What's in there is of no interest, an d there might even 591 // Don't descend into SVG objects. What's in there is of no interest, an d there might even
579 // be a foreignObject there with column-span:all, which doesn't apply to us. 592 // be a foreignObject there with column-span:all, which doesn't apply to us.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 } 853 }
841 854
842 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const 855 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const
843 { 856 {
844 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) 857 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet())
845 return columnSet->pageLogicalHeight(); 858 return columnSet->pageLogicalHeight();
846 return false; 859 return false;
847 } 860 }
848 861
849 } 862 }
OLDNEW
« Source/core/layout/LayoutBlock.cpp ('K') | « Source/core/layout/LayoutBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698