summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Layout/LayoutNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibWeb/Layout/LayoutNode.cpp')
-rw-r--r--Libraries/LibWeb/Layout/LayoutNode.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutNode.cpp b/Libraries/LibWeb/Layout/LayoutNode.cpp
index 1c8a43d718..75708df343 100644
--- a/Libraries/LibWeb/Layout/LayoutNode.cpp
+++ b/Libraries/LibWeb/Layout/LayoutNode.cpp
@@ -200,12 +200,16 @@ Gfx::FloatPoint LayoutNode::box_type_agnostic_position() const
bool LayoutNode::is_absolutely_positioned() const
{
+ if (!has_style())
+ return false;
auto position = style().position();
return position == CSS::Position::Absolute || position == CSS::Position::Fixed;
}
bool LayoutNode::is_fixed_position() const
{
+ if (!has_style())
+ return false;
return style().position() == CSS::Position::Fixed;
}