Changeset 130774 in webkit
- Timestamp:
- Oct 9, 2012 9:55:46 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r130773 r130774 1 2012-10-09 Pravin D <pravind.2k4@gmail.com> 2 3 max-width property is does not overriding the width properties for css tables(display:table) 4 https://bugs.webkit.org/show_bug.cgi?id=98455 5 6 Reviewed by Tony Chang. 7 8 * fast/table/css-table-max-width-expected.txt: Added. 9 * fast/table/css-table-max-width.html: Added. 10 1 11 2012-10-09 Zan Dobersek <zandobersek@gmail.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r130768 r130774 1 2012-10-09 Pravin D <pravind.2k4@gmail.com> 2 3 max-width property is does not overriding the width properties for css tables(display:table) 4 https://bugs.webkit.org/show_bug.cgi?id=98455 5 6 Reviewed by Tony Chang. 7 8 The max-width property determines the maximum computed width an element can have. In case of css tables(display:table), 9 the computed was not being limited by the max-width property. The current patch fixes this issue. 10 11 Test: fast/table/css-table-max-width.html 12 13 * rendering/RenderTable.cpp: 14 (WebCore::RenderTable::updateLogicalWidth): 15 Logic to compute the logical width of an element such that it does not exceed the max-width value. 16 Also when both min-width and max-width are present, the following contraint is used to compute the logical width: 17 1) min-width < Computed LogicalWidth < max-width, when min-width < max-width. 18 2) Computed LogicalWidth = min-width, when min-width > max-width. 19 1 20 2012-10-09 Harald Alvestrand <hta@google.com> 2 21 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r130698 r130774 256 256 setLogicalWidth(max<int>(logicalWidth(), minPreferredLogicalWidth())); 257 257 258 259 // Ensure we aren't bigger than our max-width style. 260 Length styleMaxLogicalWidth = style()->logicalMaxWidth(); 261 if (styleMaxLogicalWidth.isSpecified() && !styleMaxLogicalWidth.isNegative()) { 262 LayoutUnit computedMaxLogicalWidth = convertStyleLogicalWidthToComputedWidth(styleMaxLogicalWidth, availableLogicalWidth); 263 setLogicalWidth(min<int>(logicalWidth(), computedMaxLogicalWidth)); 264 } 265 258 266 // Ensure we aren't smaller than our min-width style. 259 267 Length styleMinLogicalWidth = style()->logicalMinWidth(); 260 if (styleMinLogicalWidth.isSpecified() && styleMinLogicalWidth.isPositive()) 261 setLogicalWidth(max<int>(logicalWidth(), convertStyleLogicalWidthToComputedWidth(styleMinLogicalWidth, availableLogicalWidth))); 268 if (styleMinLogicalWidth.isSpecified() && !styleMinLogicalWidth.isNegative()) { 269 LayoutUnit computedMinLogicalWidth = convertStyleLogicalWidthToComputedWidth(styleMinLogicalWidth, availableLogicalWidth); 270 setLogicalWidth(max<int>(logicalWidth(), computedMinLogicalWidth)); 271 } 262 272 263 273 // Finally, with our true width determined, compute our margins for real.
Note: See TracChangeset
for help on using the changeset viewer.