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

Commit 65cb7ea

Browse files
bfgeekchromium-wpt-export-bot
authored andcommitted
[LayoutNG] Fix invalidation issue with grids.
with: https://chromium-review.googlesource.com/c/chromium/src/+/1554113 We introduced a new flag for SelfNeedsLayoutForAvailableSpace. For any alignment change this was set to true for grid-items. SelfNeedsLayout reports true if this flag is set, or if the normal SelfNeedsLayoutForStyle is true. This caused an issue where we weren't performing layout on the whole tree however. If a child of the grid-item (whose alignment changed) was marked for needing style-layout, it would try and mark its container chain for layout, hit the grid item, and abort, as it already "needed" layout. Within NG we'd come across the grid-item, hit the cache, or perform simplified layout, never clearing layout, having a bad ptr, etc. This is a conservative fix so that this can be merged. Bug: 991446 Change-Id: I75edebc864eb470ebfad757966ddc0e0248de153 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1741439 Commit-Queue: Ian Kilpatrick <[email protected]> Commit-Queue: Emil A Eklund <[email protected]> Auto-Submit: Ian Kilpatrick <[email protected]> Reviewed-by: Emil A Eklund <[email protected]> Cr-Commit-Position: refs/heads/master@{#684966}
1 parent e6b498e commit 65cb7ea

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

css/css-grid/chrome-crash-001.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=991446">
3+
<meta name="assert" content="The renderer should not crash.">
4+
<script src="/resources/testharness.js"></script>
5+
<script src="/resources/testharnessreport.js"></script>
6+
<body style="display: inline-grid; align-items: end;">
7+
<div style="border-top-color: inherit;"></div>
8+
text
9+
</body>
10+
<script>
11+
test(() => {
12+
document.body.offsetTop;
13+
document.body.style.alignItems = '';
14+
document.body.offsetTop;
15+
}, 'The renderer should not crash.');
16+
</script>

0 commit comments

Comments
 (0)