Changeset 140479 in webkit
- Timestamp:
- Jan 22, 2013, 3:28:02 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140474 r140479 1 2013-01-22 Ojan Vafai <ojan@chromium.org> 2 3 REGRESION(r130774): preferred width of tables does not take max-width into account 4 https://bugs.webkit.org/show_bug.cgi?id=107576 5 6 Reviewed by Tony Chang. 7 8 * fast/table/min-max-width-preferred-size-expected.txt: Added. 9 * fast/table/min-max-width-preferred-size.html: Added. 10 1 11 2013-01-22 Michael Saboff <msaboff@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r140478 r140479 1 2013-01-22 Ojan Vafai <ojan@chromium.org> 2 3 REGRESION(r130774): preferred width of tables does not take max-width into account 4 https://bugs.webkit.org/show_bug.cgi?id=107576 5 6 Reviewed by Tony Chang. 7 8 Constrain preferred widths by min/max the way we do in other 9 RenderBlock subclasses. Eventually, we'll shared the code with 10 RenderBlock, but this is an incremental step in that direction 11 that we can safely merge into release branches. 12 13 Test: fast/table/min-max-width-preferred-size.html 14 15 * rendering/RenderTable.cpp: 16 (WebCore::RenderTable::computePreferredLogicalWidths): 17 1 18 2013-01-22 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r140244 r140479 727 727 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, m_captions[i]->minPreferredLogicalWidth()); 728 728 729 RenderStyle* styleToUse = style(); 730 // FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for min-width. 731 if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) { 732 m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value())); 733 m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value())); 734 } 735 736 // FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for maxWidth. 737 if (styleToUse->logicalMaxWidth().isFixed()) { 738 m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value())); 739 m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value())); 740 } 741 742 // FIXME: We should be adding borderAndPaddingLogicalWidth here, but m_tableLayout->computePreferredLogicalWidths already does, 743 // so a bunch of tests break doing this naively. 729 744 setPreferredLogicalWidthsDirty(false); 730 745 }
Note:
See TracChangeset
for help on using the changeset viewer.