RESOLVED DUPLICATE of bug 289438289143
Percentage height becomes auto if containing block height is auto
https://bugs.webkit.org/show_bug.cgi?id=289143
Summary Percentage height becomes auto if containing block height is auto
Ahmad Saleem
Reported 2025-03-04 21:27:12 PST
Hi Team, While going through CSS2 WPT failures for Safari/WebKit, I came across where we can take Blink's fix. Blink Commit: https://chromium-review.googlesource.com/c/chromium/src/+/1617833 WebKIt Source: https://github.com/WebKit/WebKit/blob/525bcff5a71657880a48e871e964f677bd003856/Source/WebCore/rendering/RenderBlock.cpp#L486 WPT Test Case: https://wpt.fyi/results/css/CSS2/normal-flow/margin-collapse-through-percentage-height-block.html?label=master&label=experimental&aligned WPT Test Case Live Link: https://wpt.live/css/CSS2/normal-flow/margin-collapse-through-percentage-height-block.html It can be fix via: ``` if (logicalHeightLength.isPercentOrCalculated() && !document().inQuirksMode()) { hasAutoHeight = true; if (RenderBlock* cb = containingBlock()) { if (!is<RenderView>(*cb) && (cb->style().logicalHeight().isFixed() || cb->isRenderTableCell())) hasAutoHeight = false; } } ``` Just raising, so we can fix it. Thanks!
Attachments
Radar WebKit Bug Importer
Comment 1 2025-03-04 21:27:48 PST
Ahmad Saleem
Comment 2 2025-03-04 23:35:17 PST
Ahmad Saleem
Comment 3 2025-03-10 09:52:47 PDT
*** This bug has been marked as a duplicate of bug 289438 ***
Note You need to log in before you can comment on or make changes to this bug.