Files
ladybird/Tests/LibWeb/Text/input/css/css-connected-font-face-base-url.html
Callum Law 9af90f81bf LibWeb: Use correct base-url for CSS-connected FontFace
Previously we would always try to load the font URL relative to the
document's base URL. This commit means that for CSS-connected
`FontFace`s we now try to load relative to the URL of the stylesheet
that contains the associated `CSSFontFaceRule`
2026-01-13 10:40:00 +00:00

19 lines
664 B
HTML

<!DOCTYPE html>
<html>
<link href="../../../Ref/data/fonts/ahem.css" rel="stylesheet" />
<script src="../include.js"></script>
<script>
promiseTest(async () => {
await document.fonts.ready.then(async () => {
await document.fonts
.load('10px \\"Ahem\\"')
.then(loadedFonts => {
if (loadedFonts.length == 1) println("PASS!");
else println("FAIL! Didn't match any fonts.");
})
.catch(e => println("FAIL! Exception during font load: " + e));
});
});
</script>
</html>