mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 06:37:35 +00:00
LibWeb: Remove hand-rolled is_foo() helpers in Layout::Node classes
This commit is contained in:
parent
3bb0cb2202
commit
07dd73c351
31 changed files with 39 additions and 82 deletions
|
@ -94,7 +94,7 @@ HitTestResult BlockBox::hit_test(const Gfx::IntPoint& position, HitTestType type
|
|||
if (is<Box>(fragment.layout_node()) && downcast<Box>(fragment.layout_node()).stacking_context())
|
||||
continue;
|
||||
if (enclosing_int_rect(fragment.absolute_rect()).contains(position)) {
|
||||
if (fragment.layout_node().is_block())
|
||||
if (is<BlockBox>(fragment.layout_node()))
|
||||
return downcast<BlockBox>(fragment.layout_node()).hit_test(position, type);
|
||||
return { fragment.layout_node(), fragment.text_index_at(position.x()) };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue