mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 03:27:15 +02:00
LibWeb: Validate literal numeric values at parse time
This brings a couple of advantages: - Previously we relied on the caller validating the parsed value was in bounds after the fact - this was usually fine but there are a couple of places that it was forgotten (see the tests added in this commit), requiring the bounds to be passed as arguments makes us consider the desired range more explicitly. - In a future commit we will use the passed bounds as the clamping bounds for computed values, removing the need for the existing `ValueParsingContext` based method we have at the moment. - Generating code is easier with this approach
This commit is contained in:
Notes:
github-actions[bot]
2026-04-22 13:25:26 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/76250ba1420 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8959 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,15 @@
|
||||
<!doctype html>
|
||||
<style>
|
||||
#foo {
|
||||
border-top-left-radius: -1px;
|
||||
border-top-right-radius: 1px -1px;
|
||||
border-bottom-right-radius: -1px 1px;
|
||||
border-bottom-left-radius: -1px -1px;
|
||||
}
|
||||
</style>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
println(document.styleSheets[0].cssRules[0].cssText);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user