Bug 289143
| Summary: | Percentage height becomes auto if containing block height is auto | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | Ahmad Saleem <ahmad.saleem792> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar, WPTImpact |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/146207504>
Ahmad Saleem
Pull request: https://github.com/WebKit/WebKit/pull/41905
Ahmad Saleem
*** This bug has been marked as a duplicate of bug 289438 ***