Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5aa5773d26d4855f5b912a8aaab9d6fcaed6587f
https://github.com/WebKit/WebKit/commit/5aa5773d26d4855f5b912a8aaab9d6fcaed6587f
Author: Ahmad Saleem <[email protected]>
Date: 2026-01-21 (Wed, 21 Jan 2026)
Changed paths:
A LayoutTests/fast/events/offsetX-offsetY-svg-expected.txt
A LayoutTests/fast/events/offsetX-offsetY-svg.html
M Source/WebCore/dom/MouseRelatedEvent.cpp
Log Message:
-----------
Use the outermost SVG as base when computing offsetX/Y for SVG elements
https://bugs.webkit.org/show_bug.cgi?id=305484
rdar://168548585
Reviewed by Abrar Rahman Protyasha.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
Merge:
https://chromium.googlesource.com/chromium/src.git/+/162fbdaa3d5778e2f02a47c1595400d328df4b22
This patch fixes an issues where were not using closest ancestor CSS
layout box for SVG elements and now after fix, we use it and it is
always the outermost SVG root (RenderSVGRoot).
Test: fast/events/offsetX-offsetY-svg.html
* LayoutTests/fast/events/offsetX-offsetY-svg-expected.txt: Added.
* LayoutTests/fast/events/offsetX-offsetY-svg.html: Added.
* Source/WebCore/dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::computeRelativePosition):
Canonical link: https://commits.webkit.org/305993@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications