Skip to content
Commit d86fd74f authored by Oriol Brufau's avatar Oriol Brufau Committed by Chromium LUCI CQ
Browse files

[LayoutNG] Avoid calling ContainingBlock() when inserting positioned OOF

InsertIntoLegacyPositionedObjects() used to call ContainingBlock().
But some callers already know it, or it makes more sense to compute it
outside

This patch renames it to InsertIntoLegacyPositionedObjectsOf and adds
a parameter for passing the containing block.

Also, in NGOutOfFlowLayoutPart::LayoutCandidates caller, the containing
block is container_builder_->layout_object_, but that's private, and
container_builder_->GetLayoutObject() is const. As a workaround, this
adds NGBoxFragmentBuilder::InsertLegacyPositionedObject.

Some layout tests seem to have a small improvement (may be noise):
 - layers_overlap_2d: 0-2%
 - layers_overlap_3d: 0-3%
 - abspos: 0-3%

Bug: 1098231
Change-Id: I6553aa247882e9f96ce51936ce39e2fafcdaeb75
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3345802


Reviewed-by: default avatarAlison Maher <almaher@microsoft.com>
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Cr-Commit-Position: refs/heads/main@{#962174}
parent 17c0cb3f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment