Skip to content

[Scroll anchoring] Transform changes fail to suppress anchoring sometimes#62741

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
smfr:eng/Scroll-anchoring-Transform-changes-fail-to-suppress-anchoring-sometimes
Apr 15, 2026
Merged

[Scroll anchoring] Transform changes fail to suppress anchoring sometimes#62741
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
smfr:eng/Scroll-anchoring-Transform-changes-fail-to-suppress-anchoring-sometimes

Conversation

@smfr
Copy link
Copy Markdown
Contributor

@smfr smfr commented Apr 14, 2026

71619b4

[Scroll anchoring] Transform changes fail to suppress anchoring sometimes
https://bugs.webkit.org/show_bug.cgi?id=312277
rdar://174503821

Reviewed by Alan Baradlay.

A transform change results in a `Style::DifferenceResult::Overflow` or `RecompositeLayer`,
so we need to all `scrollAnchoringSuppressionStyleDidChange()` for this diff type.

The test needs to change both height of a sibling, and transform on the wrapper,
because the transform change alone never results in anchoring adjustments; this is
because the before-layout transform already has the new state, since RenderLayer
updates its transform on style change. But this isn't a problem, since transform
changes suppress anchoring anyway.

Test: imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-transform-change.html

* LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-transform-change-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-transform-change.html: Added.
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):

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

1bfcf26

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

@smfr smfr self-assigned this Apr 14, 2026
@smfr smfr added the Scrolling Bugs related to main thread and off-main thread scrolling label Apr 14, 2026
@smfr smfr force-pushed the eng/Scroll-anchoring-Transform-changes-fail-to-suppress-anchoring-sometimes branch from 7c45108 to 1bfcf26 Compare April 14, 2026 20:08
@smfr smfr added the merge-queue Applied to send a pull request to merge-queue label Apr 15, 2026
…imes

https://bugs.webkit.org/show_bug.cgi?id=312277
rdar://174503821

Reviewed by Alan Baradlay.

A transform change results in a `Style::DifferenceResult::Overflow` or `RecompositeLayer`,
so we need to all `scrollAnchoringSuppressionStyleDidChange()` for this diff type.

The test needs to change both height of a sibling, and transform on the wrapper,
because the transform change alone never results in anchoring adjustments; this is
because the before-layout transform already has the new state, since RenderLayer
updates its transform on style change. But this isn't a problem, since transform
changes suppress anchoring anyway.

Test: imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-transform-change.html

* LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-transform-change-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-transform-change.html: Added.
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):

Canonical link: https://commits.webkit.org/311253@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Scroll-anchoring-Transform-changes-fail-to-suppress-anchoring-sometimes branch from 1bfcf26 to 71619b4 Compare April 15, 2026 01:41
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 311253@main (71619b4): https://commits.webkit.org/311253@main

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

@webkit-commit-queue webkit-commit-queue merged commit 71619b4 into WebKit:main Apr 15, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Apr 15, 2026
@smfr smfr deleted the eng/Scroll-anchoring-Transform-changes-fail-to-suppress-anchoring-sometimes branch May 15, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scrolling Bugs related to main thread and off-main thread scrolling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants