Keep side-by-side floats on the same page#2838
Closed
Sanjays2402 wants to merge 1 commit into
Closed
Conversation
An overflowing float was deferred whenever an earlier sibling float had already been laid out, even when both floats remained side by side at the top of an otherwise empty page. Keep such floats on the current page while preserving page breaks for floats pushed down by earlier content. Add regression coverage for two side-by-side floats taller than the page. Fixes Kozea#2790
Member
|
We don’t want to force all floats at the top of their parents to be displayed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2790.
An overflowing float was deferred whenever an earlier sibling float existed, even when both remained side by side at the top of an otherwise empty page. Keep that top-aligned float on the current page while preserving page breaks for floats pushed down by earlier content.
The regression test fails by creating two pages before the fix and passes with both floats on one page. The float layout tests pass (36 passed, 1 xfailed); the broader layout suite passes with the pre-existing Ghostscript/font-dependent cases excluded (900 passed, 12 xfailed).