WebKit Bugzilla
Attachment 370942 Details for
Bug 198032
: Inherited width does not respect max-width and min-width algorithm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198032-20190531001536.patch (text/plain), 3.32 KB, created by
Joonghun Park
on 2019-05-30 08:15:38 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Joonghun Park
Created:
2019-05-30 08:15:38 PDT
Size:
3.32 KB
patch
obsolete
>Subversion Revision: 245876 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1100a296e6e094cbf41114827f979e17a471eb83..309240e8bd7d3f26dc6ee28aeb5f7dd527d96250 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2019-05-30 Joonghun Park <jh718.park@samsung.com> >+ >+ Always min-width should win over max-width. >+ >+ In the spec, https://www.w3.org/TR/CSS21/visudet.html, >+ the following algorithm describes how the two properties influence the used value of the 'width' property. >+ >+ 1. The tentative used width is calculated (without 'min-width' and 'max-width') >+ following the rules under "Calculating widths and margins" above. >+ 2. If the tentative used width is greater than 'max-width', >+ the rules above are applied again, but this time using the computed value of 'max-width' >+ as the computed value for 'width'. >+ 3. If the resulting width is smaller than 'min-width', the rules above are applied again, >+ but this time using the value of 'min-width' as the computed value for 'width'. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=198032 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * rendering/RenderBlock.cpp: >+ (WebCore::RenderBlock::computePreferredLogicalWidths): >+ > 2019-05-29 Don Olmstead <don.olmstead@sony.com> > > Remove ENABLE definitions from WebKit config files >diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp >index 051e0854236971437654355151692ed542862fb2..14a16e99d8c23650675432bf12fd474c44c1b1ad 100644 >--- a/Source/WebCore/rendering/RenderBlock.cpp >+++ b/Source/WebCore/rendering/RenderBlock.cpp >@@ -2262,17 +2262,17 @@ void RenderBlock::computePreferredLogicalWidths() > m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalWidth().value()); > else > computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth); >+ >+ if (styleToUse.logicalMaxWidth().isFixed()) { >+ m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value())); >+ m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value())); >+ } > > if (styleToUse.logicalMinWidth().isFixed() && styleToUse.logicalMinWidth().value() > 0) { > m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value())); > m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value())); > } > >- if (styleToUse.logicalMaxWidth().isFixed()) { >- m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value())); >- m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value())); >- } >- > LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth(); > m_minPreferredLogicalWidth += borderAndPadding; > m_maxPreferredLogicalWidth += borderAndPadding;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198032
:
370942
|
371034
|
371035
|
371036