Skip to content

[LBSE] Fix svg/custom/focus-ring.svg#58396

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
rwlbuis:eng/LBSE-Fix-svg-custom-focus-ring-svg
Feb 13, 2026
Merged

[LBSE] Fix svg/custom/focus-ring.svg#58396
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
rwlbuis:eng/LBSE-Fix-svg-custom-focus-ring-svg

Conversation

@rwlbuis
Copy link
Contributor

@rwlbuis rwlbuis commented Feb 11, 2026

db29dcc

[LBSE] Fix svg/custom/focus-ring.svg
https://bugs.webkit.org/show_bug.cgi?id=307537

Reviewed by Nikolas Zimmermann.

Fix focus ring by ignoring additionalOffset when the container
itself is not transformed since repaintRectInLocalCoordinates
position will take any transforms of the children into account, unlike
using additionalOffset as position.

The remaining fix is avoiding clipping when painting the focus ring in the
text and image cases.

* LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/focus-ring-expected.png:
* Source/WebCore/rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::addFocusRingRects const):
* Source/WebCore/rendering/svg/RenderSVGContainer.h:
* Source/WebCore/rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
* Source/WebCore/rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::paint):

Canonical link: https://commits.webkit.org/307467@main

e1ede02

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
🧪 ios-wk2-wpt 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
🛠 vision ✅ 🧪 mac-wk2 🧪 gtk-wk2
✅ 🛠 vision-sim 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-wk2-stress 🛠 playstation
✅ 🛠 tv ✅ 🧪 mac-intel-wk2
✅ 🛠 tv-sim 🛠 mac-safer-cpp
🛠 watch
✅ 🛠 watch-sim

@rwlbuis rwlbuis self-assigned this Feb 11, 2026
@rwlbuis rwlbuis added the SVG For bugs in the SVG implementation. label Feb 11, 2026
@rwlbuis rwlbuis force-pushed the eng/LBSE-Fix-svg-custom-focus-ring-svg branch from fba1a7c to bab84a8 Compare February 12, 2026 11:37
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Feb 12, 2026
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label Feb 13, 2026
@rwlbuis rwlbuis force-pushed the eng/LBSE-Fix-svg-custom-focus-ring-svg branch from bab84a8 to e1ede02 Compare February 13, 2026 12:44
@rwlbuis rwlbuis added the merge-queue Applied to send a pull request to merge-queue label Feb 13, 2026
https://bugs.webkit.org/show_bug.cgi?id=307537

Reviewed by Nikolas Zimmermann.

Fix focus ring by ignoring additionalOffset when the container
itself is not transformed since repaintRectInLocalCoordinates
position will take any transforms of the children into account, unlike
using additionalOffset as position.

The remaining fix is avoiding clipping when painting the focus ring in the
text and image cases.

* LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/focus-ring-expected.png:
* Source/WebCore/rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::addFocusRingRects const):
* Source/WebCore/rendering/svg/RenderSVGContainer.h:
* Source/WebCore/rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
* Source/WebCore/rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::paint):

Canonical link: https://commits.webkit.org/307467@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/LBSE-Fix-svg-custom-focus-ring-svg branch from e1ede02 to db29dcc Compare February 13, 2026 13:56
@webkit-commit-queue
Copy link
Collaborator

Committed 307467@main (db29dcc): https://commits.webkit.org/307467@main

Reviewed commits have been landed. Closing PR #58396 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit db29dcc into WebKit:main Feb 13, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Feb 13, 2026
@rwlbuis rwlbuis deleted the eng/LBSE-Fix-svg-custom-focus-ring-svg branch February 13, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SVG For bugs in the SVG implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants