LibWeb: Remove font face from document font source when disconnecting

When a CSS-connected FontFace is disconnected from it's associated
`CSSFontFaceRule` it should be removed from the Document's font source
This commit is contained in:
Callum Law
2026-01-10 15:16:08 +13:00
committed by Tim Ledbetter
parent d8f9caf853
commit df39394a7e
Notes: github-actions[bot] 2026-01-10 03:33:53 +00:00
4 changed files with 29 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<style>
@font-face {
font-family: Foo;
src: url("./Foo.woff");
}
</style>
<script src="../include.js"></script>
<script>
promiseTest(async () => {
await document.fonts.ready.then(() => {
println(document.fonts.size);
document.querySelector("style").remove();
println(document.fonts.size);
});
});
</script>