Skip to content

Conversation

graouts
Copy link
Contributor

@graouts graouts commented May 14, 2024

a2fe0bd

IntersectionObserver callback for a visible sentinel node within a container with CSS transform animations is triggered multiple times, but should only be triggered once
https://bugs.webkit.org/show_bug.cgi?id=273928
rdar://127804335

Reviewed by Simon Fraser.

Make sure we use RenderLayer::currentTransform() when querying the target's transform to ensure that it accounts
for accelerated animations. Indeed, RenderLayer::transform() will only account for the transform set on the
`RenderStyle` which does *not* update during the course of an accelerated property animation.

* LayoutTests/imported/w3c/web-platform-tests/intersection-observer/transform-animation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/intersection-observer/transform-animation.html: Added.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computeVisibleRectsInContainer const):

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

3f120e3

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ⏳ 🛠 wpe-skia
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 tv-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 watch
✅ 🛠 🧪 unsafe-merge ✅ 🛠 watch-sim

@graouts graouts self-assigned this May 14, 2024
@graouts graouts added the WebCore JavaScript Bugs in the JavaScript support that WebCore layers on top of JavaScriptCore. label May 14, 2024
@graouts graouts requested review from rniwa and smfr May 14, 2024 14:32
@graouts graouts added DOM For bugs specific to XML/HTML DOM elements (including parsing). unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed WebCore JavaScript Bugs in the JavaScript support that WebCore layers on top of JavaScriptCore. labels May 14, 2024
…ntainer with CSS transform animations is triggered multiple times, but should only be triggered once

https://bugs.webkit.org/show_bug.cgi?id=273928
rdar://127804335

Reviewed by Simon Fraser.

Make sure we use RenderLayer::currentTransform() when querying the target's transform to ensure that it accounts
for accelerated animations. Indeed, RenderLayer::transform() will only account for the transform set on the
`RenderStyle` which does *not* update during the course of an accelerated property animation.

* LayoutTests/imported/w3c/web-platform-tests/intersection-observer/transform-animation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/intersection-observer/transform-animation.html: Added.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computeVisibleRectsInContainer const):

Canonical link: https://commits.webkit.org/278763@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/IntersectionObserver-callback-for-a-visible-sentinel-node-within-a-container-with-CSS-transform-animations-is-triggered-multiple-times-but-should-only-be-triggered-once branch from 3f120e3 to a2fe0bd Compare May 14, 2024 16:01
@webkit-commit-queue
Copy link
Collaborator

Committed 278763@main (a2fe0bd): https://commits.webkit.org/278763@main

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

@webkit-commit-queue webkit-commit-queue merged commit a2fe0bd into WebKit:main May 14, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 14, 2024
@graouts graouts deleted the eng/IntersectionObserver-callback-for-a-visible-sentinel-node-within-a-container-with-CSS-transform-animations-is-triggered-multiple-times-but-should-only-be-triggered-once branch May 14, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DOM For bugs specific to XML/HTML DOM elements (including parsing).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants