1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

LibWeb: Enable CSS clip for position: fixed elements

This fixes the clip-absolute-positioned-002 web platform test.
This commit is contained in:
MacDue 2022-08-07 23:26:25 +01:00 committed by Andreas Kling
parent 6b2e93eb7c
commit 038017ce11

View file

@ -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) {