Automatic update from web-platform-tests Enforce scroll axis constraints in single-axis containers The SingleAxisScrollContainers feature allows containers to be configured to scroll along only one axis via CSS overflow properties. Previously, scroll APIs like scrollTo and scrollIntoView did not respect these constraints and would incorrectly apply offsets to both axes. This change updates PaintLayerScrollableArea to accurately reflect single-axis scrollability. The scrollable delta for the maximum scroll offset is now set to zero for non-scrollable axes. Adds tests to ensure scrollIntoView and style changes to single-axis scroll container work as expected. Fixed: 496515802 Change-Id: I7cfa72d64feceb0daf060dc77754acf1a0799ee0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7702333 Auto-Submit: Free Debreuil <freedebreuil@google.com> Reviewed-by: Robert Flack <flackr@chromium.org> Commit-Queue: Free Debreuil <freedebreuil@google.com> Cr-Commit-Position: refs/heads/main@{#1614582} -- wpt-commits: 2ae012c5ca1d0c85a886e0ff797d44193f78f8b0 wpt-pr: 58878
44 lines
768 B
HTML
44 lines
768 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Visual clamp single-axis overflow: scroll to clip on dynamic style changes (Reference)</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
}
|
|
|
|
#expected {
|
|
position: relative;
|
|
width: 100px;
|
|
height: 100px;
|
|
background: rgb(0, 0, 255);
|
|
}
|
|
|
|
#top-band {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100px;
|
|
height: 50px;
|
|
background: rgb(0, 255, 0);
|
|
}
|
|
|
|
#x-marker {
|
|
position: absolute;
|
|
top: 50px;
|
|
left: 0;
|
|
width: 20px;
|
|
height: 50px;
|
|
background: rgb(255, 255, 0);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="expected">
|
|
<div id="top-band"></div>
|
|
<div id="x-marker"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|