mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
Previously we would just set the attributes to the serialized descriptors, even if they were the empty string. We now apply defaults when we have empty descriptors and apply parsing logic from the various `set_*` methods (only applicable to `font-family` so far where we now extract the value from either a string or a custom-ident) Fixes an issue in some css/css-shapes WPT tests where we weren't properly matching fonts.
19 lines
658 B
HTML
19 lines
658 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>
|