Currently, min/max-content as min/max-width is not set properly when the width is fixed. It's because the preferredWidth is not properly updated when the width is fixed. The preferredWidth should be updated when the min/max-width is min/max-content.
Created attachment 185109 [details] Patch
Created attachment 185113 [details] testcase screenshot(current)
Created attachment 185114 [details] testcase screenshot(expected)
Comment on attachment 185109 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185109&action=review > Source/WebCore/rendering/RenderBlock.cpp:5671 > + && !styleToUse->logicalMinWidth().isMinContent() && !styleToUse->logicalMaxWidth().isMinContent() > + && !styleToUse->logicalMinWidth().isMaxContent() && !styleToUse->logicalMaxWidth().isMaxContent()) This isn't quite right. See http://dev.w3.org/csswg/css3-sizing/#block-intrinsic. Specifically, see the difference between the min/max-measure vs. the min/max-measure *contribution*. Translating those terms into WebKit terms, the preferred width is the min/max measure contribution. The newly added concept of intrinsic with is the min/max measure. This is a bit confusing, because there's lots of old code that treats intrinsic widths and preferred widths as the same. In this patch, you're changed both, but you only want to be changing the min/max measure. I've been working on this in pieces. Look at my recent patches adding computeIntrinsicLogicalWidths. We basically need to make changes like that for all the computePreferredLogicalWidths overrides and then in the end, we change min-content/max-content to use the intrinsic widths and not the preferred widths.
*** This bug has been marked as a duplicate of bug 106143 ***