mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 13:39:25 +00:00
LibWeb: Store BackgroundSizeStyleValue
sub-values directly
Storing these within LengthPercentage is unnecessary
This commit is contained in:
parent
309ff33278
commit
2ebf446cbf
Notes:
github-actions[bot]
2025-10-07 09:51:23 +00:00
Author: https://github.com/Calme1709
Commit: 2ebf446cbf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6375
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 21 additions and 52 deletions
|
@ -492,8 +492,8 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
|||
if (size_value->is_background_size()) {
|
||||
auto& size = size_value->as_background_size();
|
||||
layer.size_type = CSS::BackgroundSize::LengthPercentage;
|
||||
layer.size_x = size.size_x();
|
||||
layer.size_y = size.size_y();
|
||||
layer.size_x = CSS::LengthPercentageOrAuto::from_style_value(size.size_x());
|
||||
layer.size_y = CSS::LengthPercentageOrAuto::from_style_value(size.size_y());
|
||||
} else if (size_value->is_keyword()) {
|
||||
switch (size_value->to_keyword()) {
|
||||
case CSS::Keyword::Contain:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue