-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better handling of OOFs inside clipped containers.
If we're inside a fragmentation context, and the containing block of an out-of-flow positioned element is inside a container that clips block direction overflow, keep track of the offset to the clipping container. This is used by printing, as an attempt to prevent the OOF from ending up in a fragmentainer that precedes the fragmentainer that contains the clipping container. This helps pre-paint set the correct clip rectangle. If the OOF ends up in an earlier fragmentainer, we would have no idea what clip rectangle to use, since the clipping container isn't represented there. This eliminates the need for the is_fragmented_inside_clipped_container flag, since the new approach provides the same information, and more. Besides, we failed to update is_fragmented_inside_clipped_container in nested OOF situations, so that the inner OOF wouldn't see any clipped container established by the containing block (or an ancestor) of the outer OOF. Rather than fixing the redundant flag, remove it. Some of the printing tests look sillier than I'd like, but this is due to the fact that when generating print output, content that should have been hidden entirely by clipping still bleeds through. This behavior change is limited to printing. It doesn't really make sense to do the same for multicol, since columns are laid out in the inline direction. The previous column isn't visually above the next column, so it wouldn't look right. For printing the previous page is just above the next page, visually, though. The new multicol tests in this CL are there just to illustrate that we don't want this behavior in multicol. They also pass without this CL. (cherry picked from commit c52a430) Bug: 1400739 Change-Id: Ie05a9427dab454e7b1481bab1e05286f9c64d943 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4136240 Reviewed-by: Alison Maher <almaher@microsoft.com> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1089157} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4147198 Auto-Submit: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/branch-heads/5481@{#174} Cr-Branched-From: 130f3e4-refs/heads/main@{#1084008}
- Loading branch information
Showing
32 changed files
with
540 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.