forked from mirrors/gecko-dev
Automatic update from web-platform-tests [LayoutNG] Discard cache hit result if marked for layout. (continued from (abandoned) CL:1719269) During relayout, when we get a cache hit for a node, we still recalculate overflow (why?). This may cause scrollbars to appear or disappear, which will mark for layout. If this happens, we need to discard the cached result and perform regular layout instead. There *may* be legitimate reasons for adding or removing scrollbars on a node that doesn't need relayout (although I cannot think of any), but in this case (the test case), we gain a scrollbar because of some amazing code in LayoutBlock::ComputeLayoutOverflow(), which adds 1px hardcodedly, to the overflow rectangle width. Bug: 919415 Change-Id: Icd49db76065f8ac50ff3616b97c0d05ca0e2b348 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728562 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Aleks Totic <atotic@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#682936} -- wpt-commits: ac3f2f49d5031ad0ab4c168ea39ff00e15aa92af wpt-pr: 18202
12 lines
496 B
HTML
12 lines
496 B
HTML
<!DOCTYPE html>
|
|
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
|
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=919415">
|
|
<div id="target" style="position:absolute; overflow:auto; height:100px; top:100px;"></div>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script>
|
|
test(()=> {
|
|
document.body.offsetTop;
|
|
target.style.top = "50px";
|
|
}, "no crash");
|
|
</script>
|