1
0
Fork 0
firefox/testing/web-platform/tests/css/css-scroll-anchoring/wrapped-text.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

28 lines
633 B
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
body {
position: absolute;
font-size: 100px;
width: 200px;
height: 4000px;
line-height: 100px;
}
</style>
abc <b id=b>def</b> ghi
<script>
// Tests anchoring to a text node that is moved by preceding text.
test(() => {
var b = document.querySelector("#b");
var preText = b.previousSibling;
document.scrollingElement.scrollTop = 150;
preText.nodeValue = "abcd efg ";
assert_equals(document.scrollingElement.scrollTop, 250);
}, "Anchoring with text wrapping changes.");
</script>