1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibWeb: Implement and use OverflowStyleValue

Also added a test page for the `overflow` properties. They apparently
don't work, but at least they do parse.
This commit is contained in:
Sam Atkins 2021-08-09 14:54:40 +01:00 committed by Andreas Kling
parent 168865dbdc
commit e6c0cb5a7f
6 changed files with 268 additions and 2 deletions

View file

@ -220,8 +220,17 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
}
if (property_id == CSS::PropertyID::Overflow) {
style.set_property(CSS::PropertyID::OverflowX, value);
style.set_property(CSS::PropertyID::OverflowY, value);
if (value.is_overflow()) {
auto& overflow = static_cast<OverflowStyleValue const&>(value);
style.set_property(CSS::PropertyID::OverflowX, overflow.overflow_x());
style.set_property(CSS::PropertyID::OverflowY, overflow.overflow_y());
return;
}
if (value.is_builtin()) {
style.set_property(CSS::PropertyID::OverflowX, value);
style.set_property(CSS::PropertyID::OverflowY, value);
return;
}
return;
}