Bug 272280
| Summary: | Avoid over-eager clipping of child layers in multicolumn | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | Ahmad Saleem <ahmad.saleem792> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bfulgham, karlcow, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
While going through Blink's commit, I came across another failing test:
Test Case: https://jsfiddle.net/z8d5auqe/show
^ Safari 17.4.1 fails it while Chrome Canary 125 and Firefox Nightly 126 matches each other.
Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/e500cbd3ba36bf3216087481790f5aece0e778a5
WebKit Source: https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderFragmentContainer.cpp#154
___
This compiles and fix this above test case:
LayoutRect RenderFragmentContainer::overflowRectForFragmentedFlowPortion(const LayoutRect& fragmentedFlowPortionRect, bool isFirstPortion, bool isLastPortion) const
{
ASSERT(isValid());
// Only clip along the block direction axis.
LayoutRect clipRect(LayoutRect::infiniteRect());
if (m_fragmentedFlow->isHorizontalWritingMode()) {
if (!isFirstPortion)
clipRect.shiftYEdgeTo(fragmentedFlowPortionRect.y());
if (!isLastPortion)
clipRect.shiftMaxYEdgeTo(fragmentedFlowPortionRect.maxY());
return clipRect;
}
if (!isFirstPortion)
clipRect.shiftYEdgeTo(fragmentedFlowPortionRect.x());
if (!isLastPortion)
clipRect.shiftMaxYEdgeTo(fragmentedFlowPortionRect.maxX());
return clipRect;
}
_____
NOTE - I have ran both 'WPT' (CSS-Contain) and (CSS-MULTICOL) and no progression and regressions.
Just raising so we can track and fix it.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/126413036>
Ahmad Saleem
Correct one:
LayoutRect RenderFragmentContainer::overflowRectForFragmentedFlowPortion(const LayoutRect& fragmentedFlowPortionRect, bool isFirstPortion, bool isLastPortion) const
{
ASSERT(isValid());
// Only clip along the block direction axis.
LayoutRect clipRect(LayoutRect::infiniteRect());
if (m_fragmentedFlow->isHorizontalWritingMode()) {
if (!isFirstPortion)
clipRect.shiftYEdgeTo(fragmentedFlowPortionRect.y());
if (!isLastPortion)
clipRect.shiftMaxYEdgeTo(fragmentedFlowPortionRect.maxY());
return clipRect;
}
if (!isFirstPortion)
clipRect.shiftXEdgeTo(fragmentedFlowPortionRect.x());
if (!isLastPortion)
clipRect.shiftMaxXEdgeTo(fragmentedFlowPortionRect.maxX());
return clipRect;
}
___
It leads to following legit WPT failure:
css/css-break/out-of-flow-in-multicolumn-018.htm
while also progression (one) here:
css/css-break/relpos-inline-hit-testing.html
Additionally, just 0.01% difference here:
unbreakable-block-too-tall-at-column-start.html
___
PR Attempt - https://github.com/WebKit/WebKit/pull/26993
Ahmad Saleem
Pull request: https://github.com/WebKit/WebKit/pull/47276
EWS
Committed 302249@main (1ff6d9ccac00): <https://commits.webkit.org/302249@main>
Reviewed commits have been landed. Closing PR #47276 and removing active labels.