From 1c4ce2c5f1af150c213b19bed8927b5cab4133b3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 25 Jan 2024 17:42:37 +0100 Subject: [PATCH] LibWeb: Don't check containing block of fragments in hit testing We do not rely on existence of containing block in `PaintableWithLines::hit_test()` so it should be safe to remove this check. --- Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index cb679cdb52..66b697d889 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -754,10 +754,6 @@ Optional PaintableWithLines::hit_test(CSSPixelPoint position, Hit for (auto const& fragment : fragments()) { if (fragment.paintable().stacking_context()) continue; - if (!fragment.paintable().containing_block()) { - dbgln("FIXME: PaintableWithLines::hit_test(): Missing containing block on {}", fragment.layout_node().debug_description()); - continue; - } auto fragment_absolute_rect = fragment.absolute_rect(); if (fragment_absolute_rect.contains(position)) { if (auto result = fragment.paintable().hit_test(position, type); result.has_value())