From 038017ce114559059e93b50909c055f52e9e373a Mon Sep 17 00:00:00 2001 From: MacDue Date: Sun, 7 Aug 2022 23:26:25 +0100 Subject: [PATCH] LibWeb: Enable CSS clip for `position: fixed` elements This fixes the clip-absolute-positioned-002 web platform test. --- Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index b69ae76e05..f92e37a77a 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -114,7 +114,7 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const return; auto clip_rect = computed_values().clip(); - auto should_clip_rect = clip_rect.is_rect() && computed_values().position() == CSS::Position::Absolute; + auto should_clip_rect = clip_rect.is_rect() && layout_box().is_absolutely_positioned(); if (phase == PaintPhase::Background) { if (should_clip_rect) {