mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:18:14 +00:00
LibWeb: Pick up the CSS "visibility" property an honor it when painting
This commit is contained in:
parent
01662b2320
commit
df8ef03957
5 changed files with 33 additions and 1 deletions
|
@ -698,6 +698,23 @@ Optional<CSS::Cursor> StyleProperties::cursor() const
|
|||
}
|
||||
}
|
||||
|
||||
Optional<CSS::Visibility> StyleProperties::visibility() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::Visibility);
|
||||
if (!value.has_value() || !value.value()->is_identifier())
|
||||
return {};
|
||||
switch (value.value()->to_identifier()) {
|
||||
case CSS::ValueID::Visible:
|
||||
return CSS::Visibility::Visible;
|
||||
case CSS::ValueID::Hidden:
|
||||
return CSS::Visibility::Hidden;
|
||||
case CSS::ValueID::Collapse:
|
||||
return CSS::Visibility::Collapse;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
CSS::Display StyleProperties::display() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::Display);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue