OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |