Index: Source/core/rendering/svg/RenderSVGRoot.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp |
index 03fa787f7adbc541a5953da6b4a02ddb57b47ee3..777f7cc90e000d3b09527f0ceb2ee0e124e4fe32 100644 |
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp |
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp |
@@ -448,11 +448,11 @@ bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& re |
} |
// If we didn't early exit above, we've just hit the container <svg> element. Unlike SVG 1.1, 2nd Edition allows container elements to be hit. |
- if (hitTestAction == HitTestBlockBackground && visibleToHitTestRequest(request)) { |
- // Only return true here, if the last hit testing phase 'BlockBackground' is executed. If we'd return true in the 'Foreground' phase, |
- // hit testing would stop immediately. For SVG only trees this doesn't matter. Though when we have a <foreignObject> subtree we need |
- // to be able to detect hits on the background of a <div> element. If we'd return true here in the 'Foreground' phase, we are not able |
- // to detect these hits anymore. |
+ if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) && visibleToHitTestRequest(request)) { |
+ // Only return true here, if the last hit testing phase 'BlockBackground' (or 'ChildBlockBackground' - depending on context) is executed. |
+ // If we'd return true in the 'Foreground' phase, hit testing would stop immediately. For SVG only trees this doesn't matter. |
+ // Though when we have a <foreignObject> subtree we need to be able to detect hits on the background of a <div> element. |
+ // If we'd return true here in the 'Foreground' phase, we are not able to detect these hits anymore. |
LayoutRect boundsRect(accumulatedOffset + location(), size()); |
if (locationInContainer.intersects(boundsRect)) { |
updateHitTestResult(result, pointInBorderBox); |