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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 RenderMultiColumnSet* firstSet = toRenderMultiColumnSet(firstRegion()); | 88 RenderMultiColumnSet* firstSet = toRenderMultiColumnSet(firstRegion()); |
89 if (firstSet) | 89 if (firstSet) |
90 return; | 90 return; |
91 | 91 |
92 invalidateRegions(); | 92 invalidateRegions(); |
93 | 93 |
94 RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent()); | 94 RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent()); |
95 firstSet = RenderMultiColumnSet::createAnonymous(this); | 95 firstSet = RenderMultiColumnSet::createAnonymous(this); |
96 firstSet->setStyle(RenderStyle::createAnonymousStyleWithDisplay(parentBlock-
>style(), BLOCK)); | 96 firstSet->setStyle(RenderStyle::createAnonymousStyleWithDisplay(parentBlock-
>style(), BLOCK)); |
97 parentBlock->RenderBlock::addChild(firstSet); | 97 parentBlock->RenderBlock::addChild(firstSet); |
98 | |
99 // Even though we aren't placed yet, we can go ahead and set up our size. | |
100 firstSet->updateLogicalWidth(); | |
101 firstSet->updateLogicalHeight(); | |
102 | 98 |
103 firstSet->setRequiresBalancing(parentBlock->requiresBalancing()); | 99 // Even though we aren't placed yet, we can go ahead and set up our size. At
this point we're |
104 | 100 // typically in the middle of laying out the thread, attempting to paginate,
and we need to do |
| 101 // some rudimentary "layout" of the set now, so that pagination will work. |
| 102 firstSet->prepareForLayout(); |
| 103 |
105 validateRegions(); | 104 validateRegions(); |
106 } | 105 } |
107 | 106 |
| 107 void RenderMultiColumnFlowThread::setPageBreak(LayoutUnit offset, LayoutUnit spa
ceShortage) |
| 108 { |
| 109 if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlock
Offset(offset))) |
| 110 multicolSet->recordSpaceShortage(spaceShortage); |
108 } | 111 } |
| 112 |
| 113 void RenderMultiColumnFlowThread::updateMinimumPageHeight(LayoutUnit offset, Lay
outUnit minHeight) |
| 114 { |
| 115 if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlock
Offset(offset))) |
| 116 multicolSet->updateMinimumColumnHeight(minHeight); |
| 117 } |
| 118 |
| 119 } |
OLD | NEW |