Skip to content

Commit

Permalink
Change where we force main-thread scrolling for overflow:hidden
Browse files Browse the repository at this point in the history
Previously the logic depended on RasterInducingScroll, and didn't work
if the scroller is not painted. Now add main-thread scrolling on the
blink scroll node in PaintPropertyTreeBuilder.

Bug: 356436619
Change-Id: Ifebc2b33e6abdede7881d962407749df6742a1cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5823800
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1348985}
  • Loading branch information
wangxianzhu authored and chromium-wpt-export-bot committed Aug 30, 2024
1 parent a97e8f7 commit f4430cf
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions css/cssom-view/overflow-hidden-smooth-scroll-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html class="test-wait">
<link rel="help" href="https://drafts.csswg.org/cssom-view/#concept-smooth-scroll">
<link rel="help" href="https://crbug.com/356436619">
<body style="font-size: 4000px">
A
<div id=container style="overflow: hidden">
B
<div style="overflow: scroll">C</div>
</div>
</div>
</body>
<script>
function doTest() {
container.scrollLeft = 1;
container.addEventListener('scrollend', () => {
document.documentElement.classList.remove('test-wait');
});
container.style.scrollBehavior = 'smooth';
container.scrollLeft = 20;
}
window.addEventListener('load', doTest);
</script>

0 comments on commit f4430cf

Please sign in to comment.