mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +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:
parent
59de4adb60
commit
85a1bd6803
2 changed files with 6 additions and 0 deletions
|
@ -192,6 +192,11 @@ bool Node::is_floating() const
|
||||||
return style().float_() != CSS::Float::None;
|
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
|
bool Node::is_absolutely_positioned() const
|
||||||
{
|
{
|
||||||
if (!has_style())
|
if (!has_style())
|
||||||
|
|
|
@ -133,6 +133,7 @@ public:
|
||||||
virtual void after_children_paint(PaintContext&, PaintPhase) {};
|
virtual void after_children_paint(PaintContext&, PaintPhase) {};
|
||||||
|
|
||||||
bool is_floating() const;
|
bool is_floating() const;
|
||||||
|
bool is_positioned() const;
|
||||||
bool is_absolutely_positioned() const;
|
bool is_absolutely_positioned() const;
|
||||||
bool is_fixed_position() const;
|
bool is_fixed_position() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue