Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 4365c77

Browse files
bfgeekchromium-wpt-export-bot
authored andcommitted
[LayoutNG] Allow clearance as a valid value in the new-fc DCHECK.
Patch: https://chromium-review.googlesource.com/c/chromium/src/+/1692627 Made us consider inline-level OOF-positioned nodes as adjoining, as their static-position depends on where other floats are placed. During the first pass the BFC block-offset gets resolved here: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc?l=986&rcl=e6157bb7afb778d5c15bb2bb09a457d9632151da This aborts as it has an adjoining inline-OOF, and *doesn't* resolve the BFC block-offset at |child_bfc_offset_estimate| instead applying clearance. Upon the second pass we now hit the DCHECK as neither of the options has clearance applied. Bug: 987004 Change-Id: I2634d56726a4664c869b2ecfa1e7a8a13458e78f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731917 Commit-Queue: Ian Kilpatrick <[email protected]> Reviewed-by: Morten Stenshorne <[email protected]> Cr-Commit-Position: refs/heads/master@{#684426}
1 parent cd19dbd commit 4365c77

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<script src="/resources/testharness.js"></script>
3+
<script src="/resources/testharnessreport.js"></script>
4+
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=987004">
5+
<meta name="assert" content="The renderer should not crash.">
6+
<div style="width: 100px; overflow: hidden;">
7+
<div style="float: left; width: 100%; height: 20px; background: hotpink;"></div>
8+
<div style="clear: both;">
9+
<span style="position: absolute; width: 10px; height: 10px; background: orange;"></span>
10+
<div style="height: 10px; background: green; overflow: hidden;"></div>
11+
</div>
12+
</div>
13+
<script>
14+
test(() => {
15+
}, 'Test passes if the renderer does not crash.');
16+
</script>

0 commit comments

Comments
 (0)