[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:Alison Maher <almaher@microsoft.com> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/main@{#962174}
Loading
Please register or sign in to comment