1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibWeb: Add initial version of pointer-events CSS property

This commit is contained in:
huwdp 2021-10-05 19:47:13 +01:00 committed by Linus Groh
parent fe5c2b7bb9
commit ec43f7a2b0
7 changed files with 53 additions and 7 deletions

View file

@ -355,6 +355,22 @@ Optional<CSS::TextAlign> StyleProperties::text_align() const
}
}
Optional<CSS::PointerEvents> StyleProperties::pointer_events() const
{
auto value = property(CSS::PropertyID::PointerEvents);
if (!value.has_value())
return {};
switch (value.value()->to_identifier()) {
case CSS::ValueID::Auto:
return CSS::PointerEvents::Auto;
case CSS::ValueID::None:
return CSS::PointerEvents::None;
default:
return {};
}
}
Optional<CSS::WhiteSpace> StyleProperties::white_space() const
{
auto value = property(CSS::PropertyID::WhiteSpace);