Changeset 154714 in webkit
- Timestamp:
- Aug 27, 2013 4:17:15 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 deleted
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r154713 r154714 1 2013-08-27 Morten Stenshorne <mstensho@opera.com> 2 3 Improve multicol intrinsic width calculation 4 https://bugs.webkit.org/show_bug.cgi?id=116677 5 6 Reviewed by David Hyatt. 7 8 * css3/unicode-bidi-isolate-basic.html: The expectation seems to 9 be that the columns should be as many as necessary and narrow as 10 possible, and that the multicol container's width should be that 11 of one column. The previous CSS didn't really ask for this, 12 although that's how it happened to be rendered without this fix. 13 * fast/css-intrinsic-dimensions/multicol-expected.txt: Added. 14 * fast/css-intrinsic-dimensions/multicol.html: Added. 15 * fast/multicol/positioned-with-constrained-height-expected.html: Copied from LayoutTests/fast/multicol/positioned-with-constrained-height.html. 16 * fast/multicol/positioned-with-constrained-height.html: Turn into a reftest. 17 * platform/efl/fast/multicol/positioned-with-constrained-height-expected.png: Removed. 18 * platform/efl/fast/multicol/positioned-with-constrained-height-expected.txt: Removed. 19 * platform/gtk/fast/multicol/positioned-with-constrained-height-expected.png: Removed. 20 * platform/gtk/fast/multicol/positioned-with-constrained-height-expected.txt: Removed. 21 * platform/mac/fast/multicol/positioned-with-constrained-height-expected.png: Removed. 22 * platform/mac/fast/multicol/positioned-with-constrained-height-expected.txt: Removed. 23 * platform/qt/fast/multicol/positioned-with-constrained-height-expected.png: Removed. 24 * platform/qt/fast/multicol/positioned-with-constrained-height-expected.txt: Removed. 25 1 26 2013-08-27 Rob Buis <rwlbuis@webkit.org> 2 27 -
trunk/LayoutTests/css3/unicode-bidi-isolate-basic.html
r94775 r154714 9 9 left: 0px; 10 10 -moz-column-width: 13em; 11 -webkit-column-width: 13em;12 11 -moz-column-gap: 5em; 12 -webkit-columns:1 1px; /* Make as many (overflowing) columns as necessary, but keep them as narrow as possible */ 13 13 -webkit-column-gap: 5em; 14 -webkit-column-fill: auto; 15 columns:1 1px; 16 column-gap: 5em; 17 column-fill: auto; 14 18 height: 400px; 15 19 } -
trunk/LayoutTests/fast/multicol/positioned-with-constrained-height-expected.html
r154713 r154714 1 <div style="-moz-column-width:200px; -webkit-column-width:200px; height:300px; position:absolute; background-color:lime">1 <div style="-moz-column-width:200px; -webkit-column-width:200px; -webkit-column-fill:auto; column-width:200px; column-fill:auto; height:300px; position:absolute;"> 2 2 This is some text<br> 3 3 This is some text<br> -
trunk/LayoutTests/fast/multicol/positioned-with-constrained-height.html
r48679 r154714 1 <div style="-moz-column-width:200px; -webkit-column-width:200px; height:300px; position:absolute; background-color:lime">1 <div style="-moz-column-width:200px; -webkit-column-width:200px; -webkit-column-fill:auto; column-width:200px; column-fill:auto; width:200px; height:300px;"> 2 2 This is some text<br> 3 3 This is some text<br> -
trunk/Source/WebCore/ChangeLog
r154713 r154714 1 2013-08-27 Morten Stenshorne <mstensho@opera.com> 2 3 Improve multicol intrinsic width calculation 4 https://bugs.webkit.org/show_bug.cgi?id=116677 5 6 Reviewed by David Hyatt. 7 8 Test: fast/css-intrinsic-dimensions/multicol.html 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::RenderBlock::computeIntrinsicLogicalWidths): 12 (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns): 13 * rendering/RenderBlock.h: 14 1 15 2013-08-27 Rob Buis <rwlbuis@webkit.org> 2 16 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r154641 r154714 6040 6040 maxLogicalWidth = max(minLogicalWidth, maxLogicalWidth); 6041 6041 6042 adjustIntrinsicLogicalWidthsForColumns(minLogicalWidth, maxLogicalWidth); 6043 6042 6044 if (!style()->autoWrap() && childrenInline()) { 6043 6045 // A horizontal marquee with inline children has no minimum width. … … 6094 6096 6095 6097 setPreferredLogicalWidthsDirty(false); 6098 } 6099 6100 void RenderBlock::adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const 6101 { 6102 // FIXME: make this method virtual and move the code to RenderMultiColumnBlock once the old 6103 // multicol code is gone. 6104 6105 if (!style()->hasAutoColumnCount() || !style()->hasAutoColumnWidth()) { 6106 // The min/max intrinsic widths calculated really tell how much space elements need when 6107 // laid out inside the columns. In order to eventually end up with the desired column width, 6108 // we need to convert them to values pertaining to the multicol container. 6109 int columnCount = style()->hasAutoColumnCount() ? 1 : style()->columnCount(); 6110 LayoutUnit columnWidth; 6111 LayoutUnit gapExtra = (columnCount - 1) * columnGap(); 6112 if (style()->hasAutoColumnWidth()) 6113 minLogicalWidth = minLogicalWidth * columnCount + gapExtra; 6114 else { 6115 columnWidth = style()->columnWidth(); 6116 minLogicalWidth = min(minLogicalWidth, columnWidth); 6117 } 6118 // FIXME: If column-count is auto here, we should resolve it to calculate the maximum 6119 // intrinsic width, instead of pretending that it's 1. The only way to do that is by 6120 // performing a layout pass, but this is not an appropriate time or place for layout. The 6121 // good news is that if height is unconstrained and there are no explicit breaks, the 6122 // resolved column-count really should be 1. 6123 maxLogicalWidth = max(maxLogicalWidth, columnWidth) * columnCount + gapExtra; 6124 } 6096 6125 } 6097 6126 -
trunk/Source/WebCore/rendering/RenderBlock.h
r154641 r154714 545 545 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const OVERRIDE; 546 546 virtual void computePreferredLogicalWidths() OVERRIDE; 547 void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const; 547 548 548 549 virtual int firstLineBoxBaseline() const;
Note: See TracChangeset
for help on using the changeset viewer.