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:
parent
168865dbdc
commit
e6c0cb5a7f
6 changed files with 268 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue