Bug 252046
| Summary: | Avoid the unnecessary setting of min-width 0 on RenderButton & RenderMenuList | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | Ahmad Saleem <ahmad.saleem792> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
While going through Blink's commit, I came across this clean-up commit:
Commit - https://chromium.googlesource.com/chromium/blink/+/930980f79f4061b999ba474313b456563c878197
WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderButton.cpp#77 & https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderMenuList.cpp#118
I compiled it locally and also tested this WPT:http://wpt.live/css/css-sizing/button-min-width.html , it still passed.
Just wanted to raise get input whether this clean-up is something worth doing.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
alan
guess now that bug 111790 is fixed, we can indeed remove this redundant call.
Ahmad Saleem
(In reply to zalan from comment #1)
> guess now that bug 111790 is fixed, we can indeed remove this redundant call.
Will do PR in morning. 👍
Ahmad Saleem
PR - https://github.com/WebKit/WebKit/pull/9975
Radar WebKit Bug Importer
<rdar://problem/105592345>
Ahmad Saleem
It regresses test cases and then not match with other browser.
I noticed that Blink / Chromium has various min-width hacks on their LayoutTheme for Mac-specific controls etc.
They might have removed it from Blink side but kept it for Chromium theme etc.
I think we needed it and Tim pointed out that it is also required by spec:
'''
By default, flex items won’t shrink below their minimum content size (the length of the longest word or fixed-size element). To change this, set the min-width or min-height property. (See § 4.5 Automatic Minimum Size of Flex Items.)
In the flexbox spec: https://drafts.csswg.org/css-flexbox-1/#flex-common
'''
Hence, I closed my PR and closing this since we would need it.