mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 03:35:33 +00:00
Bug 1570315 [wpt PR 18202] - [LayoutNG] Discard cache hit result if marked for layout., a=testonly
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
This commit is contained in:
parent
88f720b4df
commit
9f6c0dc9bb
@ -0,0 +1,12 @@
|
||||
<!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>
|
Loading…
Reference in New Issue
Block a user