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:
parent
fe5c2b7bb9
commit
ec43f7a2b0
7 changed files with 53 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue