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

LibWeb: Add Layout::Node::is_positioned()

Any node that has a CSS position other than "static" is positioned.
This commit is contained in:
Andreas Kling 2020-12-06 19:54:23 +01:00
parent 59de4adb60
commit 85a1bd6803
2 changed files with 6 additions and 0 deletions

View file

@ -192,6 +192,11 @@ bool Node::is_floating() const
return style().float_() != CSS::Float::None;
}
bool Node::is_positioned() const
{
return has_style() && style().position() != CSS::Position::Static;
}
bool Node::is_absolutely_positioned() const
{
if (!has_style())