Bug 1665988 [wpt PR 25631] - Reland: "[layout] Ensure fragment tree consistency.", a=testonly

Automatic update from web-platform-tests
Reland: "[layout] Ensure fragment tree consistency."

Original change description:
> This patch ensures that we always have a "consistent" fragment-tree (or
> rather a portion of a fragment-tree if we have legacy nodes).

> Previously it was possible for a fragment-tree to become inconsistent
> whenever we performed layout from a subtree root. Now when we layout
> from a node like this, we rebuild the "spine" of the tree.

> After this change we'll be able to remove most "PostLayout" calls,
> except where they are used for building this "consistent" tree.

The first change had two issues.
1) Cloning a part of the fragment tree which had its layout-objects
   removed from the tree. The fix for this specific issue is to stop
   re-building the spine of the tree when we encounter an object which
   needs layout.
2) AbstractInlineTextBox holding a stale pointer to an NGFragmentItem.
   The fix for this specific issue is to call:
   DetachAbstractInlineTextBoxesIfNeeded on any NGFragmentItem(s) which
   have an associated LayoutText.

Bug: 1066616
Change-Id: Iade8d4c2e7ae9129863d3b295271da944ffec81e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418978
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808453}

--

wpt-commits: 6140eb48e119a49c77ac3f0031f1b8daebdcff7b
wpt-pr: 25631
This commit is contained in:
Ian Kilpatrick 2020-09-22 09:16:35 +00:00 коммит произвёл moz-wptsync-bot
Родитель 9bec67dabc
Коммит 8d0d192102
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,12 @@
<!DOCTYPE html>
<link rel="help" href="https://crbug.com/1129563">
<body style="contain: size layout;">
<div id="target" style="contain: size layout;"></div>
<div id="child"></div>
</body>
<script>
document.body.offsetTop;
const target = document.getElementById('target');
const child = document.getElementById('child');
target.appendChild(child);
</script>