serenity/Tests/LibWeb/Ref/button-inside-scroll-container.html
Aliaksandr Kalenik b821f7b283 LibWeb: Implement scrollbar painting
Introduces the rendering of scroll thumbs in vertical and horizontal
directions. Currently, the thumbs are purely graphical elements that
do not respond to mouse events. Nevertheless, this is beneficial as it
makes it easier to identify elements that should respond to scrolling
events.

Painting of scrollbars uncovers numerous bugs in the calculation of
scrollable overflow rectangles highlighting all the places where
elements are made scrollable whey they shouldn't be. Positively, this
issue might motivate us to pay more attention to this problem to
eliminate unnecessary scrollbars.

Currently, the scrollbar style is uniform across all platforms: a
semi-transparent gray rectangle with rounded corners.

Also here we add `scrollbar-width: none` to all existing scrolling
ref-tests, so they keep working with this change.
2024-02-28 07:51:13 -05:00

39 lines
993 B
HTML

<!DOCTYPE html>
<link rel="match" href="reference/button-inside-scroll-container-ref.html" />
<style>
* {
scrollbar-width: none;
}
#scrollable {
height: 300px;
overflow: scroll;
}
input[type="submit"] {
display: block;
width: 100px;
height: 100px;
background-color: green;
outline: none;
border: 5px solid magenta;
box-sizing: border-box;
}
</style>
<div id="scrollable">
<input type="submit" value="1" />
<input type="submit" value="2" />
<input type="submit" value="3" />
<input type="submit" value="4" />
<input type="submit" value="5" />
<input type="submit" value="6" />
<input type="submit" value="7" />
<input type="submit" value="8" />
<input type="submit" value="9" />
<input type="submit" value="10" />
</div>
<script>
const scrollContainer = document.getElementById("scrollable");
scrollContainer.scrollTop = 100;
</script>