mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
LibWeb: Use is_viewport helper
This method exists precicely to simplify the check being done here, so lets use it!
This commit is contained in:
parent
6ad93d2b21
commit
d2ca522540
|
|
@ -865,7 +865,7 @@ TraversalDecision PaintableBox::hit_test(CSSPixelPoint position, HitTestType typ
|
|||
if (hit_test_scrollbars(position_adjusted_by_scroll_offset, callback) == TraversalDecision::Break)
|
||||
return TraversalDecision::Break;
|
||||
|
||||
if (layout_node_with_style_and_box_metrics().is_viewport()) {
|
||||
if (is_viewport()) {
|
||||
auto& viewport_paintable = const_cast<ViewportPaintable&>(static_cast<ViewportPaintable const&>(*this));
|
||||
viewport_paintable.build_stacking_context_tree_if_needed();
|
||||
viewport_paintable.document().update_paint_and_hit_testing_properties_if_needed();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user