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.
This commit is contained in:
parent
270bbf43ab
commit
1c4ce2c5f1
Notes:
sideshowbarker
2024-07-16 21:39:23 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/1c4ce2c5f1 Pull-request: https://github.com/SerenityOS/serenity/pull/22939 Reviewed-by: https://github.com/awesomekling
1 changed files with 0 additions and 4 deletions
|
@ -754,10 +754,6 @@ Optional<HitTestResult> 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())
|
||||
|
|
Loading…
Add table
Reference in a new issue