diff --git a/third_party/blink/renderer/core/paint/box_fragment_painter.cc b/third_party/blink/renderer/core/paint/box_fragment_painter.cc index fb374f6b8c869..a5b1eb4314607 100644 --- a/third_party/blink/renderer/core/paint/box_fragment_painter.cc +++ b/third_party/blink/renderer/core/paint/box_fragment_painter.cc @@ -2411,8 +2411,15 @@ bool BoxFragmentPainter::NodeAtPoint(const HitTestContext& hit_test, bounds_rect.Move(physical_offset); } if (pointer_events_bounding_box) [[unlikely]] { - bounds_rect = PhysicalRect::EnclosingRect( + PhysicalRect bbox = PhysicalRect::EnclosingRect( GetPhysicalFragment().GetLayoutObject()->ObjectBoundingBox()); + if (hit_test.result->GetHitTestRequest().IsHitTestVisualOverflow()) { + // For occlusion hit-testing, the filter-expanded ink overflow computed + // above must not be discarded; union it with the object bounding box. + bounds_rect.Unite(bbox); + } else { + bounds_rect = bbox; + } } // TODO(kojii): Don't have good explanation why only inline box needs to // snap, but matches to legacy and fixes crbug.com/976606.