mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-18 22:19:50 +00:00
LibWeb/CSS: Replace CSSUnitValue with DimensionStyleValue
CSSUnitValue is a typed-om type which we will implement separately in the future. However, it still seems useful to give our dimension values a base class. (Maybe they could be templated in the future?) So instead of deleting it entirely, rename it to DimensionStyleValue and make its API match our style better.
This commit is contained in:
parent
7157d19f56
commit
99bce9a94d
Notes:
github-actions[bot]
2025-08-08 14:20:30 +00:00
Author: https://github.com/AtkinsSJ
Commit: 99bce9a94d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5775
Reviewed-by: https://github.com/tcl3 ✅
17 changed files with 65 additions and 52 deletions
|
@ -5486,7 +5486,7 @@ RefPtr<CSS::StyleValue const> parse_nonzero_dimension_value(StringView string)
|
|||
return nullptr;
|
||||
|
||||
// 4. If value is zero, return an error.
|
||||
if (value->is_length() && value->as_length().length().raw_value() == 0)
|
||||
if (value->is_length() && value->as_length().raw_value() == 0)
|
||||
return nullptr;
|
||||
if (value->is_percentage() && value->as_percentage().percentage().value() == 0)
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue