RESOLVED FIXED272280
Avoid over-eager clipping of child layers in multicolumn
https://bugs.webkit.org/show_bug.cgi?id=272280
Summary Avoid over-eager clipping of child layers in multicolumn
Ahmad Saleem
Reported 2024-04-06 10:58:39 PDT
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
Radar WebKit Bug Importer
Comment 1 2024-04-13 10:59:16 PDT
Ahmad Saleem
Comment 2 2024-06-23 14:52:52 PDT
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
Comment 3 2025-06-26 18:15:35 PDT
EWS
Comment 4 2025-10-28 11:53:17 PDT
Committed 302249@main (1ff6d9ccac00): <https://commits.webkit.org/302249@main> Reviewed commits have been landed. Closing PR #47276 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.