RESOLVED DUPLICATE of bug 106143 108134
min/max-content as min/max-width is not set properly
https://bugs.webkit.org/show_bug.cgi?id=108134
Summary min/max-content as min/max-width is not set properly
KyungTae Kim
Reported 2013-01-28 16:57:26 PST
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.
Attachments
Patch (5.17 KB, patch)
2013-01-28 17:02 PST, KyungTae Kim
ojan: review-
testcase screenshot(current) (9.97 KB, image/png)
2013-01-28 17:22 PST, KyungTae Kim
no flags
testcase screenshot(expected) (6.88 KB, image/png)
2013-01-28 17:23 PST, KyungTae Kim
no flags
KyungTae Kim
Comment 1 2013-01-28 17:02:16 PST
KyungTae Kim
Comment 2 2013-01-28 17:22:47 PST
Created attachment 185113 [details] testcase screenshot(current)
KyungTae Kim
Comment 3 2013-01-28 17:23:18 PST
Created attachment 185114 [details] testcase screenshot(expected)
Ojan Vafai
Comment 4 2013-01-28 18:29:56 PST
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.
Ojan Vafai
Comment 5 2013-01-28 18:30:32 PST
*** This bug has been marked as a duplicate of bug 106143 ***
Note You need to log in before you can comment on or make changes to this bug.