Commit 1b893ba0 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[FragmentItem] Use PostLayoutChildren to compute ink overflow

This patch changes |RecalcFloatingDescendantsVisualOverflow|
to use |PostLayoutChildren| when traversing fragment tree,
to avoid reading stale |NGPhysicalFragment|.

This patch is speculative.

Bug: 965639, 1095577
Change-Id: I86d8f054832f921d91bb8949f3aa956e940de7e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2249281Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779382}
parent 22e28d6a
...@@ -4549,7 +4549,7 @@ void LayoutBlockFlow::RecalcFloatingDescendantsVisualOverflow( ...@@ -4549,7 +4549,7 @@ void LayoutBlockFlow::RecalcFloatingDescendantsVisualOverflow(
const NGPhysicalContainerFragment& fragment) { const NGPhysicalContainerFragment& fragment) {
DCHECK(fragment.HasFloatingDescendantsForPaint()); DCHECK(fragment.HasFloatingDescendantsForPaint());
for (const NGLink& child : fragment.Children()) { for (const NGLink& child : fragment.PostLayoutChildren()) {
if (child->IsFloating()) { if (child->IsFloating()) {
child->GetMutableLayoutObject() child->GetMutableLayoutObject()
->RecalcNormalFlowChildVisualOverflowIfNeeded(); ->RecalcNormalFlowChildVisualOverflowIfNeeded();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment