Changeset 245966 in webkit
- Timestamp:
- May 31, 2019 9:37:13 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r245877 r245966 1 2019-05-31 Joonghun Park <jh718.park@samsung.com> 2 3 Always min-width should win over max-width. 4 https://bugs.webkit.org/show_bug.cgi?id=198032 5 6 Reviewed by Darin Adler. 7 8 In the spec, https://www.w3.org/TR/CSS21/visudet.html#min-max-widths, 9 the following algorithm describes how the two properties influence 10 the used value of the 'width' property. 11 12 1. The tentative used width is calculated (without 'min-width' and 'max-width') 13 following the rules under "Calculating widths and margins" above. 14 2. If the tentative used width is greater than 'max-width', 15 the rules above are applied again, but this time using the computed value of 'max-width' 16 as the computed value for 'width'. 17 3. If the resulting width is smaller than 'min-width', the rules above are applied again, 18 but this time using the value of 'min-width' as the computed value for 'width'. 19 20 * web-platform-tests/css/css-sizing/min-width-max-width-precedence-expected.txt: Added. 21 * web-platform-tests/css/css-sizing/min-width-max-width-precedence.html: Added. 22 1 23 2019-05-29 Said Abou-Hallawa <sabouhallawa@apple.com> 2 24 -
trunk/Source/WebCore/ChangeLog
r245964 r245966 1 2019-05-31 Joonghun Park <jh718.park@samsung.com> 2 3 Always min-width should win over max-width. 4 https://bugs.webkit.org/show_bug.cgi?id=198032 5 6 Reviewed by Darin Adler. 7 8 In the spec, https://www.w3.org/TR/CSS21/visudet.html#min-max-widths, 9 the following algorithm describes how the two properties influence 10 the used value of the 'width' property. 11 12 1. The tentative used width is calculated (without 'min-width' and 'max-width') 13 following the rules under "Calculating widths and margins" above. 14 2. If the tentative used width is greater than 'max-width', 15 the rules above are applied again, but this time using the computed value of 'max-width' 16 as the computed value for 'width'. 17 3. If the resulting width is smaller than 'min-width', the rules above are applied again, 18 but this time using the value of 'min-width' as the computed value for 'width'. 19 20 * rendering/RenderBlock.cpp: 21 (WebCore::RenderBlock::computePreferredLogicalWidths): 22 1 23 2019-05-31 Ryan Haddad <ryanhaddad@apple.com> 2 24 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r245543 r245966 2263 2263 else 2264 2264 computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth); 2265 2266 if (styleToUse.logicalMaxWidth().isFixed()) { 2267 m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value())); 2268 m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value())); 2269 } 2265 2270 2266 2271 if (styleToUse.logicalMinWidth().isFixed() && styleToUse.logicalMinWidth().value() > 0) { 2267 2272 m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value())); 2268 2273 m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value())); 2269 }2270 2271 if (styleToUse.logicalMaxWidth().isFixed()) {2272 m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));2273 m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));2274 2274 } 2275 2275
Note: See TracChangeset
for help on using the changeset viewer.