Changeset 167478 in webkit
- Timestamp:
- Apr 17, 2014 7:11:12 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167472 r167478 1 2014-04-17 David Hyatt <hyatt@apple.com> 2 3 [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction. 4 https://bugs.webkit.org/show_bug.cgi?id=131811 5 6 Reviewed by Dean Jackson. 7 8 * fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb-expected.html: Added. 9 * fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html: Added. 10 1 11 2014-04-16 Huang Dongsung <luxtella@company100.net> 2 12 -
trunk/Source/WebCore/ChangeLog
r167477 r167478 1 2014-04-17 David Hyatt <hyatt@apple.com> 2 3 [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction. 4 https://bugs.webkit.org/show_bug.cgi?id=131811 5 6 Reviewed by Dean Jackson. 7 8 Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html 9 10 With block axis pagination mode, it is possible to set a column height that is not the same 11 as the available fill height for a block. The new multi-column code had the assumption that 12 the column height was the same as the amount of fill room you had available. This is not 13 the case. 14 15 To correct the issue, I added a member variable to RenderMultiColumnSet that stores the 16 available column height as a separate variable from the computed column height. This allows 17 the pagination API to specify a different column height that is not the same as the view's 18 content height. 19 20 Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on 21 RenderView to work with the new column code as well. 22 23 * rendering/RenderMultiColumnSet.cpp: 24 (WebCore::RenderMultiColumnSet::RenderMultiColumnSet): 25 (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight): 26 (WebCore::RenderMultiColumnSet::computeLogicalHeight): 27 * rendering/RenderMultiColumnSet.h: 28 * rendering/RenderView.cpp: 29 (WebCore::RenderView::pageOrViewLogicalHeight): 30 1 31 2014-04-17 Anders Carlsson <andersca@apple.com> 2 32 -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp
r167463 r167478 27 27 #include "RenderMultiColumnSet.h" 28 28 29 #include "FrameView.h" 29 30 #include "PaintInfo.h" 30 31 #include "RenderLayer.h" 31 32 #include "RenderMultiColumnFlowThread.h" 32 33 #include "RenderMultiColumnSpannerPlaceholder.h" 34 #include "RenderView.h" 33 35 34 36 namespace WebCore { … … 39 41 , m_computedColumnWidth(0) 40 42 , m_computedColumnHeight(0) 43 , m_availableColumnHeight(0) 41 44 , m_maxColumnHeight(RenderFlowThread::maxLogicalHeight()) 42 45 , m_minSpaceShortage(RenderFlowThread::maxLogicalHeight()) … … 152 155 if (m_computedColumnHeight > m_maxColumnHeight) 153 156 m_computedColumnHeight = m_maxColumnHeight; 157 158 // FIXME: The available column height is not the same as the constrained height specified 159 // by the pagination API. The column set in this case is allowed to be bigger than the 160 // height of a single column. We cache available column height in order to use it 161 // in computeLogicalHeight later. This is pretty gross, and maybe there's a better way 162 // to formalize the idea of clamped column heights without having a view dependency 163 // here. 164 m_availableColumnHeight = m_computedColumnHeight; 165 if (multiColumnFlowThread() && !multiColumnFlowThread()->progressionIsInline() && parent()->isRenderView()) { 166 int pageLength = view().frameView().pagination().pageLength; 167 if (pageLength) 168 m_computedColumnHeight = pageLength; 169 } 154 170 // FIXME: the height may also be affected by the enclosing pagination context, if any. 155 171 } … … 397 413 void RenderMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const 398 414 { 399 computedValues.m_extent = m_ computedColumnHeight;415 computedValues.m_extent = m_availableColumnHeight; 400 416 computedValues.m_position = logicalTop; 401 417 } -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.h
r167463 r167478 179 179 LayoutUnit m_computedColumnWidth; // Used column width (the resulting 'W' from the pseudo-algorithm in the multicol spec) 180 180 LayoutUnit m_computedColumnHeight; 181 LayoutUnit m_availableColumnHeight; 181 182 182 183 // The following variables are used when balancing the column set. -
trunk/Source/WebCore/rendering/RenderView.cpp
r167444 r167478 296 296 return pageLogicalHeight(); 297 297 298 if ( hasColumns() && !style().hasInlineColumnAxis()) {298 if ((hasColumns() || multiColumnFlowThread()) && !style().hasInlineColumnAxis()) { 299 299 if (int pageLength = frameView().pagination().pageLength) 300 300 return pageLength;
Note: See TracChangeset
for help on using the changeset viewer.