haikuwebkit/LayoutTests/fast/multicol/widow-relayout-with-border-...

2 lines
1 B
Raw Permalink Normal View History

Fit-border-to-line may change the layout constraints between 2 paginated line layouts https://bugs.webkit.org/show_bug.cgi?id=223169 <rdar://73147358> Reviewed by Antti Koivisto. Source/WebCore: In paginated context, we keep triggering layout until all the widows/orphans are cleared. This happens within the same layout frame (in practice this is a recursive call in RenderBlockFlow::layoutBlock -see relayoutToAvoidWidows). The constraints for these subsequent/recursive layouts should stay the same in order to be able to clear any potential widows/orphans (e.g first layout produces 5 lines but we can only have 3 on this page due to the widow/orphan values. Now the subsequent/recursive layout is going to break the content at the 3rd line, but if the constraints change in between and this layout only produces 2 lines, we'll keep trying until we manage to produce at least 3 lines. Fit-border-to-line implemented in such an intrusive way that it overrides previously computed logical width (mutates the constraint) -see RenderBlockFlow::fitBorderToLinesIfNeeded) This patch ensures that we bail out of the recursive re-layout if we fail to produce the same set of lines. Test: fast/multicol/widow-relayout-with-border-fit.html * rendering/ComplexLineLayout.cpp: (WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange): LayoutTests: * fast/multicol/widow-relayout-with-border-fit-expected.txt: Added. * fast/multicol/widow-relayout-with-border-fit.html: Added. Canonical link: https://commits.webkit.org/235288@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-15 15:20:36 +00:00