mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb/CSS: Serialize overflow correctly
When the x and y values are the same, we only want to serialize one. This gets us 10 local WPT subtest passes. :^)
This commit is contained in:
committed by
Andreas Kling
parent
e4d55a6037
commit
0c39d07b4d
@@ -183,8 +183,14 @@ String ShorthandStyleValue::to_string() const
|
||||
}
|
||||
case PropertyID::ListStyle:
|
||||
return MUST(String::formatted("{} {} {}", longhand(PropertyID::ListStylePosition)->to_string(), longhand(PropertyID::ListStyleImage)->to_string(), longhand(PropertyID::ListStyleType)->to_string()));
|
||||
case PropertyID::Overflow:
|
||||
return MUST(String::formatted("{} {}", longhand(PropertyID::OverflowX)->to_string(), longhand(PropertyID::OverflowY)->to_string()));
|
||||
case PropertyID::Overflow: {
|
||||
auto overflow_x = longhand(PropertyID::OverflowX);
|
||||
auto overflow_y = longhand(PropertyID::OverflowY);
|
||||
if (overflow_x == overflow_y)
|
||||
return overflow_x->to_string();
|
||||
|
||||
return MUST(String::formatted("{} {}", overflow_x->to_string(), overflow_y->to_string()));
|
||||
}
|
||||
case PropertyID::PlaceContent: {
|
||||
auto align_content = longhand(PropertyID::AlignContent)->to_string();
|
||||
auto justify_content = longhand(PropertyID::JustifyContent)->to_string();
|
||||
|
||||
Reference in New Issue
Block a user