LibWeb: Use correct specifier to pad font language override value

This commit is contained in:
Tim Ledbetter 2024-11-18 16:37:35 +00:00 committed by Tim Flynn
parent 96a35767b6
commit 7fe110225b
Notes: github-actions[bot] 2024-11-18 22:39:04 +00:00
3 changed files with 12 additions and 1 deletions

View file

@ -5777,7 +5777,7 @@ RefPtr<CSSStyleValue> Parser::parse_font_language_override_value(TokenStream<Com
}
transaction.commit();
if (length < 4)
return StringStyleValue::create(MUST(String::formatted("{<4}", string_value)));
return StringStyleValue::create(MUST(String::formatted("{:<4}", string_value)));
return string;
}

View file

@ -0,0 +1 @@
PASS (didn't crash)

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const element = document.createElement('div');
element.style.fontLanguageOverride = '"eng"';
document.body.appendChild(element);
println("PASS (didn't crash)");
});
</script>