mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +00:00
LibWeb: Resolve percentages for opacity properties at parse time
This commit is contained in:
parent
86c8dbbf90
commit
269d5bb40e
Notes:
github-actions[bot]
2025-06-19 08:28:47 +00:00
Author: https://github.com/tcl3
Commit: 269d5bb40e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5137
Reviewed-by: https://github.com/gmta ✅
6 changed files with 87 additions and 4 deletions
|
@ -377,8 +377,6 @@ float ComputedProperties::resolve_opacity_value(CSSStyleValue const& value)
|
|||
else
|
||||
dbgln("Unable to resolve calc() as opacity (number): {}", value.to_string(SerializationMode::Normal));
|
||||
}
|
||||
} else if (value.is_percentage()) {
|
||||
unclamped_opacity = value.as_percentage().percentage().as_fraction();
|
||||
}
|
||||
|
||||
return clamp(unclamped_opacity, 0.0f, 1.0f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue