mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-18 23:12:02 +00:00
Browsers such as Chrome and Firefox apply an arbitrary scale to the current font size if `normal` is used for `line-height`. Firefox uses 1.2 while Chrome uses 1.15. Let's go with the latter for now, it's relatively easy to change if we ever want to go back on that decision. This also requires updating the expectations for a lot of layout tests. The upside of this is that it's a bit easier to compare our layout results to other browsers', especially Chrome.
50 lines
1.3 KiB
HTML
50 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<style type="text/css">
|
|
#container {
|
|
border: 1px solid black;
|
|
height: 200px;
|
|
overflow: scroll;
|
|
}
|
|
|
|
p {
|
|
margin: 0;
|
|
}
|
|
|
|
p:hover {
|
|
background-color: yellow;
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
<div id=container>
|
|
<p id="line-1">Line 1</p>
|
|
<p id="line-2">Line 2</p>
|
|
<p id="line-3">Line 3</p>
|
|
<p id="line-4">Line 4</p>
|
|
<p id="line-5">Line 5</p>
|
|
<p id="line-6">Line 6</p>
|
|
<p id="line-7">Line 7</p>
|
|
<span id="line-8">Line 8</span>
|
|
<p id="line-9">Line 9</p>
|
|
<p id="line-10">Line 10</p>
|
|
<p id="line-11">Line 11</p>
|
|
<p id="line-12">Line 12</p>
|
|
<p id="line-13">Line 13</p>
|
|
<p id="line-14">Line 14</p>
|
|
<p id="line-15">Line 15</p>
|
|
<p id="line-16">Line 16</p>
|
|
<p id="line-17">Line 17</p>
|
|
<p id="line-18">Line 18</p>
|
|
<p id="line-19">Line 19</p>
|
|
<p id="line-20">Line 20</p>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
const scrollContainer = document.getElementById("container");
|
|
scrollContainer.scrollTop = 100;
|
|
test(() => {
|
|
printElement(internals.hitTest(10, 10).node.parentNode);
|
|
printElement(internals.hitTest(10, 38).node.parentNode);
|
|
});
|
|
</script>
|