< prev index next >

modules/javafx.web/src/main/native/Source/WebCore/rendering/RenderMultiColumnSet.cpp

Print this page




 299     return true; // Need another pass.
 300 }
 301 
 302 void RenderMultiColumnSet::recordSpaceShortage(LayoutUnit spaceShortage)
 303 {
 304     if (spaceShortage >= m_minSpaceShortage)
 305         return;
 306 
 307     // The space shortage is what we use as our stretch amount. We need a positive number here in
 308     // order to get anywhere. Some lines actually have zero height. Ignore them.
 309     if (spaceShortage > 0)
 310         m_minSpaceShortage = spaceShortage;
 311 }
 312 
 313 void RenderMultiColumnSet::updateLogicalWidth()
 314 {
 315     setComputedColumnWidthAndCount(multiColumnFlow()->columnWidth(), multiColumnFlow()->columnCount()); // FIXME: This will eventually vary if we are contained inside fragments.
 316 
 317     // FIXME: When we add fragments support, we'll start it off at the width of the multi-column
 318     // block in that particular fragment.
 319     setLogicalWidth(parentBox()->contentLogicalWidth());
 320 }
 321 
 322 bool RenderMultiColumnSet::requiresBalancing() const
 323 {
 324     if (!multiColumnFlow()->progressionIsInline())
 325         return false;
 326 
 327     if (RenderBox* next = RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf(this)) {
 328         if (!next->isRenderMultiColumnSet() && !next->isLegend()) {
 329             // If we're followed by a spanner, we need to balance.
 330             ASSERT(multiColumnFlow()->findColumnSpannerPlaceholder(next));
 331             return true;
 332         }
 333     }
 334     RenderBlockFlow* container = multiColumnBlockFlow();
 335     if (container->style().columnFill() == ColumnFillBalance)
 336         return true;
 337     return !multiColumnFlow()->columnHeightAvailable();
 338 }
 339 




 299     return true; // Need another pass.
 300 }
 301 
 302 void RenderMultiColumnSet::recordSpaceShortage(LayoutUnit spaceShortage)
 303 {
 304     if (spaceShortage >= m_minSpaceShortage)
 305         return;
 306 
 307     // The space shortage is what we use as our stretch amount. We need a positive number here in
 308     // order to get anywhere. Some lines actually have zero height. Ignore them.
 309     if (spaceShortage > 0)
 310         m_minSpaceShortage = spaceShortage;
 311 }
 312 
 313 void RenderMultiColumnSet::updateLogicalWidth()
 314 {
 315     setComputedColumnWidthAndCount(multiColumnFlow()->columnWidth(), multiColumnFlow()->columnCount()); // FIXME: This will eventually vary if we are contained inside fragments.
 316 
 317     // FIXME: When we add fragments support, we'll start it off at the width of the multi-column
 318     // block in that particular fragment.
 319     setLogicalWidth(multiColumnBlockFlow()->contentLogicalWidth());
 320 }
 321 
 322 bool RenderMultiColumnSet::requiresBalancing() const
 323 {
 324     if (!multiColumnFlow()->progressionIsInline())
 325         return false;
 326 
 327     if (RenderBox* next = RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf(this)) {
 328         if (!next->isRenderMultiColumnSet() && !next->isLegend()) {
 329             // If we're followed by a spanner, we need to balance.
 330             ASSERT(multiColumnFlow()->findColumnSpannerPlaceholder(next));
 331             return true;
 332         }
 333     }
 334     RenderBlockFlow* container = multiColumnBlockFlow();
 335     if (container->style().columnFill() == ColumnFillBalance)
 336         return true;
 337     return !multiColumnFlow()->columnHeightAvailable();
 338 }
 339 


< prev index next >