Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: efebb0a3d3b093698b9e59aa02c8ac88639fbeb6
https://github.com/WebKit/WebKit/commit/efebb0a3d3b093698b9e59aa02c8ac88639fbeb6
Author: Ahmad Saleem <[email protected]>
Date: 2026-10-04 (Sun, 04 Oct 2026)
Changed paths:
A LayoutTests/svg/hittest/inert-svg-text-and-image-expected.txt
A LayoutTests/svg/hittest/inert-svg-text-and-image.html
M Source/WebCore/rendering/svg/RenderSVGImage.cpp
M Source/WebCore/rendering/svg/RenderSVGText.cpp
Log Message:
-----------
[LBSE] RenderSVGText and RenderSVGImage hit testing ignores inertness (uses
pointerEvents() instead of usedPointerEvents())
https://bugs.webkit.org/show_bug.cgi?id=326234
rdar://189114227
Reviewed by Nikolas Zimmermann.
RenderSVGText::nodeAtPoint() and RenderSVGImage::nodeAtPoint() built their
PointerEventsHitRules from style().pointerEvents(). That value ignores
inertness, and it ignores rendering being suppressed for a view transition.
As a result, inert SVG images could still be hit, for example by
document.elementFromPoint(). Use usedPointerEvents() instead, matching
RenderSVGShape, the legacy RenderSVGText path, and LegacyRenderSVGImage.
Test: svg/hittest/inert-svg-text-and-image.html
* LayoutTests/svg/hittest/inert-svg-text-and-image-expected.txt: Added.
* LayoutTests/svg/hittest/inert-svg-text-and-image.html: Added.
* Source/WebCore/rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::nodeAtPoint):
* Source/WebCore/rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::nodeAtPoint):
Canonical link: https://commits.webkit.org/322667@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications