mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
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`
This commit is contained in:
Notes:
github-actions[bot]
2026-01-13 10:41:15 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/9af90f81bf2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7420 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,18 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user