Bug 1653594 [wpt PR 24646] - Apply |PostLayout| to |LayoutBox| instead of |LayoutBlockFlow|, a=testonly

Automatic update from web-platform-tests
Apply |PostLayout| to |LayoutBox| instead of |LayoutBlockFlow|

|PostLayout| was limited to |LayoutBlockFlow| because
crbug.com/965639 could happen only to|LayoutBlockFlow|,
but following conditions have changed:

* Only |LayoutBlockFlow| could be relayout boundary, until
  r772560 <crrev.com/c/2219312>.
* Only |LayoutBlockFlow| was laid out by LayoutNG, until
  |LayoutNGFlexibleBox| inherits from |LayoutBlock|.

This patch changes |PostLayout| to work for |LayoutBox|.

In doing so, two changes were made:
1. |CurrentFragment| is replaced with |GetPhysicalFragment|
   because the former is not available for |LayoutBox|.
2. Stopped checking |IsRelayoutBoundary|. Though it is the
   only case crbug.com/965639 can happen as far as we're
   aware of, checking |NGPhysicalFragment| is more
   essential and sufficient.

The change 1 also helps <crbug.com/1061423>, but we may need
different approach to support block fragmentation.

Bug: 1102151, 965639
Change-Id: Id83be614066392a4c58c8b03bd16ee57ad82e145
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302984
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789656}

--

wpt-commits: f140180e49e4f8aed5960855947c4273bbefd9eb
wpt-pr: 24646
This commit is contained in:
Koji Ishii 2020-07-22 20:01:04 +00:00 коммит произвёл moz-wptsync-bot
Родитель 39e4eaf618
Коммит ad82721cfd
1 изменённых файлов: 24 добавлений и 0 удалений

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

@ -0,0 +1,24 @@
<!doctype html>
<title>Test `contain: strict` to Flexbox does not crash</title>
<link rel="help" href="https://www.w3.org/TR/css-contain-1/#contain-property">
<link rel="author" href="mailto:kojii@chromium.org">
<style>
body {
contain: strict;
display: flex;
}
html {
outline: 1px auto;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="target"></div>
<div id="log"></div>
<script>
test(() => {
document.body.offsetTop;
target.style.width = '100px';
document.body.offsetTop;
}, "Pass if no crash");
</script>