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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/layout/LayoutMultiColumnFlowThread.h" | 27 #include "core/layout/LayoutMultiColumnFlowThread.h" |
28 | 28 |
29 #include "core/layout/LayoutMultiColumnSet.h" | 29 #include "core/layout/LayoutMultiColumnSet.h" |
30 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 30 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 LayoutMultiColumnFlowThread::LayoutMultiColumnFlowThread() | 34 LayoutMultiColumnFlowThread::LayoutMultiColumnFlowThread() |
35 : m_lastSetWorkedOn(0) | 35 : m_lastSetWorkedOn(nullptr) |
36 , m_columnCount(1) | 36 , m_columnCount(1) |
37 , m_columnHeightAvailable(0) | 37 , m_columnHeightAvailable(0) |
38 , m_inBalancingPass(false) | 38 , m_inBalancingPass(false) |
39 , m_needsColumnHeightsRecalculation(false) | 39 , m_needsColumnHeightsRecalculation(false) |
40 , m_progressionIsInline(true) | 40 , m_progressionIsInline(true) |
41 , m_isBeingEvacuated(false) | 41 , m_isBeingEvacuated(false) |
42 { | 42 { |
43 setIsInsideFlowThread(true); | 43 setIsInsideFlowThread(true); |
44 } | 44 } |
45 | 45 |
46 LayoutMultiColumnFlowThread::~LayoutMultiColumnFlowThread() | 46 LayoutMultiColumnFlowThread::~LayoutMultiColumnFlowThread() |
47 { | 47 { |
48 } | 48 } |
49 | 49 |
50 LayoutMultiColumnFlowThread* LayoutMultiColumnFlowThread::createAnonymous(Docume
nt& document, const ComputedStyle& parentStyle) | 50 LayoutMultiColumnFlowThread* LayoutMultiColumnFlowThread::createAnonymous(Docume
nt& document, const ComputedStyle& parentStyle) |
51 { | 51 { |
52 LayoutMultiColumnFlowThread* layoutObject = new LayoutMultiColumnFlowThread(
); | 52 LayoutMultiColumnFlowThread* layoutObject = new LayoutMultiColumnFlowThread(
); |
53 layoutObject->setDocumentForAnonymous(&document); | 53 layoutObject->setDocumentForAnonymous(&document); |
54 layoutObject->setStyle(ComputedStyle::createAnonymousStyleWithDisplay(parent
Style, BLOCK)); | 54 layoutObject->setStyle(ComputedStyle::createAnonymousStyleWithDisplay(parent
Style, BLOCK)); |
55 return layoutObject; | 55 return layoutObject; |
56 } | 56 } |
57 | 57 |
58 LayoutMultiColumnSet* LayoutMultiColumnFlowThread::firstMultiColumnSet() const | 58 LayoutMultiColumnSet* LayoutMultiColumnFlowThread::firstMultiColumnSet() const |
59 { | 59 { |
60 for (LayoutObject* sibling = nextSibling(); sibling; sibling = sibling->next
Sibling()) { | 60 for (LayoutObject* sibling = nextSibling(); sibling; sibling = sibling->next
Sibling()) { |
61 if (sibling->isLayoutMultiColumnSet()) | 61 if (sibling->isLayoutMultiColumnSet()) |
62 return toLayoutMultiColumnSet(sibling); | 62 return toLayoutMultiColumnSet(sibling); |
63 } | 63 } |
64 return 0; | 64 return nullptr; |
65 } | 65 } |
66 | 66 |
67 LayoutMultiColumnSet* LayoutMultiColumnFlowThread::lastMultiColumnSet() const | 67 LayoutMultiColumnSet* LayoutMultiColumnFlowThread::lastMultiColumnSet() const |
68 { | 68 { |
69 for (LayoutObject* sibling = multiColumnBlockFlow()->lastChild(); sibling; s
ibling = sibling->previousSibling()) { | 69 for (LayoutObject* sibling = multiColumnBlockFlow()->lastChild(); sibling; s
ibling = sibling->previousSibling()) { |
70 if (sibling->isLayoutMultiColumnSet()) | 70 if (sibling->isLayoutMultiColumnSet()) |
71 return toLayoutMultiColumnSet(sibling); | 71 return toLayoutMultiColumnSet(sibling); |
72 } | 72 } |
73 return 0; | 73 return nullptr; |
74 } | 74 } |
75 | 75 |
76 static LayoutObject* nextInPreOrderAfterChildrenSkippingOutOfFlow(LayoutMultiCol
umnFlowThread* flowThread, LayoutObject* descendant) | 76 static LayoutObject* nextInPreOrderAfterChildrenSkippingOutOfFlow(LayoutMultiCol
umnFlowThread* flowThread, LayoutObject* descendant) |
77 { | 77 { |
78 ASSERT(descendant->isDescendantOf(flowThread)); | 78 ASSERT(descendant->isDescendantOf(flowThread)); |
79 LayoutObject* object = descendant->nextInPreOrderAfterChildren(flowThread); | 79 LayoutObject* object = descendant->nextInPreOrderAfterChildren(flowThread); |
80 while (object) { | 80 while (object) { |
81 // Walk through the siblings and find the first one which is either in-f
low or has this | 81 // Walk through the siblings and find the first one which is either in-f
low or has this |
82 // flow thread as its containing block flow thread. | 82 // flow thread as its containing block flow thread. |
83 if (!object->isOutOfFlowPositioned()) | 83 if (!object->isOutOfFlowPositioned()) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // of them contains then. | 120 // of them contains then. |
121 ASSERT(sibling->isLayoutMultiColumnSpannerPlaceholder()); | 121 ASSERT(sibling->isLayoutMultiColumnSpannerPlaceholder()); |
122 LayoutBox* spanner = toLayoutMultiColumnSpannerPlaceholder(sibling)->layoutO
bjectInFlowThread(); | 122 LayoutBox* spanner = toLayoutMultiColumnSpannerPlaceholder(sibling)->layoutO
bjectInFlowThread(); |
123 return nextInPreOrderAfterChildrenSkippingOutOfFlow(multicolSet->multiColumn
FlowThread(), spanner); | 123 return nextInPreOrderAfterChildrenSkippingOutOfFlow(multicolSet->multiColumn
FlowThread(), spanner); |
124 } | 124 } |
125 | 125 |
126 static LayoutObject* lastLayoutObjectInSet(LayoutMultiColumnSet* multicolSet) | 126 static LayoutObject* lastLayoutObjectInSet(LayoutMultiColumnSet* multicolSet) |
127 { | 127 { |
128 LayoutBox* sibling = multicolSet->nextSiblingMultiColumnBox(); | 128 LayoutBox* sibling = multicolSet->nextSiblingMultiColumnBox(); |
129 if (!sibling) | 129 if (!sibling) |
130 return 0; // By right we should return lastLeafChild() here, but the cal
ler doesn't care, so just return 0. | 130 return nullptr; // By right we should return lastLeafChild() here, but t
he caller doesn't care, so just return 0. |
131 // Adjacent column content sets should not occur. We would have no way of fi
guring out what each | 131 // Adjacent column content sets should not occur. We would have no way of fi
guring out what each |
132 // of them contains then. | 132 // of them contains then. |
133 ASSERT(sibling->isLayoutMultiColumnSpannerPlaceholder()); | 133 ASSERT(sibling->isLayoutMultiColumnSpannerPlaceholder()); |
134 LayoutBox* spanner = toLayoutMultiColumnSpannerPlaceholder(sibling)->layoutO
bjectInFlowThread(); | 134 LayoutBox* spanner = toLayoutMultiColumnSpannerPlaceholder(sibling)->layoutO
bjectInFlowThread(); |
135 return previousInPreOrderSkippingOutOfFlow(multicolSet->multiColumnFlowThrea
d(), spanner); | 135 return previousInPreOrderSkippingOutOfFlow(multicolSet->multiColumnFlowThrea
d(), spanner); |
136 } | 136 } |
137 | 137 |
138 LayoutMultiColumnSet* LayoutMultiColumnFlowThread::mapDescendantToColumnSet(Layo
utObject* layoutObject) const | 138 LayoutMultiColumnSet* LayoutMultiColumnFlowThread::mapDescendantToColumnSet(Layo
utObject* layoutObject) const |
139 { | 139 { |
140 ASSERT(!containingColumnSpannerPlaceholder(layoutObject)); // should not be
used for spanners or content inside them. | 140 ASSERT(!containingColumnSpannerPlaceholder(layoutObject)); // should not be
used for spanners or content inside them. |
141 ASSERT(layoutObject != this); | 141 ASSERT(layoutObject != this); |
142 ASSERT(layoutObject->isDescendantOf(this)); | 142 ASSERT(layoutObject->isDescendantOf(this)); |
143 ASSERT(layoutObject->containingBlock()->isDescendantOf(this)); // Out-of-flo
w objects don't belong in column sets. | 143 ASSERT(layoutObject->containingBlock()->isDescendantOf(this)); // Out-of-flo
w objects don't belong in column sets. |
144 LayoutMultiColumnSet* multicolSet = firstMultiColumnSet(); | 144 LayoutMultiColumnSet* multicolSet = firstMultiColumnSet(); |
145 if (!multicolSet) | 145 if (!multicolSet) |
146 return 0; | 146 return nullptr; |
147 if (!multicolSet->nextSiblingMultiColumnSet()) | 147 if (!multicolSet->nextSiblingMultiColumnSet()) |
148 return multicolSet; | 148 return multicolSet; |
149 | 149 |
150 // This is potentially SLOW! But luckily very uncommon. You would have to dy
namically insert a | 150 // This is potentially SLOW! But luckily very uncommon. You would have to dy
namically insert a |
151 // spanner into the middle of column contents to need this. | 151 // spanner into the middle of column contents to need this. |
152 for (; multicolSet; multicolSet = multicolSet->nextSiblingMultiColumnSet())
{ | 152 for (; multicolSet; multicolSet = multicolSet->nextSiblingMultiColumnSet())
{ |
153 LayoutObject* firstLayoutObject = firstLayoutObjectInSet(multicolSet); | 153 LayoutObject* firstLayoutObject = firstLayoutObjectInSet(multicolSet); |
154 LayoutObject* lastLayoutObject = lastLayoutObjectInSet(multicolSet); | 154 LayoutObject* lastLayoutObject = lastLayoutObjectInSet(multicolSet); |
155 ASSERT(firstLayoutObject); | 155 ASSERT(firstLayoutObject); |
156 | 156 |
157 for (LayoutObject* walker = firstLayoutObject; walker; walker = walker->
nextInPreOrder(this)) { | 157 for (LayoutObject* walker = firstLayoutObject; walker; walker = walker->
nextInPreOrder(this)) { |
158 if (walker == layoutObject) | 158 if (walker == layoutObject) |
159 return multicolSet; | 159 return multicolSet; |
160 if (walker == lastLayoutObject) | 160 if (walker == lastLayoutObject) |
161 break; | 161 break; |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 return 0; | 165 return nullptr; |
166 } | 166 } |
167 | 167 |
168 LayoutMultiColumnSpannerPlaceholder* LayoutMultiColumnFlowThread::containingColu
mnSpannerPlaceholder(const LayoutObject* descendant) const | 168 LayoutMultiColumnSpannerPlaceholder* LayoutMultiColumnFlowThread::containingColu
mnSpannerPlaceholder(const LayoutObject* descendant) const |
169 { | 169 { |
170 ASSERT(descendant->isDescendantOf(this)); | 170 ASSERT(descendant->isDescendantOf(this)); |
171 | 171 |
172 // Before we spend time on searching the ancestry, see if there's a quick wa
y to determine | 172 // Before we spend time on searching the ancestry, see if there's a quick wa
y to determine |
173 // whether there might be any spanners at all. | 173 // whether there might be any spanners at all. |
174 LayoutBox* firstBox = firstMultiColumnBox(); | 174 LayoutBox* firstBox = firstMultiColumnBox(); |
175 if (!firstBox || (firstBox == lastMultiColumnBox() && firstBox->isLayoutMult
iColumnSet())) | 175 if (!firstBox || (firstBox == lastMultiColumnBox() && firstBox->isLayoutMult
iColumnSet())) |
176 return 0; | 176 return nullptr; |
177 | 177 |
178 // We have spanners. See if the layoutObject in question is one or inside of
one then. | 178 // We have spanners. See if the layoutObject in question is one or inside of
one then. |
179 for (const LayoutObject* ancestor = descendant; ancestor && ancestor != this
; ancestor = ancestor->parent()) { | 179 for (const LayoutObject* ancestor = descendant; ancestor && ancestor != this
; ancestor = ancestor->parent()) { |
180 if (LayoutMultiColumnSpannerPlaceholder* placeholder = ancestor->spanner
Placeholder()) | 180 if (LayoutMultiColumnSpannerPlaceholder* placeholder = ancestor->spanner
Placeholder()) |
181 return placeholder; | 181 return placeholder; |
182 } | 182 } |
183 return 0; | 183 return nullptr; |
184 } | 184 } |
185 | 185 |
186 void LayoutMultiColumnFlowThread::populate() | 186 void LayoutMultiColumnFlowThread::populate() |
187 { | 187 { |
188 LayoutBlockFlow* multicolContainer = multiColumnBlockFlow(); | 188 LayoutBlockFlow* multicolContainer = multiColumnBlockFlow(); |
189 ASSERT(!nextSibling()); | 189 ASSERT(!nextSibling()); |
190 // Reparent children preceding the flow thread into the flow thread. It's mu
lticol content | 190 // Reparent children preceding the flow thread into the flow thread. It's mu
lticol content |
191 // now. At this point there's obviously nothing after the flow thread, but l
ayoutObjects (column | 191 // now. At this point there's obviously nothing after the flow thread, but l
ayoutObjects (column |
192 // sets and spanners) will be inserted there as we insert elements into the
flow thread. | 192 // sets and spanners) will be inserted there as we insert elements into the
flow thread. |
193 multicolContainer->moveChildrenTo(this, multicolContainer->firstChild(), thi
s, true); | 193 multicolContainer->moveChildrenTo(this, multicolContainer->firstChild(), thi
s, true); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 LayoutMultiColumnSet* previousSet = columnSet->previousSiblingMultiC
olumnSet(); | 267 LayoutMultiColumnSet* previousSet = columnSet->previousSiblingMultiC
olumnSet(); |
268 if (!previousSet) | 268 if (!previousSet) |
269 break; | 269 break; |
270 columnSet = previousSet; | 270 columnSet = previousSet; |
271 } | 271 } |
272 return columnSet; | 272 return columnSet; |
273 } | 273 } |
274 | 274 |
275 ASSERT(!m_columnSetsInvalidated); | 275 ASSERT(!m_columnSetsInvalidated); |
276 if (m_multiColumnSetList.isEmpty()) | 276 if (m_multiColumnSetList.isEmpty()) |
277 return 0; | 277 return nullptr; |
278 if (offset <= 0) | 278 if (offset <= 0) |
279 return m_multiColumnSetList.first(); | 279 return m_multiColumnSetList.first(); |
280 | 280 |
281 MultiColumnSetSearchAdapter adapter(offset); | 281 MultiColumnSetSearchAdapter adapter(offset); |
282 m_multiColumnSetIntervalTree.allOverlapsWithAdapter<MultiColumnSetSearchAdap
ter>(adapter); | 282 m_multiColumnSetIntervalTree.allOverlapsWithAdapter<MultiColumnSetSearchAdap
ter>(adapter); |
283 | 283 |
284 // If no set was found, the offset is in the flow thread overflow. | 284 // If no set was found, the offset is in the flow thread overflow. |
285 if (!adapter.result() && !m_multiColumnSetList.isEmpty()) | 285 if (!adapter.result() && !m_multiColumnSetList.isEmpty()) |
286 return m_multiColumnSetList.last(); | 286 return m_multiColumnSetList.last(); |
287 return adapter.result(); | 287 return adapter.result(); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 for (LayoutObject* layoutObject = descendant; layoutObject; layoutObject = n
ext) { | 539 for (LayoutObject* layoutObject = descendant; layoutObject; layoutObject = n
ext) { |
540 if (shouldSkipInsertedOrRemovedChild(this, *layoutObject)) { | 540 if (shouldSkipInsertedOrRemovedChild(this, *layoutObject)) { |
541 next = layoutObject->nextInPreOrderAfterChildren(descendant); | 541 next = layoutObject->nextInPreOrderAfterChildren(descendant); |
542 continue; | 542 continue; |
543 } | 543 } |
544 next = layoutObject->nextInPreOrder(descendant); | 544 next = layoutObject->nextInPreOrder(descendant); |
545 if (containingColumnSpannerPlaceholder(layoutObject)) | 545 if (containingColumnSpannerPlaceholder(layoutObject)) |
546 continue; // Inside a column spanner. Nothing to do, then. | 546 continue; // Inside a column spanner. Nothing to do, then. |
547 if (descendantIsValidColumnSpanner(layoutObject)) { | 547 if (descendantIsValidColumnSpanner(layoutObject)) { |
548 // This layoutObject is a spanner, so it needs to establish a spanne
r placeholder. | 548 // This layoutObject is a spanner, so it needs to establish a spanne
r placeholder. |
549 LayoutBox* insertBefore = 0; | 549 LayoutBox* insertBefore = nullptr; |
550 LayoutMultiColumnSet* setToSplit = 0; | 550 LayoutMultiColumnSet* setToSplit = nullptr; |
551 if (objectAfterSubtree) { | 551 if (objectAfterSubtree) { |
552 // The spanner is inserted before something. Figure out what thi
s entails. If the | 552 // The spanner is inserted before something. Figure out what thi
s entails. If the |
553 // next layoutObject is a spanner too, it means that we can simp
ly insert a new spanner | 553 // next layoutObject is a spanner too, it means that we can simp
ly insert a new spanner |
554 // placeholder in front of its placeholder. | 554 // placeholder in front of its placeholder. |
555 insertBefore = objectAfterSubtree->spannerPlaceholder(); | 555 insertBefore = objectAfterSubtree->spannerPlaceholder(); |
556 if (!insertBefore) { | 556 if (!insertBefore) { |
557 // The next layoutObject isn't a spanner; it's regular colum
n content. Examine what | 557 // The next layoutObject isn't a spanner; it's regular colum
n content. Examine what |
558 // comes right before us in the flow thread, then. | 558 // comes right before us in the flow thread, then. |
559 LayoutObject* previousLayoutObject = previousInPreOrderSkipp
ingOutOfFlow(this, layoutObject); | 559 LayoutObject* previousLayoutObject = previousInPreOrderSkipp
ingOutOfFlow(this, layoutObject); |
560 if (!previousLayoutObject || previousLayoutObject == this) { | 560 if (!previousLayoutObject || previousLayoutObject == this) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 previousColumnBox->setNeedsLayout(LayoutInvalidationReason::Colu
mnsChanged); | 639 previousColumnBox->setNeedsLayout(LayoutInvalidationReason::Colu
mnsChanged); |
640 invalidateColumnSets(); | 640 invalidateColumnSets(); |
641 } | 641 } |
642 } | 642 } |
643 placeholder->destroy(); | 643 placeholder->destroy(); |
644 } | 644 } |
645 if (hadContainingPlaceholder || !processedSomething) | 645 if (hadContainingPlaceholder || !processedSomething) |
646 return; // No column content will be removed, so we can stop here. | 646 return; // No column content will be removed, so we can stop here. |
647 | 647 |
648 // Column content will be removed. Does this mean that we should destroy a c
olumn set? | 648 // Column content will be removed. Does this mean that we should destroy a c
olumn set? |
649 LayoutMultiColumnSpannerPlaceholder* adjacentPreviousSpannerPlaceholder = 0; | 649 LayoutMultiColumnSpannerPlaceholder* adjacentPreviousSpannerPlaceholder = nu
llptr; |
650 LayoutObject* previousLayoutObject = previousInPreOrderSkippingOutOfFlow(thi
s, descendant); | 650 LayoutObject* previousLayoutObject = previousInPreOrderSkippingOutOfFlow(thi
s, descendant); |
651 if (previousLayoutObject && previousLayoutObject != this) { | 651 if (previousLayoutObject && previousLayoutObject != this) { |
652 adjacentPreviousSpannerPlaceholder = containingColumnSpannerPlaceholder(
previousLayoutObject); | 652 adjacentPreviousSpannerPlaceholder = containingColumnSpannerPlaceholder(
previousLayoutObject); |
653 if (!adjacentPreviousSpannerPlaceholder) | 653 if (!adjacentPreviousSpannerPlaceholder) |
654 return; // Preceded by column content. Set still needed. | 654 return; // Preceded by column content. Set still needed. |
655 } | 655 } |
656 LayoutMultiColumnSpannerPlaceholder* adjacentNextSpannerPlaceholder = 0; | 656 LayoutMultiColumnSpannerPlaceholder* adjacentNextSpannerPlaceholder = nullpt
r; |
657 LayoutObject* nextLayoutObject = nextInPreOrderAfterChildrenSkippingOutOfFlo
w(this, descendant); | 657 LayoutObject* nextLayoutObject = nextInPreOrderAfterChildrenSkippingOutOfFlo
w(this, descendant); |
658 if (nextLayoutObject) { | 658 if (nextLayoutObject) { |
659 adjacentNextSpannerPlaceholder = containingColumnSpannerPlaceholder(next
LayoutObject); | 659 adjacentNextSpannerPlaceholder = containingColumnSpannerPlaceholder(next
LayoutObject); |
660 if (!adjacentNextSpannerPlaceholder) | 660 if (!adjacentNextSpannerPlaceholder) |
661 return; // Followed by column content. Set still needed. | 661 return; // Followed by column content. Set still needed. |
662 } | 662 } |
663 // We have now determined that, with the removal of |descendant|, we should
remove a column | 663 // We have now determined that, with the removal of |descendant|, we should
remove a column |
664 // set. Locate it and remove it. Do it without involving mapDescendantToColu
mnSet(), as that | 664 // set. Locate it and remove it. Do it without involving mapDescendantToColu
mnSet(), as that |
665 // might be very slow. Deduce the right set from the spanner placeholders th
at we've already | 665 // might be very slow. Deduce the right set from the spanner placeholders th
at we've already |
666 // found. | 666 // found. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 if (m_lastSetWorkedOn) | 756 if (m_lastSetWorkedOn) |
757 m_lastSetWorkedOn->beginFlow(LayoutUnit()); | 757 m_lastSetWorkedOn->beginFlow(LayoutUnit()); |
758 LayoutFlowThread::layout(); | 758 LayoutFlowThread::layout(); |
759 if (LayoutMultiColumnSet* lastSet = lastMultiColumnSet()) { | 759 if (LayoutMultiColumnSet* lastSet = lastMultiColumnSet()) { |
760 ASSERT(lastSet == m_lastSetWorkedOn); | 760 ASSERT(lastSet == m_lastSetWorkedOn); |
761 if (!lastSet->nextSiblingMultiColumnBox()) { | 761 if (!lastSet->nextSiblingMultiColumnBox()) { |
762 lastSet->endFlow(logicalHeight()); | 762 lastSet->endFlow(logicalHeight()); |
763 lastSet->expandToEncompassFlowThreadContentsIfNeeded(); | 763 lastSet->expandToEncompassFlowThreadContentsIfNeeded(); |
764 } | 764 } |
765 } | 765 } |
766 m_lastSetWorkedOn = 0; | 766 m_lastSetWorkedOn = nullptr; |
767 } | 767 } |
768 | 768 |
769 void LayoutMultiColumnFlowThread::setPageBreak(LayoutUnit offset, LayoutUnit spa
ceShortage) | 769 void LayoutMultiColumnFlowThread::setPageBreak(LayoutUnit offset, LayoutUnit spa
ceShortage) |
770 { | 770 { |
771 // Only positive values are interesting (and allowed) here. Zero space short
age may be reported | 771 // Only positive values are interesting (and allowed) here. Zero space short
age may be reported |
772 // when we're at the top of a column and the element has zero height. Ignore
this, and also | 772 // when we're at the top of a column and the element has zero height. Ignore
this, and also |
773 // ignore any negative values, which may occur when we set an early break in
order to honor | 773 // ignore any negative values, which may occur when we set an early break in
order to honor |
774 // widows in the next column. | 774 // widows in the next column. |
775 if (spaceShortage <= 0) | 775 if (spaceShortage <= 0) |
776 return; | 776 return; |
(...skipping 20 matching lines...) Expand all Loading... |
797 } | 797 } |
798 | 798 |
799 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const | 799 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const |
800 { | 800 { |
801 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) | 801 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) |
802 return columnSet->pageLogicalHeight(); | 802 return columnSet->pageLogicalHeight(); |
803 return false; | 803 return false; |
804 } | 804 } |
805 | 805 |
806 } | 806 } |
OLD | NEW |