mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
b821f7b283
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.
67 lines
1.6 KiB
HTML
67 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="reference/scrollable-contains-boxes-with-hidden-overflow-2-ref.html" />
|
|
<style>
|
|
* {
|
|
scrollbar-width: none;
|
|
}
|
|
html {
|
|
background: white;
|
|
}
|
|
body {
|
|
position: absolute;
|
|
inset: 0px;
|
|
display: flex;
|
|
background: pink;
|
|
}
|
|
#outer {
|
|
margin-top: 100px;
|
|
overflow-x: hidden;
|
|
overflow-y: scroll;
|
|
background: orange;
|
|
}
|
|
#inner {
|
|
height: 1000px;
|
|
background: magenta;
|
|
}
|
|
.item {
|
|
box-sizing: border-box;
|
|
border: 1px solid black;
|
|
width: 200px;
|
|
height: 50px;
|
|
overflow: hidden;
|
|
background: lime;
|
|
}
|
|
</style><body><div id="outer"><div id="inner">
|
|
<div class="item">1</div>
|
|
<div class="item">2</div>
|
|
<div class="item">3</div>
|
|
<div class="item">4</div>
|
|
<div class="item">5</div>
|
|
<div class="item">6</div>
|
|
<div class="item">7</div>
|
|
<div class="item">8</div>
|
|
<div class="item">9</div>
|
|
<div class="item">10</div>
|
|
<div class="item">11</div>
|
|
<div class="item">12</div>
|
|
<div class="item">13</div>
|
|
<div class="item">14</div>
|
|
<div class="item">15</div>
|
|
<div class="item">16</div>
|
|
<div class="item">17</div>
|
|
<div class="item">18</div>
|
|
<div class="item">19</div>
|
|
<div class="item">20</div>
|
|
<div class="item">21</div>
|
|
<div class="item">22</div>
|
|
<div class="item">23</div>
|
|
<div class="item">24</div>
|
|
<div class="item">25</div>
|
|
<div class="item">26</div>
|
|
<div class="item">27</div>
|
|
<div class="item">28</div>
|
|
<div class="item">29</div>
|
|
<script>
|
|
const scrollContainer = document.getElementById("outer");
|
|
scrollContainer.scrollTop = 500;
|
|
</script>
|