LibWeb/CSS: Add overflow hidden to UA stylesheet for marquee element

This commit is contained in:
Shannon Booth 2024-12-28 19:52:34 +13:00 committed by Tim Ledbetter
commit b165ffc868
Notes: github-actions[bot] 2024-12-28 11:19:22 +00:00
3 changed files with 25 additions and 0 deletions

View file

@ -830,6 +830,7 @@ details[open] > summary:first-of-type {
marquee { marquee {
display: inline-block; display: inline-block;
text-align: initial; text-align: initial;
overflow: hidden !important;
} }
/* 15.5.13 The meter element /* 15.5.13 The meter element

View file

@ -0,0 +1,6 @@
Harness status: OK
Found 1 tests
1 Pass
Pass Marquee should have overflow: hidden !important in the UA stylesheet

View file

@ -0,0 +1,18 @@
<!doctype html>
<meta charset="utf-8">
<title>Marquee forces overflow: hidden</title>
<link rel="help" href="https://html.spec.whatwg.org/#the-marquee-element">
<script src="../../../../resources/testharness.js"></script>
<script src="../../../../resources/testharnessreport.js"></script>
<marquee style="overflow: visible">&nbsp;</marquee>
<marquee style="overflow: scroll">&nbsp;</marquee>
<marquee style="overflow: clip">&nbsp;</marquee>
<marquee style="overflow: auto">&nbsp;</marquee>
<script>
test(() => {
for (let m of document.querySelectorAll("marquee")) {
assert_equals(getComputedStyle(m).overflow, "hidden", m.style);
}
}, "Marquee should have overflow: hidden !important in the UA stylesheet");
</script>