| Summary: | REGRESSION (r285623): pay1040.com IRS payments website renders poorly | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | zalan <zalan> | ||||||||||||||
| Component: | Layout and Rendering | Assignee: | Oriol Brufau <obrufau> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | bfulgham, changseok, clopez, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, obrufau, pdr, simon.fraser, svillar, youennf, zalan | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=230755 https://github.com/web-platform-tests/wpt/pull/34044 |
||||||||||||||||
| Bug Depends on: | 240388 | ||||||||||||||||
| Bug Blocks: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
zalan
2022-05-04 08:55:00 PDT
I am not sure I'd have time to take a look at this in the short term. Created attachment 459130 [details]
testcase
Minimal testcase:
<!DOCTYPE html>
<div style="display: flex; flex-direction: column; border: solid orange">
<div style="flex: 1 1 0px; display: flex; flex-direction: column; place-content: center; border: solid cyan">
bar
<div style="flex: 1 1 100px; border: solid fuchsia">baz</div>
</div>
</div>
The problem seems that the min-height:auto of the cyan element is not resolved correctly. Then the fuchsia element shrinks, and the text ends up overflowing anyways. Created attachment 459199 [details]
Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess Comment on attachment 459199 [details]
Patch
I'm not sure if this is the right approach, but it's a small change, solves the problem, and doesn't seem to fail any test.
What do you think, Sergio?
Context of the problem. When using something different than justify-content:start, RenderFlexibleBox::initialJustifyContentOffset() uses the availableFreeSpace, which was wrong. The value comes from RenderFlexibleBox::layoutFlexItems(), which uses RenderFlexibleBox::mainAxisContentExtent(), which uses RenderBox::computeLogicalHeight(). Then, by treating height:auto as height:0px when there is flex-basis:0px, the nested flex container stopped being intrinsically sized. RenderBox::computeLogicalHeight() takes min-height into account, but treating min-height:auto as 0. So the idea is changing this. It's broken for box-sizing:border-box, and fieldsets with box-sizing:content-box. I will need to fix bug 240388. Created attachment 459670 [details]
Patch
Created attachment 459672 [details]
Patch
Created attachment 459674 [details]
Patch
Comment on attachment 459674 [details]
Patch
Looks pretty sensible to me. Thanks for taking care!
No reviewer information in commit message, blocking PR #None Created attachment 459714 [details]
Patch
Committed r294744 (250912@main): <https://commits.webkit.org/250912@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 459714 [details]. |